{
 "version": "2.2",
 "instance": {
  "ec-20251231xex2d01.htm": {
   "nsprefix": "ec",
   "nsuri": "http://www.ecopetrol.com/20251231",
   "dts": {
    "schema": {
     "local": [
      "ec-20251231.xsd"
     ],
     "remote": [
      "http://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd",
      "http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd",
      "http://www.xbrl.org/2003/xl-2003-12-31.xsd",
      "http://www.xbrl.org/2003/xlink-2003-12-31.xsd",
      "http://www.xbrl.org/2005/xbrldt-2005.xsd",
      "http://www.xbrl.org/2006/ref-2006-02-27.xsd",
      "http://www.xbrl.org/2014/extensible-enumerations.xsd",
      "http://www.xbrl.org/lrr/arcrole/esma-arcrole-2018-11-21.xsd",
      "https://www.xbrl.org/2020/extensible-enumerations-2.0.xsd",
      "https://www.xbrl.org/dtr/type/2020-01-21/types.xsd",
      "https://www.xbrl.org/dtr/type/2024-01-31/types.xsd",
      "https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd",
      "https://xbrl.fasb.org/srt/2025/elts/srt-roles-2025.xsd",
      "https://xbrl.fasb.org/srt/2025/elts/srt-types-2025.xsd",
      "https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd",
      "https://xbrl.fasb.org/us-gaap/2025/elts/us-roles-2025.xsd",
      "https://xbrl.fasb.org/us-gaap/2025/elts/us-types-2025.xsd",
      "https://xbrl.sec.gov/country/2025/country-2025.xsd",
      "https://xbrl.sec.gov/country/2025/country-2025_def.xsd",
      "https://xbrl.sec.gov/dei/2025/dei-2025.xsd",
      "https://xbrl.sec.gov/rxp/2025/rxp-2025.xsd",
      "https://xbrl.sec.gov/snj/2025/snj-2025.xsd",
      "https://xbrl.sec.gov/snj/2025/snj-2025_def.xsd",
      "https://xbrl.sec.gov/stpr/2025/stpr-2025.xsd"
     ]
    },
    "inline": {
     "local": [
      "ec-20251231xex2d01.htm"
     ]
    }
   },
   "keyStandard": 17,
   "keyCustom": 0,
   "axisStandard": 5,
   "axisCustom": 0,
   "memberStandard": 4,
   "memberCustom": 147,
   "hidden": {
    "total": 1265,
    "http://xbrl.sec.gov/rxp/2025": 1259,
    "http://xbrl.sec.gov/dei/2025": 6
   },
   "contextCount": 370,
   "entityCount": 1,
   "segmentCount": 151,
   "elementCount": 196,
   "unitCount": 1,
   "baseTaxonomies": {
    "http://xbrl.sec.gov/rxp/2025": 1455,
    "http://xbrl.sec.gov/dei/2025": 6
   },
   "report": {
    "R1": {
     "role": "http://xbrl.sec.gov/dei/role/document/DocumentInformation",
     "longName": "995200 - Document - Document Information",
     "shortName": "Document Information",
     "isDefault": "true",
     "groupType": "document",
     "subGroupType": "",
     "menuCat": "Cover",
     "order": "1",
     "firstAnchor": null,
     "uniqueAnchor": null
    },
    "R2": {
     "role": "http://xbrl.sec.gov/rxp/role/ByProject",
     "longName": "995601 - Disclosure - Payments, by Project",
     "shortName": "Payments, by Project",
     "isDefault": "false",
     "groupType": "disclosure",
     "subGroupType": "",
     "menuCat": "Notes",
     "order": "2",
     "firstAnchor": {
      "contextRef": "Duration_1_1_2025_To_12_31_2025_dei_LegalEntityAxis_ec_UpstreamMember_rxp_ProjectAxis_ec_Cpo9ProjectMember_Vqs3lpiYp0qMuL9_lzrMQQ",
      "name": "rxp:Royalties",
      "unitRef": "Unit_Standard_USD_Gkd12gKsl0GBLUb4b2wb6Q",
      "xsiNil": "false",
      "lang": null,
      "decimals": "-4",
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "reportCount": 1,
      "baseRef": "ec-20251231xex2d01.htm",
      "first": true,
      "unique": true
     },
     "uniqueAnchor": {
      "contextRef": "Duration_1_1_2025_To_12_31_2025_dei_LegalEntityAxis_ec_UpstreamMember_rxp_ProjectAxis_ec_Cpo9ProjectMember_Vqs3lpiYp0qMuL9_lzrMQQ",
      "name": "rxp:Royalties",
      "unitRef": "Unit_Standard_USD_Gkd12gKsl0GBLUb4b2wb6Q",
      "xsiNil": "false",
      "lang": null,
      "decimals": "-4",
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "reportCount": 1,
      "baseRef": "ec-20251231xex2d01.htm",
      "first": true,
      "unique": true
     }
    },
    "R3": {
     "role": "http://xbrl.sec.gov/rxp/role/ByGovernment",
     "longName": "995602 - Disclosure - Payments, by Government",
     "shortName": "Payments, by Government",
     "isDefault": "false",
     "groupType": "disclosure",
     "subGroupType": "",
     "menuCat": "Notes",
     "order": "3",
     "firstAnchor": {
      "contextRef": "Duration_1_1_2025_To_12_31_2025_dei_LegalEntityAxis_ec_EcopetrolUsaIncMember_rxp_CountryAxis_country_US_rxp_GovernmentAxis_ec_GovernmentOfUnitedStatesMember_KrgEpqFXU0a1J0WV2-HckA",
      "name": "rxp:Taxes",
      "unitRef": "Unit_Standard_USD_Gkd12gKsl0GBLUb4b2wb6Q",
      "xsiNil": "false",
      "lang": null,
      "decimals": "-4",
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "reportCount": 1,
      "baseRef": "ec-20251231xex2d01.htm",
      "first": true,
      "unique": true
     },
     "uniqueAnchor": {
      "contextRef": "Duration_1_1_2025_To_12_31_2025_dei_LegalEntityAxis_ec_EcopetrolUsaIncMember_rxp_CountryAxis_country_US_rxp_GovernmentAxis_ec_GovernmentOfUnitedStatesMember_KrgEpqFXU0a1J0WV2-HckA",
      "name": "rxp:Taxes",
      "unitRef": "Unit_Standard_USD_Gkd12gKsl0GBLUb4b2wb6Q",
      "xsiNil": "false",
      "lang": null,
      "decimals": "-4",
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "reportCount": 1,
      "baseRef": "ec-20251231xex2d01.htm",
      "first": true,
      "unique": true
     }
    },
    "R4": {
     "role": "http://xbrl.sec.gov/rxp/role/Detail",
     "longName": "995603 - Disclosure - Payments, Details",
     "shortName": "Payments, Details",
     "isDefault": "false",
     "groupType": "disclosure",
     "subGroupType": "",
     "menuCat": "Notes",
     "order": "4",
     "firstAnchor": {
      "contextRef": "Duration_1_1_2025_To_12_31_2025_dei_LegalEntityAxis_ec_EcopetrolAmericaLlcMember_rxp_PmtAxis_1_Gz34oG2g4kCdwArFo6axxg",
      "name": "rxp:A",
      "unitRef": "Unit_Standard_USD_Gkd12gKsl0GBLUb4b2wb6Q",
      "xsiNil": "false",
      "lang": null,
      "decimals": "-4",
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "reportCount": 1,
      "baseRef": "ec-20251231xex2d01.htm",
      "first": true,
      "unique": true
     },
     "uniqueAnchor": {
      "contextRef": "Duration_1_1_2025_To_12_31_2025_dei_LegalEntityAxis_ec_EcopetrolAmericaLlcMember_rxp_PmtAxis_1_Gz34oG2g4kCdwArFo6axxg",
      "name": "rxp:A",
      "unitRef": "Unit_Standard_USD_Gkd12gKsl0GBLUb4b2wb6Q",
      "xsiNil": "false",
      "lang": null,
      "decimals": "-4",
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "reportCount": 1,
      "baseRef": "ec-20251231xex2d01.htm",
      "first": true,
      "unique": true
     }
    }
   },
   "tag": {
    "rxp_A": {
     "xbrltype": "monetaryItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "A",
     "crdr": "debit",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/Detail"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Amount",
        "terseLabel": "Amount"
       }
      }
     },
     "auth_ref": [
      "r1"
     ]
    },
    "ec_AbanicoProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "AbanicoProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for ABANICO project.",
        "label": "ABANICO, Project [Member]",
        "terseLabel": "ABANICO"
       }
      }
     },
     "auth_ref": []
    },
    "ec_AbarcoProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "AbarcoProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for ABARCO project.",
        "label": "ABARCO, Project [Member]",
        "terseLabel": "ABARCO"
       }
      }
     },
     "auth_ref": []
    },
    "ec_AcaeSanMiguelProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "AcaeSanMiguelProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for ACAE SAN MIGUEL project.",
        "label": "ACAE SAN MIGUEL, Project [Member]",
        "terseLabel": "ACAE SAN MIGUEL"
       }
      }
     },
     "auth_ref": []
    },
    "ec_AkaciasProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "AkaciasProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for AKACIAS project.",
        "label": "AKACIAS, Project [Member]",
        "terseLabel": "AKACIAS"
       }
      }
     },
     "auth_ref": []
    },
    "country_AllCountriesDomain": {
     "xbrltype": "domainItemType",
     "nsuri": "http://xbrl.sec.gov/country/2025",
     "localname": "AllCountriesDomain",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByGovernment"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "All Countries [Domain]",
        "terseLabel": "All Countries"
       }
      }
     },
     "auth_ref": []
    },
    "rxp_AllGovernmentsMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "AllGovernmentsMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByGovernment"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "All Governments [Member]",
        "terseLabel": "All Governments"
       }
      }
     },
     "auth_ref": [
      "r12",
      "r13"
     ]
    },
    "rxp_AllProjectsMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "AllProjectsMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "All Projects [Member]",
        "terseLabel": "All Projects"
       }
      }
     },
     "auth_ref": [
      "r11"
     ]
    },
    "ec_AlqamariProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "AlqamariProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for ALQAMARI project.",
        "label": "ALQAMARI , Project [Member]",
        "verboseLabel": "ALQAMARI"
       }
      }
     },
     "auth_ref": []
    },
    "rxp_AlternativeReportingRegime": {
     "xbrltype": "alternativeReportingRegimeItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "AlternativeReportingRegime",
     "presentation": [
      "http://xbrl.sec.gov/dei/role/document/DocumentInformation"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Alternative Reporting Regime",
        "terseLabel": "Alternative Reporting Regime"
       }
      }
     },
     "auth_ref": [
      "r10"
     ]
    },
    "dei_AmendmentDescription": {
     "xbrltype": "stringItemType",
     "nsuri": "http://xbrl.sec.gov/dei/2025",
     "localname": "AmendmentDescription",
     "presentation": [
      "http://xbrl.sec.gov/dei/role/document/DocumentInformation"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Amendment Description",
        "terseLabel": "Amendment Description",
        "documentation": "Description of changes contained within amended document."
       }
      }
     },
     "auth_ref": []
    },
    "dei_AmendmentFlag": {
     "xbrltype": "booleanItemType",
     "nsuri": "http://xbrl.sec.gov/dei/2025",
     "localname": "AmendmentFlag",
     "presentation": [
      "http://xbrl.sec.gov/dei/role/document/DocumentInformation"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Amendment Flag",
        "terseLabel": "Amendment",
        "documentation": "Boolean flag that is true when the XBRL content amends previously-filed or accepted submission."
       }
      }
     },
     "auth_ref": []
    },
    "ec_AndinaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "AndinaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "It represents the information pertaining to Andina Project.",
        "label": "Andina Project [Member]",
        "terseLabel": "Andina"
       }
      }
     },
     "auth_ref": []
    },
    "ec_ApiayEsteProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "ApiayEsteProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for APIAY ESTE project.",
        "label": "APIAY ESTE, Project [Member]",
        "terseLabel": "APIAY ESTE"
       }
      }
     },
     "auth_ref": []
    },
    "ec_ApiayProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "ApiayProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for APIAY project.",
        "label": "APIAY, Project [Member]",
        "terseLabel": "APIAY"
       }
      }
     },
     "auth_ref": []
    },
    "ec_AraucaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "AraucaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for ARAUCA project.",
        "label": "ARAUCA, Project [Member]",
        "terseLabel": "ARAUCA"
       }
      }
     },
     "auth_ref": []
    },
    "ec_AreaTecaCocornaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "AreaTecaCocornaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for AREA TECA-COCORNA project.",
        "label": "AREA TECA-COCORNA, Project [Member]",
        "terseLabel": "AREA TECA-COCORNA"
       }
      }
     },
     "auth_ref": []
    },
    "ec_ArjonaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "ArjonaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for Arjona project.",
        "label": "Arjona, Project [Member]",
        "terseLabel": "Arjona"
       }
      }
     },
     "auth_ref": []
    },
    "ec_ArrayanProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "ArrayanProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for ARRAYAN project.",
        "label": "ARRAYAN, Project [Member]",
        "terseLabel": "ARRAYAN"
       }
      }
     },
     "auth_ref": []
    },
    "ec_ArrecifeMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "ArrecifeMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for ARRECIFE project.",
        "label": "ARRECIFE [Member]",
        "terseLabel": "ARRECIFE"
       }
      }
     },
     "auth_ref": []
    },
    "ec_AulladorProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "AulladorProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for AULLADOR project.",
        "label": "AULLADOR, Project [Member]",
        "terseLabel": "AULLADOR"
       }
      }
     },
     "auth_ref": []
    },
    "ec_AustralProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "AustralProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for AUSTRAL project.",
        "label": "AUSTRAL, Project [Member]",
        "terseLabel": "AUSTRAL"
       }
      }
     },
     "auth_ref": []
    },
    "ec_BalconProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "BalconProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for BALCON project.",
        "label": "BALCON, Project [Member]",
        "terseLabel": "BALCON"
       }
      }
     },
     "auth_ref": []
    },
    "ec_BallenaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "BallenaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for Ballena project.",
        "label": "Ballena, Project [Member]",
        "terseLabel": "Ballena"
       }
      }
     },
     "auth_ref": []
    },
    "ec_BloqueGuaOff10Member": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "BloqueGuaOff10Member",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for BLOQUE GUA OFF 10 project.",
        "label": "BLOQUE GUA OFF 10 [Member]",
        "verboseLabel": "BLOQUE GUA OFF 10"
       }
      }
     },
     "auth_ref": []
    },
    "ec_BloqueGuaOff1Member": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "BloqueGuaOff1Member",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for BLOQUE GUA OFF 1 project.",
        "label": "BLOQUE GUA OFF 1 [Member]",
        "verboseLabel": "BLOQUE GUA OFF 1"
       }
      }
     },
     "auth_ref": []
    },
    "ec_BonanzaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "BonanzaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for BONANZA project.",
        "label": "BONANZA, Project [Member]",
        "terseLabel": "BONANZA"
       }
      }
     },
     "auth_ref": []
    },
    "rxp_Bonuses": {
     "xbrltype": "monetaryItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "Bonuses",
     "crdr": "debit",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByCategory",
      "http://xbrl.sec.gov/rxp/role/ByGovernment",
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Bonuses",
        "terseLabel": "Bonuses"
       }
      }
     },
     "auth_ref": [
      "r19"
     ]
    },
    "ec_BrisasProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "BrisasProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for BRISAS project.",
        "label": "BRISAS, Project [Member]",
        "terseLabel": "BRISAS"
       }
      }
     },
     "auth_ref": []
    },
    "country_CO": {
     "xbrltype": "domainItemType",
     "nsuri": "http://xbrl.sec.gov/country/2025",
     "localname": "CO",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByGovernment"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "COLOMBIA",
        "terseLabel": "Colombia"
       }
      }
     },
     "auth_ref": []
    },
    "ec_CaipalProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "CaipalProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for CAIPAL project.",
        "label": "CAIPAL, Project [Member]",
        "terseLabel": "CAIPAL"
       }
      }
     },
     "auth_ref": []
    },
    "ec_CanoLimonProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "CanoLimonProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for CaNo LimOn project.",
        "label": "CaNo LimOn, Project [Member]",
        "terseLabel": "Cano Limon"
       }
      }
     },
     "auth_ref": []
    },
    "ec_CanoSurEsteProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "CanoSurEsteProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for CANO SUR ESTE project.",
        "label": "CANO SUR ESTE, Project [Member]",
        "terseLabel": "CANO SUR ESTE"
       }
      }
     },
     "auth_ref": []
    },
    "ec_CanoSurProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "CanoSurProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for CaNo Sur project.",
        "label": "CaNo Sur, Project [Member]",
        "terseLabel": "Cano Sur"
       }
      }
     },
     "auth_ref": []
    },
    "ec_CaribeProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "CaribeProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for CARIBE project.",
        "label": "CARIBE, Project [Member]",
        "terseLabel": "CARIBE"
       }
      }
     },
     "auth_ref": []
    },
    "ec_CasabeProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "CasabeProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for CASABE project.",
        "label": "CASABE, Project [Member]",
        "terseLabel": "Casabe"
       }
      }
     },
     "auth_ref": []
    },
    "ec_CasabeSurProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "CasabeSurProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for CASABE SUR project.",
        "label": "CASABE SUR, Project [Member]",
        "terseLabel": "CASABE SUR"
       }
      }
     },
     "auth_ref": []
    },
    "ec_CastillaNorteProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "CastillaNorteProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for CASTILLA NORTE project.",
        "label": "CASTILLA NORTE, Project [Member]",
        "terseLabel": "CASTILLA NORTE"
       }
      }
     },
     "auth_ref": []
    },
    "ec_CastillaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "CastillaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for CASTILLA project.",
        "label": "CASTILLA, Project [Member]",
        "terseLabel": "CASTILLA"
       }
      }
     },
     "auth_ref": []
    },
    "ec_CenitTransporteYLogisticaDeHidrocarburosS.a.s.TransporteYLogisticaDeHidrocarburosS.a.sMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "CenitTransporteYLogisticaDeHidrocarburosS.a.s.TransporteYLogisticaDeHidrocarburosS.a.sMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByCategory",
      "http://xbrl.sec.gov/rxp/role/ByGovernment",
      "http://xbrl.sec.gov/rxp/role/ByProject",
      "http://xbrl.sec.gov/rxp/role/Detail"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This member stands for Cenit Transporte y Logistica de Hidrocarburos S.A.S. Transporte y Logistica de Hidrocarburos S.A.S.",
        "label": "Cenit Transporte y Logistica de Hidrocarburos S.A.S. Transporte y Logistica de Hidrocarburos S.A.S [Member]",
        "terseLabel": "Cenit Transporte y Logistica de Hidrocarburos S.A.S. Transporte y Logistica de Hidrocarburos S.A.S."
       }
      }
     },
     "auth_ref": []
    },
    "ec_ChichimeneProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "ChichimeneProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for CHICHIMENE project.",
        "label": "CHICHIMENE, Project [Member]",
        "terseLabel": "CHICHIMENE"
       }
      }
     },
     "auth_ref": []
    },
    "ec_ChichimeneSwProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "ChichimeneSwProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for CHICHIMENE SW project.",
        "label": "CHICHIMENE SW, Project [Member]",
        "terseLabel": "CHICHIMENE SW"
       }
      }
     },
     "auth_ref": []
    },
    "ec_ChuchupaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "ChuchupaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "It represents the information pertaining to Chuchupa Project.",
        "label": "Chuchupa Project [Member]",
        "terseLabel": "Chuchupa"
       }
      }
     },
     "auth_ref": []
    },
    "ec_ChuruyacoProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "ChuruyacoProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for CHURUYACO project.",
        "label": "CHURUYACO, Project [Member]",
        "terseLabel": "CHURUYACO"
       }
      }
     },
     "auth_ref": []
    },
    "ec_CicucoProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "CicucoProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for Cicuco project.",
        "label": "Cicuco, Project [Member]",
        "terseLabel": "Cicuco"
       }
      }
     },
     "auth_ref": []
    },
    "ec_CiraProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "CiraProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for CIRA project.",
        "label": "CIRA, Project [Member]",
        "verboseLabel": "CIRA"
       }
      }
     },
     "auth_ref": []
    },
    "rxp_Cm": {
     "xbrltype": "conversionMethodItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "Cm",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/Detail"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Currency Conversion Method",
        "terseLabel": "Curr. Conv. Method"
       }
      }
     },
     "auth_ref": [
      "r24"
     ]
    },
    "rxp_Co": {
     "xbrltype": "enumerationItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "Co",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/Detail"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Country",
        "terseLabel": "Country"
       }
      }
     },
     "auth_ref": [
      "r6"
     ]
    },
    "ec_CommercialAndMarketingVicePresidencyVcmMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "CommercialAndMarketingVicePresidencyVcmMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByGovernment",
      "http://xbrl.sec.gov/rxp/role/ByProject",
      "http://xbrl.sec.gov/rxp/role/Detail"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This member stands Commercial and Marketing Vice-Presidency (VCM).",
        "label": "Commercial and Marketing Vice Presidency (VCM) [Member]",
        "verboseLabel": "VCM"
       }
      }
     },
     "auth_ref": []
    },
    "rxp_CommunityAndSocial": {
     "xbrltype": "monetaryItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "CommunityAndSocial",
     "crdr": "debit",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByCategory",
      "http://xbrl.sec.gov/rxp/role/ByGovernment",
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Community and Social Responsibility",
        "terseLabel": "Comm. Social Resp."
       }
      }
     },
     "auth_ref": [
      "r22"
     ]
    },
    "rxp_CountryAxis": {
     "xbrltype": "stringItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "CountryAxis",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByGovernment"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Country [Axis]",
        "terseLabel": "Country:"
       }
      }
     },
     "auth_ref": [
      "r25"
     ]
    },
    "dei_CoverAbstract": {
     "xbrltype": "stringItemType",
     "nsuri": "http://xbrl.sec.gov/dei/2025",
     "localname": "CoverAbstract",
     "lang": {
      "en-us": {
       "role": {
        "label": "Cover [Abstract]",
        "terseLabel": "Cover",
        "documentation": "Cover page."
       }
      }
     },
     "auth_ref": []
    },
    "ec_Cpo9ProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "Cpo9ProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This member stands for CPO-9.",
        "label": "CPO-9 Project [Member]",
        "terseLabel": "CPO-9"
       }
      }
     },
     "auth_ref": []
    },
    "ec_CristalinaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "CristalinaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for CRISTALINA project.",
        "label": "CRISTALINA, Project [Member]",
        "terseLabel": "CRISTALINA"
       }
      }
     },
     "auth_ref": []
    },
    "ec_CupiaguaLiriaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "CupiaguaLiriaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for CUPIAGUA LIRIA project.",
        "label": "CUPIAGUA LIRIA, Project [Member]",
        "terseLabel": "CUPIAGUA LIRIA"
       }
      }
     },
     "auth_ref": []
    },
    "ec_CupiaguaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "CupiaguaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for CUPIAGUA project.",
        "label": "CUPIAGUA, Project [Member]",
        "terseLabel": "Cupiagua"
       }
      }
     },
     "auth_ref": []
    },
    "ec_CupiaguaSurProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "CupiaguaSurProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for CUPIAGUA SUR project.",
        "label": "CUPIAGUA SUR, Project [Member]",
        "terseLabel": "CUPIAGUA SUR"
       }
      }
     },
     "auth_ref": []
    },
    "ec_CusianaNorteProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "CusianaNorteProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for CUSIANA NORTE project.",
        "label": "CUSIANA NORTE, Project [Member]",
        "terseLabel": "CUSIANA NORTE"
       }
      }
     },
     "auth_ref": []
    },
    "ec_CusianaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "CusianaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for CUSIANA project.",
        "label": "CUSIANA, Project [Member]",
        "terseLabel": "Cusiana"
       }
      }
     },
     "auth_ref": []
    },
    "ec_DinaCretaceoProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "DinaCretaceoProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This member stands for the DINA CRETACEO project.",
        "label": "DINA CRETACEO, Project [Member]",
        "terseLabel": "DINA CRETACEO"
       }
      }
     },
     "auth_ref": []
    },
    "ec_DinaNorteProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "DinaNorteProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for DINA NORTE project.",
        "label": "DINA NORTE, Project [Member]",
        "terseLabel": "DINA NORTE"
       }
      }
     },
     "auth_ref": []
    },
    "ec_DinaTerciariosProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "DinaTerciariosProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for DINA TERCIARIOS project.",
        "label": "DINA TERCIARIOS, Project [Member]",
        "terseLabel": "DINA TERCIARIOS"
       }
      }
     },
     "auth_ref": []
    },
    "rxp_Dividends": {
     "xbrltype": "monetaryItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "Dividends",
     "crdr": "debit",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByCategory",
      "http://xbrl.sec.gov/rxp/role/ByGovernment",
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Dividends",
        "terseLabel": "Dividends"
       }
      }
     },
     "auth_ref": [
      "r20"
     ]
    },
    "dei_DocumentInformationLineItems": {
     "xbrltype": "stringItemType",
     "nsuri": "http://xbrl.sec.gov/dei/2025",
     "localname": "DocumentInformationLineItems",
     "presentation": [
      "http://xbrl.sec.gov/dei/role/document/DocumentInformation"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Document Information [Line Items]",
        "terseLabel": "Document Information:",
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table."
       }
      }
     },
     "auth_ref": []
    },
    "dei_DocumentInformationTable": {
     "xbrltype": "stringItemType",
     "nsuri": "http://xbrl.sec.gov/dei/2025",
     "localname": "DocumentInformationTable",
     "presentation": [
      "http://xbrl.sec.gov/dei/role/document/DocumentInformation"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Document Information [Table]",
        "terseLabel": "Document Information",
        "documentation": "Container to support the formal attachment of each official or unofficial, public or private document as part of a submission package."
       }
      }
     },
     "auth_ref": []
    },
    "dei_DocumentPeriodEndDate": {
     "xbrltype": "dateItemType",
     "nsuri": "http://xbrl.sec.gov/dei/2025",
     "localname": "DocumentPeriodEndDate",
     "presentation": [
      "http://xbrl.sec.gov/dei/role/document/DocumentInformation"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Document Period End Date",
        "terseLabel": "Period End Date",
        "documentation": "For the EDGAR submission types of Form 8-K: the date of the report, the date of the earliest event reported; for the EDGAR submission types of Form N-1A: the filing date; for all other submission types: the end of the reporting or transition period. The format of the date is YYYY-MM-DD."
       }
      }
     },
     "auth_ref": []
    },
    "dei_DocumentType": {
     "xbrltype": "submissionTypeItemType",
     "nsuri": "http://xbrl.sec.gov/dei/2025",
     "localname": "DocumentType",
     "presentation": [
      "http://xbrl.sec.gov/dei/role/document/DocumentInformation"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Document Type",
        "terseLabel": "Document Type",
        "documentation": "The type of document being provided (such as 10-K, 10-Q, 485BPOS, etc). The document type is limited to the same value as the supporting SEC submission type, or the word 'Other'."
       }
      }
     },
     "auth_ref": []
    },
    "ec_EcopetrolAmericaLlcMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "EcopetrolAmericaLlcMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/Detail"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This member stands for Ecopetrol America LLC.",
        "label": "Ecopetrol America LLC [Member]",
        "terseLabel": "Ecopetrol America LLC"
       }
      }
     },
     "auth_ref": []
    },
    "ec_EcopetrolMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "EcopetrolMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/Detail"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This member stands for Ecopetrol.",
        "label": "Ecopetrol [Member]",
        "terseLabel": "Ecopetrol"
       }
      }
     },
     "auth_ref": []
    },
    "ec_EcopetrolS.a.Member": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "EcopetrolS.a.Member",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByCategory",
      "http://xbrl.sec.gov/rxp/role/ByGovernment",
      "http://xbrl.sec.gov/rxp/role/ByProject",
      "http://xbrl.sec.gov/rxp/role/Detail"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This member stands for Ecopetrol S.A.",
        "label": "Ecopetrol S.A. [Member]",
        "terseLabel": "Ecopetrol S.A."
       }
      }
     },
     "auth_ref": []
    },
    "ec_EcopetrolTradingAsiaPteMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "EcopetrolTradingAsiaPteMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByGovernment",
      "http://xbrl.sec.gov/rxp/role/Detail"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This member stands for Ecopetrol Trading Asia Pte .",
        "label": "Ecopetrol Trading Asia Pte [Member]",
        "terseLabel": "Ecopetrol Trading Asia Pte Ltd"
       }
      }
     },
     "auth_ref": []
    },
    "ec_EcopetrolUsaIncMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "EcopetrolUsaIncMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByGovernment",
      "http://xbrl.sec.gov/rxp/role/Detail"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This member stands for Ecopetrol USA Inc.",
        "label": "Ecopetrol USA Inc [Member]",
        "terseLabel": "Ecopetrol USA Inc"
       }
      }
     },
     "auth_ref": []
    },
    "dei_EntityCentralIndexKey": {
     "xbrltype": "centralIndexKeyItemType",
     "nsuri": "http://xbrl.sec.gov/dei/2025",
     "localname": "EntityCentralIndexKey",
     "presentation": [
      "http://xbrl.sec.gov/dei/role/document/DocumentInformation"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Entity Central Index Key",
        "terseLabel": "CIK",
        "documentation": "A unique 10-digit SEC-issued value to identify entities that have filed disclosures with the SEC. It is commonly abbreviated as CIK."
       }
      }
     },
     "auth_ref": [
      "r0"
     ]
    },
    "dei_EntityDomain": {
     "xbrltype": "domainItemType",
     "nsuri": "http://xbrl.sec.gov/dei/2025",
     "localname": "EntityDomain",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByCategory",
      "http://xbrl.sec.gov/rxp/role/ByGovernment",
      "http://xbrl.sec.gov/rxp/role/ByProject",
      "http://xbrl.sec.gov/rxp/role/Detail"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "All Entities [Member]",
        "terseLabel": "All Entities",
        "documentation": "All the names of the entities being reported upon in a document. Any legal structure used to conduct activities or to hold assets. Some examples of such structures are corporations, partnerships, limited liability companies, grantor trusts, and other trusts. This item does not include business and geographical segments which are included in the geographical or business segments domains."
       }
      }
     },
     "auth_ref": []
    },
    "dei_EntityRegistrantName": {
     "xbrltype": "normalizedStringItemType",
     "nsuri": "http://xbrl.sec.gov/dei/2025",
     "localname": "EntityRegistrantName",
     "presentation": [
      "http://xbrl.sec.gov/dei/role/document/DocumentInformation"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Entity Registrant Name",
        "terseLabel": "Registrant Name",
        "documentation": "The exact name of the entity filing the report as specified in its charter, which is required by forms filed with the SEC."
       }
      }
     },
     "auth_ref": [
      "r0"
     ]
    },
    "dei_EntityReportingCurrencyISOCode": {
     "xbrltype": "currencyItemType",
     "nsuri": "http://xbrl.sec.gov/dei/2025",
     "localname": "EntityReportingCurrencyISOCode",
     "presentation": [
      "http://xbrl.sec.gov/dei/role/document/DocumentInformation"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Entity Reporting Currency ISO Code",
        "terseLabel": "Reporting Currency",
        "documentation": "The three character ISO 4217 code for the currency used for reporting purposes. Example: 'USD'."
       }
      }
     },
     "auth_ref": []
    },
    "ec_EspinalProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "EspinalProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for Espinal project.",
        "label": "Espinal, Project [Member]",
        "terseLabel": "Espinal"
       }
      }
     },
     "auth_ref": []
    },
    "rxp_Fees": {
     "xbrltype": "monetaryItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "Fees",
     "crdr": "debit",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByCategory",
      "http://xbrl.sec.gov/rxp/role/ByGovernment",
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Fees",
        "terseLabel": "Fees"
       }
      }
     },
     "auth_ref": [
      "r17"
     ]
    },
    "ec_FlamencosProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "FlamencosProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for FLAMENCOS project.",
        "label": "FLAMENCOS, Project [Member]",
        "terseLabel": "FLAMENCOS"
       }
      }
     },
     "auth_ref": []
    },
    "ec_FlorenaMiradorProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "FlorenaMiradorProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for FLORENA MIRADOR project.",
        "label": "FLORENA MIRADOR, Project [Member]",
        "terseLabel": "FLORENA MIRADOR"
       }
      }
     },
     "auth_ref": []
    },
    "ec_FlorenaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "FlorenaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for FLORENA project.",
        "label": "FLORENA, Project [Member]",
        "terseLabel": "Florena"
       }
      }
     },
     "auth_ref": []
    },
    "ec_GarzasProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "GarzasProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for GARZAS project.",
        "label": "GARZAS, Project [Member]",
        "terseLabel": "GARZAS"
       }
      }
     },
     "auth_ref": []
    },
    "ec_GavanProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "GavanProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for GAVAN project.",
        "label": "GAVAN, Project [Member]",
        "terseLabel": "GAVAN"
       }
      }
     },
     "auth_ref": []
    },
    "ec_GibraltarProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "GibraltarProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for GIBRALTAR project.",
        "label": "GIBRALTAR, Project [Member]",
        "terseLabel": "GIBRALTAR"
       }
      }
     },
     "auth_ref": []
    },
    "ec_GiganteProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "GiganteProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This member stands for GIGANTE\n project.",
        "label": "GIGANTE, Project [Member]",
        "terseLabel": "GIGANTE"
       }
      }
     },
     "auth_ref": []
    },
    "ec_GirasolProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "GirasolProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for GIRASOL project.",
        "label": "GIRASOL, Project [Member]",
        "terseLabel": "GIRASOL"
       }
      }
     },
     "auth_ref": []
    },
    "rxp_GovernmentAxis": {
     "xbrltype": "stringItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "GovernmentAxis",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByGovernment"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Government [Axis]",
        "terseLabel": "Government:"
       }
      }
     },
     "auth_ref": [
      "r12",
      "r13"
     ]
    },
    "ec_GovernmentOfColombiaMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "GovernmentOfColombiaMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByGovernment"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This member stands for Government of Colombia.",
        "label": "Government of Colombia[Member]",
        "terseLabel": "Colombia"
       }
      }
     },
     "auth_ref": []
    },
    "ec_GovernmentOfSingaporeMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "GovernmentOfSingaporeMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByGovernment"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This member stands for the Government of Singapore.",
        "label": "Government of Singapore [Member]",
        "terseLabel": "Singapore"
       }
      }
     },
     "auth_ref": []
    },
    "ec_GovernmentOfUnitedStatesMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "GovernmentOfUnitedStatesMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByGovernment"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This member stands for Government of United States.",
        "label": "Government of United States [Member]",
        "terseLabel": "United States"
       }
      }
     },
     "auth_ref": []
    },
    "ec_GuajiraProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "GuajiraProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for Guajira project.",
        "label": "Guajira, Project [Member]",
        "terseLabel": "Guajira"
       }
      }
     },
     "auth_ref": []
    },
    "ec_GuatiquiaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "GuatiquiaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for GUATIQUIA project.",
        "label": "GUATIQUIA, Project [Member]",
        "terseLabel": "GUATIQUIA"
       }
      }
     },
     "auth_ref": []
    },
    "rxp_Gv": {
     "xbrltype": "enumerationItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "Gv",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/Detail"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Government",
        "terseLabel": "Govt."
       }
      }
     },
     "auth_ref": [
      "r6"
     ]
    },
    "ec_HocolProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "HocolProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for Hocol project.",
        "label": "Hocol, Project [Member]",
        "terseLabel": "Hocol"
       }
      }
     },
     "auth_ref": []
    },
    "ec_HocolS.a.Member": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "HocolS.a.Member",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject",
      "http://xbrl.sec.gov/rxp/role/Detail"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This member stands for Hocol S.A.",
        "label": "Hocol S.A. [Member]",
        "terseLabel": "Hocol S.A."
       }
      }
     },
     "auth_ref": []
    },
    "ec_HormigaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "HormigaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for HORMIGAproject.",
        "label": "HORMIGA, Project [Member]",
        "terseLabel": "HORMIGA"
       }
      }
     },
     "auth_ref": []
    },
    "ec_InfantasProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "InfantasProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for INFANTAS project.",
        "label": "INFANTAS, Project [Member]",
        "terseLabel": "INFANTAS"
       }
      }
     },
     "auth_ref": []
    },
    "rxp_InfrastructureImprovements": {
     "xbrltype": "monetaryItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "InfrastructureImprovements",
     "crdr": "debit",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByCategory",
      "http://xbrl.sec.gov/rxp/role/ByGovernment",
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Infrastructure Improvements",
        "terseLabel": "Infrastructure"
       }
      }
     },
     "auth_ref": [
      "r21"
     ]
    },
    "ec_JazminProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "JazminProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for JAZMIN project.",
        "label": "JAZMIN, Project [Member]",
        "terseLabel": "JAZMIN"
       }
      }
     },
     "auth_ref": []
    },
    "rxp_K": {
     "xbrltype": "yesItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "K",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/Detail"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "In-kind",
        "terseLabel": "In-kind"
       }
      }
     },
     "auth_ref": [
      "r23"
     ]
    },
    "rxp_Km": {
     "xbrltype": "stringItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "Km",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/Detail"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "In-kind Value Calculation",
        "terseLabel": "In-kind Calc."
       }
      }
     },
     "auth_ref": [
      "r23"
     ]
    },
    "ec_LaCanadaNorteProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "LaCanadaNorteProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This member stands for LA CAADA NORTE project.",
        "label": "LA CANADA NORTE, Project [Member]",
        "terseLabel": "LA CANADA NORTE"
       }
      }
     },
     "auth_ref": []
    },
    "ec_LaCanadaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "LaCanadaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for La CaNada project.",
        "label": "La CaNada, Project [Member]",
        "terseLabel": "La Canada"
       }
      }
     },
     "auth_ref": []
    },
    "ec_LaCiraProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "LaCiraProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for LA CIRA project.",
        "label": "LA CIRA, Project [Member]",
        "terseLabel": "LA CIRA"
       }
      }
     },
     "auth_ref": []
    },
    "ec_LaHochaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "LaHochaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for La Hocha project.",
        "label": "La Hocha, Project [Member]",
        "terseLabel": "La Hocha"
       }
      }
     },
     "auth_ref": []
    },
    "ec_LaJaguaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "LaJaguaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for LA JAGUA project.",
        "label": "LA JAGUA, Project [Member]",
        "terseLabel": "LA JAGUA"
       }
      }
     },
     "auth_ref": []
    },
    "ec_LaPuntaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "LaPuntaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for La Punta project.",
        "label": "La Punta, Project [Member]",
        "terseLabel": "La Punta"
       }
      }
     },
     "auth_ref": []
    },
    "dei_LegalEntityAxis": {
     "xbrltype": "stringItemType",
     "nsuri": "http://xbrl.sec.gov/dei/2025",
     "localname": "LegalEntityAxis",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByCategory",
      "http://xbrl.sec.gov/rxp/role/ByGovernment",
      "http://xbrl.sec.gov/rxp/role/ByProject",
      "http://xbrl.sec.gov/rxp/role/Detail"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Legal Entity [Axis]",
        "terseLabel": "Legal Entity:",
        "documentation": "The set of legal entities associated with a report."
       }
      }
     },
     "auth_ref": []
    },
    "ec_LibertadNorteProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "LibertadNorteProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for LIBERTAD NORTE project.",
        "label": "LIBERTAD NORTE, Project [Member]",
        "terseLabel": "LIBERTAD NORTE"
       }
      }
     },
     "auth_ref": []
    },
    "ec_LibertadProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "LibertadProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for LIBERTAD project.",
        "label": "LIBERTAD, Project [Member]",
        "terseLabel": "LIBERTAD"
       }
      }
     },
     "auth_ref": []
    },
    "ec_Lisama158ProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "Lisama158ProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for LISAMA 158",
        "label": "LISAMA 158, Project [Member]",
        "verboseLabel": "LISAMA 158"
       }
      }
     },
     "auth_ref": []
    },
    "ec_LisamaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "LisamaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for LISAMA project.",
        "label": "LISAMA, Project [Member]",
        "terseLabel": "LISAMA"
       }
      }
     },
     "auth_ref": []
    },
    "ec_LlanitoProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "LlanitoProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for LLANITO\n project.",
        "label": "LLANITO, Project [Member]",
        "terseLabel": "LLANITO"
       }
      }
     },
     "auth_ref": []
    },
    "ec_LlanitoUnificadoProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "LlanitoUnificadoProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for LLANITO UNIFICADO project.",
        "label": "LLANITO UNIFICADO, Project [Member]",
        "terseLabel": "LLANITO UNIFICADO"
       }
      }
     },
     "auth_ref": []
    },
    "ec_LomaLargaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "LomaLargaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for LOMA LARGA project.",
        "label": "LOMA LARGA, Project [Member]",
        "terseLabel": "LOMA LARGA"
       }
      }
     },
     "auth_ref": []
    },
    "ec_LoritoProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "LoritoProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for Lorito project.",
        "label": "Lorito, Project [Member]",
        "terseLabel": "Lorito"
       }
      }
     },
     "auth_ref": []
    },
    "ec_LoroProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "LoroProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for LORO project.",
        "label": "LORO, Project [Member]",
        "terseLabel": "LORO"
       }
      }
     },
     "auth_ref": []
    },
    "rxp_M": {
     "xbrltype": "extractionMethodItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "M",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/Detail"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Extraction Method",
        "terseLabel": "Ext. Method"
       }
      }
     },
     "auth_ref": [
      "r8"
     ]
    },
    "ec_MansoyaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "MansoyaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for MANSOYA project.",
        "label": "MANSOYA, Project [Member]",
        "terseLabel": "MANSOYA"
       }
      }
     },
     "auth_ref": []
    },
    "ec_MatachinNorteProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "MatachinNorteProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for Matachin Norte project.",
        "label": "Matachin Norte, Project [Member]",
        "terseLabel": "Matachin Norte"
       }
      }
     },
     "auth_ref": []
    },
    "ec_MatachinSurProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "MatachinSurProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for Matachin Sur project.",
        "label": "Matachin Sur, Project [Member]",
        "terseLabel": "Matachin Sur"
       }
      }
     },
     "auth_ref": []
    },
    "ec_MoricheProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "MoricheProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for MORICHE project.",
        "label": "MORICHE, Project [Member]",
        "terseLabel": "MORICHE"
       }
      }
     },
     "auth_ref": []
    },
    "ec_NareProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "NareProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for NARE project.",
        "label": "NARE, Project [Member]",
        "terseLabel": "NARE"
       }
      }
     },
     "auth_ref": []
    },
    "ec_NareSurProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "NareSurProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for NARE SUR project.",
        "label": "NARE SUR, Project [Member]",
        "terseLabel": "NARE SUR"
       }
      }
     },
     "auth_ref": []
    },
    "ec_NutriaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "NutriaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for NUTRIA project.",
        "label": "NUTRIA, Project [Member]",
        "terseLabel": "NUTRIA"
       }
      }
     },
     "auth_ref": []
    },
    "ec_OleoductoCentralSaMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "OleoductoCentralSaMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/Detail"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This member stands for Oleoducto Central SA.",
        "label": "Oleoducto Central SA [Member]",
        "terseLabel": "Oleoducto Central S.A."
       }
      }
     },
     "auth_ref": []
    },
    "ec_OleoductoDeColombiaS.a.Member": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "OleoductoDeColombiaS.a.Member",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByCategory",
      "http://xbrl.sec.gov/rxp/role/ByGovernment",
      "http://xbrl.sec.gov/rxp/role/ByProject",
      "http://xbrl.sec.gov/rxp/role/Detail"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This member stands for Oleoducto de Colombia S.A.",
        "label": "Oleoducto de Colombia S.A. [Member]",
        "terseLabel": "Oleoducto de Colombia S.A."
       }
      }
     },
     "auth_ref": []
    },
    "ec_OleoductoDeLosLlanosS.a.Member": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "OleoductoDeLosLlanosS.a.Member",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByCategory",
      "http://xbrl.sec.gov/rxp/role/ByGovernment",
      "http://xbrl.sec.gov/rxp/role/ByProject",
      "http://xbrl.sec.gov/rxp/role/Detail"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This member stands for Oleoducto de los Llanos S.A.",
        "label": "Oleoducto de los Llanos S.A. [Member]",
        "terseLabel": "Oleoducto de los Llanos S.A."
       }
      }
     },
     "auth_ref": []
    },
    "ec_OripayaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "OripayaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for Oripaya project.",
        "label": "Oripaya, Project [Member]",
        "terseLabel": "Oripaya"
       }
      }
     },
     "auth_ref": []
    },
    "ec_OritoProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "OritoProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for ORITO project.",
        "label": "ORITO, Project [Member]",
        "terseLabel": "ORITO"
       }
      }
     },
     "auth_ref": []
    },
    "ec_OrtegaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "OrtegaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for Ortega project.",
        "label": "Ortega, Project [Member]",
        "terseLabel": "Ortega"
       }
      }
     },
     "auth_ref": []
    },
    "rxp_P": {
     "xbrltype": "enumerationItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "P",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/Detail"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Payment Type",
        "terseLabel": "Type"
       }
      }
     },
     "auth_ref": [
      "r1"
     ]
    },
    "ec_PachaquiaroProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "PachaquiaroProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for PACHAQUIARO project.",
        "label": "PACHAQUIARO, Project [Member]",
        "terseLabel": "PACHAQUIARO"
       }
      }
     },
     "auth_ref": []
    },
    "ec_PalaguaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "PalaguaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for PALAGUA project.",
        "label": "PALAGUA, Project [Member]",
        "terseLabel": "PALAGUA"
       }
      }
     },
     "auth_ref": []
    },
    "ec_PalermoSantaClaraUnificadoProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "PalermoSantaClaraUnificadoProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for PALERMO - SANTA CLARA UNIFICADO project.",
        "label": "PALERMO - SANTA CLARA UNIFICADO, Project [Member]",
        "terseLabel": "PALERMO - SANTA CLARA UNIFICADO"
       }
      }
     },
     "auth_ref": []
    },
    "ec_PalograndeProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "PalograndeProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for PALOGRANDE project.",
        "label": "PALOGRANDE, Project [Member]",
        "terseLabel": "PALOGRANDE"
       }
      }
     },
     "auth_ref": []
    },
    "ec_PautoSurProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "PautoSurProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for PAUTO SUR project.",
        "label": "PAUTO SUR, Project [Member]",
        "terseLabel": "PAUTO SUR"
       }
      }
     },
     "auth_ref": []
    },
    "rxp_PaymentsByCategoryTable": {
     "xbrltype": "stringItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "PaymentsByCategoryTable",
     "lang": {
      "en-us": {
       "role": {
        "label": "Payments by Category [Table]",
        "terseLabel": "Payments:"
       }
      }
     },
     "auth_ref": [
      "r3"
     ]
    },
    "rxp_PaymentsByGovernmentTable": {
     "xbrltype": "stringItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "PaymentsByGovernmentTable",
     "lang": {
      "en-us": {
       "role": {
        "label": "Payments by Government [Table]",
        "terseLabel": "Payments, by Government:"
       }
      }
     },
     "auth_ref": [
      "r2"
     ]
    },
    "rxp_PaymentsByProjectTable": {
     "xbrltype": "stringItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "PaymentsByProjectTable",
     "lang": {
      "en-us": {
       "role": {
        "label": "Payments by Project [Table]",
        "terseLabel": "Payments, by Project:"
       }
      }
     },
     "auth_ref": [
      "r1"
     ]
    },
    "rxp_PaymentsDetailTable": {
     "xbrltype": "stringItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "PaymentsDetailTable",
     "lang": {
      "en-us": {
       "role": {
        "label": "Payments Detail [Table]",
        "terseLabel": "Payments Detail:"
       }
      }
     },
     "auth_ref": [
      "r1"
     ]
    },
    "rxp_PaymentsLineItems": {
     "xbrltype": "stringItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "PaymentsLineItems",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByCategory",
      "http://xbrl.sec.gov/rxp/role/ByGovernment",
      "http://xbrl.sec.gov/rxp/role/ByProject",
      "http://xbrl.sec.gov/rxp/role/Detail"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Payments [Line Items]",
        "terseLabel": "Payments:"
       }
      }
     },
     "auth_ref": [
      "r1"
     ]
    },
    "ec_PayoaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "PayoaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for Payoa project.",
        "label": "Payoa, Project [Member]",
        "terseLabel": "Payoa"
       }
      }
     },
     "auth_ref": []
    },
    "ec_PenasBlancasProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "PenasBlancasProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for PENAS BLANCAS project.",
        "label": "PENAS BLANCAS, Project [Member]",
        "terseLabel": "PENAS BLANCAS"
       }
      }
     },
     "auth_ref": []
    },
    "ec_PintadoProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "PintadoProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for Pintado project.",
        "label": "Pintado, Project [Member]",
        "terseLabel": "Pintado"
       }
      }
     },
     "auth_ref": []
    },
    "rxp_PmtAxis": {
     "xbrltype": "stringItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "PmtAxis",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/Detail"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Pmt [Axis]",
        "terseLabel": "#"
       }
      }
     },
     "auth_ref": [
      "r14"
     ]
    },
    "ec_PompeyaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "PompeyaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for POMPEYA project.",
        "label": "POMPEYA, Project [Member]",
        "terseLabel": "POMPEYA"
       }
      }
     },
     "auth_ref": []
    },
    "rxp_Pr": {
     "xbrltype": "enumerationItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "Pr",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/Detail"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Project",
        "terseLabel": "Project"
       }
      }
     },
     "auth_ref": [
      "r7"
     ]
    },
    "rxp_ProductionEntitlements": {
     "xbrltype": "monetaryItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "ProductionEntitlements",
     "crdr": "debit",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByCategory",
      "http://xbrl.sec.gov/rxp/role/ByGovernment",
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Production Entitlements",
        "terseLabel": "Prod. Entitlements"
       }
      }
     },
     "auth_ref": [
      "r18"
     ]
    },
    "rxp_ProjectAxis": {
     "xbrltype": "stringItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "ProjectAxis",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Project [Axis]",
        "terseLabel": "Project:"
       }
      }
     },
     "auth_ref": [
      "r11"
     ]
    },
    "ec_ProvinciaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "ProvinciaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for PROVINCIA project.",
        "label": "PROVINCIA, Project [Member]",
        "terseLabel": "PROVINCIA"
       }
      }
     },
     "auth_ref": []
    },
    "ec_QuriyanaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "QuriyanaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for QURIYANA project.",
        "label": "QURIYANA, Project [Member]",
        "terseLabel": "QURIYANA"
       }
      }
     },
     "auth_ref": []
    },
    "rxp_R": {
     "xbrltype": "enumerationItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "R",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/Detail"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Resource",
        "terseLabel": "Resource"
       }
      }
     },
     "auth_ref": [
      "r4"
     ]
    },
    "ec_RecetorWestProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "RecetorWestProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for RECETOR WEST project.",
        "label": "RECETOR WEST, Project [Member]",
        "terseLabel": "RECETOR WEST"
       }
      }
     },
     "auth_ref": []
    },
    "ec_RioCeibasProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "RioCeibasProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for RIO CEIBAS project.",
        "label": "RIO CEIBAS, Project [Member]",
        "terseLabel": "RIO CEIBAS"
       }
      }
     },
     "auth_ref": []
    },
    "ec_RioSaldanaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "RioSaldanaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for Rio SaldaNa project.",
        "label": "Rio SaldaNa, Project [Member]",
        "terseLabel": "Rio Saldana"
       }
      }
     },
     "auth_ref": []
    },
    "rxp_Royalties": {
     "xbrltype": "monetaryItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "Royalties",
     "crdr": "debit",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByCategory",
      "http://xbrl.sec.gov/rxp/role/ByGovernment",
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Royalties",
        "terseLabel": "Royalties"
       }
      }
     },
     "auth_ref": [
      "r16"
     ]
    },
    "ec_RubialesProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "RubialesProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for RUBIALES project.",
        "label": "RUBIALES, Project [Member]",
        "terseLabel": "RUBIALES"
       }
      }
     },
     "auth_ref": []
    },
    "country_SG": {
     "xbrltype": "domainItemType",
     "nsuri": "http://xbrl.sec.gov/country/2025",
     "localname": "SG",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByGovernment"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "SINGAPORE",
        "terseLabel": "Singapur"
       }
      }
     },
     "auth_ref": []
    },
    "ec_SamanProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "SamanProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for Saman project.",
        "label": "Saman, Project [Member]",
        "terseLabel": "Saman"
       }
      }
     },
     "auth_ref": []
    },
    "ec_SanAntonioProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "SanAntonioProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for SAN ANTONIO project.",
        "label": "SAN ANTONIO, Project [Member]",
        "terseLabel": "SAN ANTONIO"
       }
      }
     },
     "auth_ref": []
    },
    "ec_SanFranciscoProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "SanFranciscoProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for SAN FRANCISCO project.",
        "label": "SAN FRANCISCO, Project [Member]",
        "terseLabel": "SAN FRANCISCO"
       }
      }
     },
     "auth_ref": []
    },
    "ec_SanRoqueProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "SanRoqueProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for SAN ROQUE project.",
        "label": "SAN ROQUE, Project [Member]",
        "terseLabel": "SAN ROQUE"
       }
      }
     },
     "auth_ref": []
    },
    "ec_SantaClaraProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "SantaClaraProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for SANTA CLARA project.",
        "label": "SANTA CLARA, Project [Member]",
        "verboseLabel": "SANTA CLARA,"
       }
      }
     },
     "auth_ref": []
    },
    "ec_SantiagoProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "SantiagoProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for  Santiago project.",
        "label": "Santiago, Project [Member]",
        "terseLabel": "Santiago"
       }
      }
     },
     "auth_ref": []
    },
    "ec_SardinataProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "SardinataProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for SARDINATA project.",
        "label": "SARDINATA, Project [Member]",
        "terseLabel": "SARDINATA"
       }
      }
     },
     "auth_ref": []
    },
    "ec_SaurioProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "SaurioProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for SAURIO project.",
        "label": "SAURIO, Project [Member]",
        "terseLabel": "SAURIO"
       }
      }
     },
     "auth_ref": []
    },
    "rxp_Sg": {
     "xbrltype": "enumerationItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "Sg",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/Detail"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Segment",
        "terseLabel": "Segment"
       }
      }
     },
     "auth_ref": [
      "r5"
     ]
    },
    "rxp_Sn": {
     "xbrltype": "enumerationItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "Sn",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/Detail"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Subnational Jurisdiction",
        "terseLabel": "Subnat. Juris."
       }
      }
     },
     "auth_ref": [
      "r9"
     ]
    },
    "ec_Sn18ProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "Sn18ProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for SN-18 project.",
        "label": "SN-18, Project [Member]",
        "verboseLabel": "SN-18"
       }
      }
     },
     "auth_ref": []
    },
    "ec_Ssjn1ProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "Ssjn1ProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for SSJN1 project.",
        "label": "SSJN1, Project [Member]",
        "terseLabel": "SSJN1"
       }
      }
     },
     "auth_ref": []
    },
    "ec_Ssjs1ProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "Ssjs1ProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for SSJS1 project.",
        "label": "SSJS1, Project [Member]",
        "terseLabel": "SSJS1"
       }
      }
     },
     "auth_ref": []
    },
    "ec_SucioProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "SucioProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for SUCIO project.",
        "label": "SUCIO, Project [Member]",
        "terseLabel": "SUCIO"
       }
      }
     },
     "auth_ref": []
    },
    "ec_SuriaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "SuriaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for SURIA project.",
        "label": "SURIA, Project [Member]",
        "terseLabel": "SURIA"
       }
      }
     },
     "auth_ref": []
    },
    "ec_SuriaSurProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "SuriaSurProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for SURIA SUR project.",
        "label": "SURIA SUR, Project [Member]",
        "terseLabel": "SURIA SUR"
       }
      }
     },
     "auth_ref": []
    },
    "ec_TauramenaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "TauramenaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This member stands for  Tauramena.",
        "label": "Tauramena Project [Member]",
        "terseLabel": "Tauramena"
       }
      }
     },
     "auth_ref": []
    },
    "rxp_Taxes": {
     "xbrltype": "monetaryItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "Taxes",
     "crdr": "debit",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByCategory",
      "http://xbrl.sec.gov/rxp/role/ByGovernment",
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Taxes",
        "terseLabel": "Taxes"
       }
      }
     },
     "auth_ref": [
      "r15"
     ]
    },
    "ec_TelloProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "TelloProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for TELLO project.",
        "label": "TELLO, Project [Member]",
        "terseLabel": "TELLO"
       }
      }
     },
     "auth_ref": []
    },
    "ec_TempranilloProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "TempranilloProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for TEMPRANILLO\n project.",
        "label": "TEMPRANILLO, Project [Member]",
        "verboseLabel": "TEMPRANILLO"
       }
      }
     },
     "auth_ref": []
    },
    "ec_TenayProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "TenayProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for TENAY project.",
        "label": "TENAY, Project [Member]",
        "terseLabel": "TENAY"
       }
      }
     },
     "auth_ref": []
    },
    "ec_TesoroProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "TesoroProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for TESORO project.",
        "label": "TESORO, Project [Member]",
        "terseLabel": "TESORO"
       }
      }
     },
     "auth_ref": []
    },
    "ec_TibuProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "TibuProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for TIBU project.",
        "label": "TIBU, Project [Member]",
        "terseLabel": "TIBU"
       }
      }
     },
     "auth_ref": []
    },
    "ec_TinamuProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "TinamuProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for TINAMU project.",
        "label": "TINAMU, Project [Member]",
        "terseLabel": "TINAMU"
       }
      }
     },
     "auth_ref": []
    },
    "ec_TisquiramaProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "TisquiramaProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for TISQUIRAMA project.",
        "label": "TISQUIRAMA, Project [Member]",
        "terseLabel": "TISQUIRAMA"
       }
      }
     },
     "auth_ref": []
    },
    "ec_ToldadoProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "ToldadoProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for Toldado project.",
        "label": "Toldado, Project [Member]",
        "terseLabel": "Toldado"
       }
      }
     },
     "auth_ref": []
    },
    "rxp_TotalPayments": {
     "xbrltype": "monetaryItemType",
     "nsuri": "http://xbrl.sec.gov/rxp/2025",
     "localname": "TotalPayments",
     "crdr": "debit",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByCategory",
      "http://xbrl.sec.gov/rxp/role/ByGovernment",
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Total Payments",
        "terseLabel": "Total Payments"
       }
      }
     },
     "auth_ref": [
      "r14"
     ]
    },
    "ec_TotareProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "TotareProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for Totare project.",
        "label": "Totare, Project [Member]",
        "terseLabel": "Totare"
       }
      }
     },
     "auth_ref": []
    },
    "ec_TransitionEnergiesMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "TransitionEnergiesMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByCategory",
      "http://xbrl.sec.gov/rxp/role/ByGovernment",
      "http://xbrl.sec.gov/rxp/role/ByProject",
      "http://xbrl.sec.gov/rxp/role/Detail"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This member stands for Transition Energies.",
        "label": "Transition Energies [Member]",
        "terseLabel": "Transition Energies"
       }
      }
     },
     "auth_ref": []
    },
    "country_US": {
     "xbrltype": "domainItemType",
     "nsuri": "http://xbrl.sec.gov/country/2025",
     "localname": "US",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByGovernment"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "UNITED STATES",
        "terseLabel": "United States"
       }
      }
     },
     "auth_ref": []
    },
    "ec_UnderriverProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "UnderriverProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for UNDERRIVER project.",
        "label": "UNDERRIVER, Project [Member]",
        "terseLabel": "UNDERRIVER"
       }
      }
     },
     "auth_ref": []
    },
    "ec_UnificadoPalograndeProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "UnificadoPalograndeProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for UNIFICADO PALOGRANDE project.",
        "label": "UNIFICADO PALOGRANDE, Project [Member]",
        "terseLabel": "UNIFICADO PALOGRANDE"
       }
      }
     },
     "auth_ref": []
    },
    "ec_UpstreamMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "UpstreamMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByCategory",
      "http://xbrl.sec.gov/rxp/role/ByGovernment",
      "http://xbrl.sec.gov/rxp/role/ByProject",
      "http://xbrl.sec.gov/rxp/role/Detail"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This member stands for Upstream.",
        "label": "Upstream [Member]",
        "terseLabel": "Upstream"
       }
      }
     },
     "auth_ref": []
    },
    "ec_Vmm141ProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "Vmm141ProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for VMM 14-1 project.",
        "label": "VMM 14-1, Project [Member]",
        "terseLabel": "VMM 14-1"
       }
      }
     },
     "auth_ref": []
    },
    "ec_Vmm65ProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "Vmm65ProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for VMM 65 project.",
        "label": "VMM 65, Project [Member]",
        "terseLabel": "VMM-65"
       }
      }
     },
     "auth_ref": []
    },
    "ec_YaguaraProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "YaguaraProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This members stands for YAGUARA project.",
        "label": "YAGUARA, Project [Member]",
        "terseLabel": "YAGUARA"
       }
      }
     },
     "auth_ref": []
    },
    "ec_YariguiProjectMember": {
     "xbrltype": "domainItemType",
     "nsuri": "http://www.ecopetrol.com/20251231",
     "localname": "YariguiProjectMember",
     "presentation": [
      "http://xbrl.sec.gov/rxp/role/ByProject"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This member stands for YARIGUI project.",
        "label": "YARIGUI, Project [Member]",
        "terseLabel": "YARIGUI"
       }
      }
     },
     "auth_ref": []
    }
   }
  }
 },
 "std_ref": {
  "r0": {
   "role": "http://www.xbrl.org/2003/role/presentationRef",
   "Publisher": "SEC",
   "Name": "Exchange Act",
   "Number": "240",
   "Section": "12",
   "Subsection": "b-2"
  },
  "r1": {
   "role": "http://www.xbrl.org/2003/role/presentationRef",
   "Publisher": "SEC",
   "Name": "Form SD",
   "Section": "2.01",
   "Subsection": "a",
   "Paragraph": "5"
  },
  "r2": {
   "role": "http://www.xbrl.org/2003/role/presentationRef",
   "Publisher": "SEC",
   "Name": "Form SD",
   "Section": "2.01",
   "Subsection": "a",
   "Paragraph": "5",
   "Subparagraph": "ii"
  },
  "r3": {
   "role": "http://www.xbrl.org/2003/role/presentationRef",
   "Publisher": "SEC",
   "Name": "Form SD",
   "Section": "2.01",
   "Subsection": "a",
   "Paragraph": "5",
   "Subparagraph": "iii"
  },
  "r4": {
   "role": "http://www.xbrl.org/2003/role/presentationRef",
   "Publisher": "SEC",
   "Name": "Form SD",
   "Section": "2.01",
   "Subsection": "a",
   "Paragraph": "5",
   "Subparagraph": "ix"
  },
  "r5": {
   "role": "http://www.xbrl.org/2003/role/presentationRef",
   "Publisher": "SEC",
   "Name": "Form SD",
   "Section": "2.01",
   "Subsection": "a",
   "Paragraph": "5",
   "Subparagraph": "vi"
  },
  "r6": {
   "role": "http://www.xbrl.org/2003/role/presentationRef",
   "Publisher": "SEC",
   "Name": "Form SD",
   "Section": "2.01",
   "Subsection": "a",
   "Paragraph": "5",
   "Subparagraph": "vii"
  },
  "r7": {
   "role": "http://www.xbrl.org/2003/role/presentationRef",
   "Publisher": "SEC",
   "Name": "Form SD",
   "Section": "2.01",
   "Subsection": "a",
   "Paragraph": "5",
   "Subparagraph": "viii"
  },
  "r8": {
   "role": "http://www.xbrl.org/2003/role/presentationRef",
   "Publisher": "SEC",
   "Name": "Form SD",
   "Section": "2.01",
   "Subsection": "a",
   "Paragraph": "5",
   "Subparagraph": "x"
  },
  "r9": {
   "role": "http://www.xbrl.org/2003/role/presentationRef",
   "Publisher": "SEC",
   "Name": "Form SD",
   "Section": "2.01",
   "Subsection": "a",
   "Paragraph": "5",
   "Subparagraph": "xi"
  },
  "r10": {
   "role": "http://www.xbrl.org/2003/role/presentationRef",
   "Publisher": "SEC",
   "Name": "Form SD",
   "Section": "2.01",
   "Subsection": "c"
  },
  "r11": {
   "role": "http://www.xbrl.org/2003/role/presentationRef",
   "Publisher": "SEC",
   "Name": "Form SD",
   "Section": "2.01",
   "Subsection": "d",
   "Paragraph": "10"
  },
  "r12": {
   "role": "http://www.xbrl.org/2003/role/presentationRef",
   "Publisher": "SEC",
   "Name": "Form SD",
   "Section": "2.01",
   "Subsection": "d",
   "Paragraph": "6"
  },
  "r13": {
   "role": "http://www.xbrl.org/2003/role/presentationRef",
   "Publisher": "SEC",
   "Name": "Form SD",
   "Section": "2.01",
   "Subsection": "d",
   "Paragraph": "7"
  },
  "r14": {
   "role": "http://www.xbrl.org/2003/role/presentationRef",
   "Publisher": "SEC",
   "Name": "Form SD",
   "Section": "2.01",
   "Subsection": "d",
   "Paragraph": "9"
  },
  "r15": {
   "role": "http://www.xbrl.org/2003/role/presentationRef",
   "Publisher": "SEC",
   "Name": "Form SD",
   "Section": "2.01",
   "Subsection": "d",
   "Paragraph": "9",
   "Subparagraph": "iii",
   "Clause": "A"
  },
  "r16": {
   "role": "http://www.xbrl.org/2003/role/presentationRef",
   "Publisher": "SEC",
   "Name": "Form SD",
   "Section": "2.01",
   "Subsection": "d",
   "Paragraph": "9",
   "Subparagraph": "iii",
   "Clause": "B"
  },
  "r17": {
   "role": "http://www.xbrl.org/2003/role/presentationRef",
   "Publisher": "SEC",
   "Name": "Form SD",
   "Section": "2.01",
   "Subsection": "d",
   "Paragraph": "9",
   "Subparagraph": "iii",
   "Clause": "C"
  },
  "r18": {
   "role": "http://www.xbrl.org/2003/role/presentationRef",
   "Publisher": "SEC",
   "Name": "Form SD",
   "Section": "2.01",
   "Subsection": "d",
   "Paragraph": "9",
   "Subparagraph": "iii",
   "Clause": "D"
  },
  "r19": {
   "role": "http://www.xbrl.org/2003/role/presentationRef",
   "Publisher": "SEC",
   "Name": "Form SD",
   "Section": "2.01",
   "Subsection": "d",
   "Paragraph": "9",
   "Subparagraph": "iii",
   "Clause": "E"
  },
  "r20": {
   "role": "http://www.xbrl.org/2003/role/presentationRef",
   "Publisher": "SEC",
   "Name": "Form SD",
   "Section": "2.01",
   "Subsection": "d",
   "Paragraph": "9",
   "Subparagraph": "iii",
   "Clause": "F"
  },
  "r21": {
   "role": "http://www.xbrl.org/2003/role/presentationRef",
   "Publisher": "SEC",
   "Name": "Form SD",
   "Section": "2.01",
   "Subsection": "d",
   "Paragraph": "9",
   "Subparagraph": "iii",
   "Clause": "G"
  },
  "r22": {
   "role": "http://www.xbrl.org/2003/role/presentationRef",
   "Publisher": "SEC",
   "Name": "Form SD",
   "Section": "2.01",
   "Subsection": "d",
   "Paragraph": "9",
   "Subparagraph": "iii",
   "Clause": "H"
  },
  "r23": {
   "role": "http://www.xbrl.org/2003/role/presentationRef",
   "Publisher": "SEC",
   "Name": "Form SD",
   "Section": "2.01",
   "Subsection": "instruction",
   "Paragraph": "12"
  },
  "r24": {
   "role": "http://www.xbrl.org/2003/role/presentationRef",
   "Publisher": "SEC",
   "Name": "Form SD",
   "Section": "2.01",
   "Subsection": "instruction",
   "Paragraph": "2"
  },
  "r25": {
   "role": "http://www.xbrl.org/2003/role/presentationRef",
   "Publisher": "SEC",
   "Name": "Form SD",
   "Section": "2.01",
   "Subsection": "instruction",
   "Paragraph": "3",
   "Subparagraph": "iii"
  }
 }
}
