<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.25.4</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>380</ContextCount>
  <ElementCount>534</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>105</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>13</UnitCount>
  <MyReports>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>995200090 - Document - Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DocumentDocumentAndEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>995200100 - Statement - CONSOLIDATED BALANCE SHEETS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/StatementConsolidatedBalanceSheets</Role>
      <ShortName>CONSOLIDATED BALANCE SHEETS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>995200105 - Statement - CONSOLIDATED BALANCE SHEETS (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/StatementConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>CONSOLIDATED BALANCE SHEETS (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>995200200 - Statement - CONSOLIDATED STATEMENTS OF COMPREHENSIVE (LOSS) INCOME</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/StatementConsolidatedStatementsOfComprehensiveLossIncome</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF COMPREHENSIVE (LOSS) INCOME</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>995200205 - Statement - CONSOLIDATED STATEMENTS OF COMPREHENSIVE (LOSS) INCOME (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/StatementConsolidatedStatementsOfComprehensiveLossIncomeParenthetical</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF COMPREHENSIVE (LOSS) INCOME (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>995200300 - Statement - CONSOLIDATED STATEMENTS OF CHANGES IN STOCKHOLDERS' EQUITY (DEFICIT)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/StatementConsolidatedStatementsOfChangesInStockholdersEquityDeficit</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF CHANGES IN STOCKHOLDERS' EQUITY (DEFICIT)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>995200400 - Statement - CONSOLIDATED STATEMENTS OF CASH FLOWS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/StatementConsolidatedStatementsOfCashFlows</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF CASH FLOWS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>995200405 - Statement - CONSOLIDATED STATEMENTS OF CASH FLOWS (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/StatementConsolidatedStatementsOfCashFlowsParenthetical</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF CASH FLOWS (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>995210101 - Disclosure - Description of the business and summary of significant accounting policies:</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessAndSummaryOfSignificantAccountingPolicies</Role>
      <ShortName>Description of the business and summary of significant accounting policies:</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>995210201 - Disclosure - Property and equipment:</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosurePropertyAndEquipment</Role>
      <ShortName>Property and equipment:</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>995210301 - Disclosure - Accrued and other liabilities and prepaid expenses and other current assets:</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureAccruedAndOtherLiabilitiesAndPrepaidExpensesAndOtherCurrentAssets</Role>
      <ShortName>Accrued and other liabilities and prepaid expenses and other current assets:</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>995210401 - Disclosure - Long-term debt:</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureLongTermDebt</Role>
      <ShortName>Long-term debt:</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>995210501 - Disclosure - Income taxes:</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureIncomeTaxes</Role>
      <ShortName>Income taxes:</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>995210601 - Disclosure - Commitments and contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureCommitmentsAndContingencies</Role>
      <ShortName>Commitments and contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>995210701 - Disclosure - Stockholders' equity:</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureStockholdersEquity</Role>
      <ShortName>Stockholders' equity:</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>995210801 - Disclosure - Stock option and award plan:</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureStockOptionAndAwardPlan</Role>
      <ShortName>Stock option and award plan:</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>995210901 - Disclosure - Related party transactions:</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureRelatedPartyTransactions</Role>
      <ShortName>Related party transactions:</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>995211001 - Disclosure - Geographic and segment information:</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureGeographicAndSegmentInformation</Role>
      <ShortName>Geographic and segment information:</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>995211101 - Disclosure - Subsequent Events:</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureSubsequentEvents</Role>
      <ShortName>Subsequent Events:</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>995211201 - Disclosure - Schedule II VALUATION AND QUALIFYING ACCOUNTS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureScheduleIiValuationAndQualifyingAccounts</Role>
      <ShortName>Schedule II VALUATION AND QUALIFYING ACCOUNTS</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>995410 - Disclosure - Pay vs Performance Disclosure</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/PvpDisclosure</Role>
      <ShortName>Pay vs Performance Disclosure</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>995445 - Disclosure - Insider Trading Arrangements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/InsiderTradingArrangements</Role>
      <ShortName>Insider Trading Arrangements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>995447 - Disclosure - Insider Trading Policies and Procedures</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/InsiderTradingPoliciesProc</Role>
      <ShortName>Insider Trading Policies and Procedures</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>995550 - Disclosure - Cybersecurity Risk Management and Strategy Disclosure</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/cyd/role/CybersecurityRiskManagementAndStrategyDisclosure</Role>
      <ShortName>Cybersecurity Risk Management and Strategy Disclosure</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>99920102 - Disclosure - Description of the business and summary of significant accounting policies: (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessAndSummaryOfSignificantAccountingPoliciesPolicies</Role>
      <ShortName>Description of the business and summary of significant accounting policies: (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <Position>25</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>99930103 - Disclosure - Description of the business and summary of significant accounting policies: (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessAndSummaryOfSignificantAccountingPoliciesTables</Role>
      <ShortName>Description of the business and summary of significant accounting policies: (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessAndSummaryOfSignificantAccountingPolicies</ParentRole>
      <Position>26</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>99930203 - Disclosure - Property and equipment: (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosurePropertyAndEquipmentTables</Role>
      <ShortName>Property and equipment: (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cogentco.com/role/DisclosurePropertyAndEquipment</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>99930303 - Disclosure - Accrued and other liabilities and prepaid expenses and other current assets: (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureAccruedAndOtherLiabilitiesAndPrepaidExpensesAndOtherCurrentAssetsTables</Role>
      <ShortName>Accrued and other liabilities and prepaid expenses and other current assets: (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cogentco.com/role/DisclosureAccruedAndOtherLiabilitiesAndPrepaidExpensesAndOtherCurrentAssets</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>99930403 - Disclosure - Long-term debt: (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureLongTermDebtTables</Role>
      <ShortName>Long-term debt: (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cogentco.com/role/DisclosureLongTermDebt</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>99930503 - Disclosure - Income taxes: (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureIncomeTaxesTables</Role>
      <ShortName>Income taxes: (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cogentco.com/role/DisclosureIncomeTaxes</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>99930603 - Disclosure - Commitments and contingencies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureCommitmentsAndContingenciesTables</Role>
      <ShortName>Commitments and contingencies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cogentco.com/role/DisclosureCommitmentsAndContingencies</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>99930803 - Disclosure - Stock option and award plan: (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureStockOptionAndAwardPlanTables</Role>
      <ShortName>Stock option and award plan: (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cogentco.com/role/DisclosureStockOptionAndAwardPlan</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>99931003 - Disclosure - Geographic and segment information: (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureGeographicAndSegmentInformationTables</Role>
      <ShortName>Geographic and segment information: (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cogentco.com/role/DisclosureGeographicAndSegmentInformation</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>99940101 - Disclosure - Description of the business and summary of significant accounting policies: (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessAndSummaryOfSignificantAccountingPoliciesDetails</Role>
      <ShortName>Description of the business and summary of significant accounting policies: (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessAndSummaryOfSignificantAccountingPoliciesTables</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>99940102 - Disclosure - Description of the business and summary of significant accounting policies: - Acquisition of Sprint Communications - Consideration (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessAndSummaryOfSignificantAccountingPoliciesAcquisitionOfSprintCommunicationsConsiderationDetails</Role>
      <ShortName>Description of the business and summary of significant accounting policies: - Acquisition of Sprint Communications - Consideration (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>35</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>99940103 - Disclosure - Description of the business and summary of significant accounting policies: - Acquisition of Sprint Communications - Fair Value of Assets Acquired and Liabilities Assumed and Gain on Bargain Purchase (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessAndSummaryOfSignificantAccountingPoliciesAcquisitionOfSprintCommunicationsFairValueOfAssetsAcquiredAndLiabilitiesAssumedAndGainOnBargainPurchaseDetails</Role>
      <ShortName>Description of the business and summary of significant accounting policies: - Acquisition of Sprint Communications - Fair Value of Assets Acquired and Liabilities Assumed and Gain on Bargain Purchase (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>36</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>99940104 - Disclosure - Description of the business and summary of significant accounting policies: - Acquisition of Sprint Communications - Asset Retirement Obligations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessAndSummaryOfSignificantAccountingPoliciesAcquisitionOfSprintCommunicationsAssetRetirementObligationsDetails</Role>
      <ShortName>Description of the business and summary of significant accounting policies: - Acquisition of Sprint Communications - Asset Retirement Obligations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>37</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>99940105 - Disclosure - Description of the business and summary of significant accounting policies: - Allowance for credit losses (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessAndSummaryOfSignificantAccountingPoliciesAllowanceForCreditLossesDetails</Role>
      <ShortName>Description of the business and summary of significant accounting policies: - Allowance for credit losses (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>38</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>99940106 - Disclosure - Description of the business and summary of significant accounting policies: - Allowance for credit losses - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessAndSummaryOfSignificantAccountingPoliciesAllowanceForCreditLossesNarrativeDetails</Role>
      <ShortName>Description of the business and summary of significant accounting policies: - Allowance for credit losses - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>39</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>99940107 - Disclosure - Description of the business and summary of significant accounting policies: - Lessor Accounting and Leases (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessAndSummaryOfSignificantAccountingPoliciesLessorAccountingAndLeasesDetails</Role>
      <ShortName>Description of the business and summary of significant accounting policies: - Lessor Accounting and Leases (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>40</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>99940108 - Disclosure - Description of the business and summary of significant accounting policies: - IRU finance lease termination - discount and gain on lease termination (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessAndSummaryOfSignificantAccountingPoliciesIruFinanceLeaseTerminationDiscountAndGainOnLeaseTerminationDetails</Role>
      <ShortName>Description of the business and summary of significant accounting policies: - IRU finance lease termination - discount and gain on lease termination (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>41</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>99940109 - Disclosure - Description of the business and summary of significant accounting policies: - Revenue recognition (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessAndSummaryOfSignificantAccountingPoliciesRevenueRecognitionDetails</Role>
      <ShortName>Description of the business and summary of significant accounting policies: - Revenue recognition (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>42</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>99940110 - Disclosure - Description of the business and summary of significant accounting policies: - Gross receipts taxes, universal service fund and other surcharges (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessAndSummaryOfSignificantAccountingPoliciesGrossReceiptsTaxesUniversalServiceFundAndOtherSurchargesDetails</Role>
      <ShortName>Description of the business and summary of significant accounting policies: - Gross receipts taxes, universal service fund and other surcharges (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>99940111 - Disclosure - Description of the business and summary of significant accounting policies: - Financial instruments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessAndSummaryOfSignificantAccountingPoliciesFinancialInstrumentsDetails</Role>
      <ShortName>Description of the business and summary of significant accounting policies: - Financial instruments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>99940112 - Disclosure - Description of the business and summary of significant accounting policies: - Restricted cash and interest rate swap agreement (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessAndSummaryOfSignificantAccountingPoliciesRestrictedCashAndInterestRateSwapAgreementDetails</Role>
      <ShortName>Description of the business and summary of significant accounting policies: - Restricted cash and interest rate swap agreement (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>45</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>99940113 - Disclosure - Description of the business and summary of significant accounting policies: - Property and equipment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessAndSummaryOfSignificantAccountingPoliciesPropertyAndEquipmentDetails</Role>
      <ShortName>Description of the business and summary of significant accounting policies: - Property and equipment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>46</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>99940114 - Disclosure - Description of the business and summary of significant accounting policies: - Change in estimated useful life - owned fiber (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessAndSummaryOfSignificantAccountingPoliciesChangeInEstimatedUsefulLifeOwnedFiberDetails</Role>
      <ShortName>Description of the business and summary of significant accounting policies: - Change in estimated useful life - owned fiber (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>47</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>99940115 - Disclosure - Description of the business and summary of significant accounting policies: - Basic and diluted net income per common share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessAndSummaryOfSignificantAccountingPoliciesBasicAndDilutedNetIncomePerCommonShareDetails</Role>
      <ShortName>Description of the business and summary of significant accounting policies: - Basic and diluted net income per common share (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>99940201 - Disclosure - Property and equipment: (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosurePropertyAndEquipmentDetails</Role>
      <ShortName>Property and equipment: (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cogentco.com/role/DisclosurePropertyAndEquipmentTables</ParentRole>
      <Position>49</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>99940301 - Disclosure - Accrued and other liabilities and prepaid expenses and other current assets: (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureAccruedAndOtherLiabilitiesAndPrepaidExpensesAndOtherCurrentAssetsDetails</Role>
      <ShortName>Accrued and other liabilities and prepaid expenses and other current assets: (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cogentco.com/role/DisclosureAccruedAndOtherLiabilitiesAndPrepaidExpensesAndOtherCurrentAssetsTables</ParentRole>
      <Position>50</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>99940302 - Disclosure - Accrued and other liabilities and prepaid expenses and other current assets: - Prepaid expenses and other current assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureAccruedAndOtherLiabilitiesAndPrepaidExpensesAndOtherCurrentAssetsPrepaidExpensesAndOtherCurrentAssetsDetails</Role>
      <ShortName>Accrued and other liabilities and prepaid expenses and other current assets: - Prepaid expenses and other current assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>51</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>99940401 - Disclosure - Long-term debt: (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureLongTermDebtDetails</Role>
      <ShortName>Long-term debt: (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cogentco.com/role/DisclosureLongTermDebtTables</ParentRole>
      <Position>52</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>99940402 - Disclosure - Long-term debt: - Limitations under the Indentures (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureLongTermDebtLimitationsUnderIndenturesDetails</Role>
      <ShortName>Long-term debt: - Limitations under the Indentures (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>53</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>99940403 - Disclosure - Long-term debt: - Long-term debt maturities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureLongTermDebtLongTermDebtMaturitiesDetails</Role>
      <ShortName>Long-term debt: - Long-term debt maturities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>54</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>99940501 - Disclosure - Income taxes: - The components of loss before income taxes (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureIncomeTaxesComponentsOfLossBeforeIncomeTaxesDetails</Role>
      <ShortName>Income taxes: - The components of loss before income taxes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>55</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>99940502 - Disclosure - Income taxes: - Income tax expense (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureIncomeTaxesIncomeTaxExpenseDetails</Role>
      <ShortName>Income taxes: - Income tax expense (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>56</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>99940503 - Disclosure - Income taxes: - Temporary differences (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureIncomeTaxesTemporaryDifferencesDetails</Role>
      <ShortName>Income taxes: - Temporary differences (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>57</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>99940504 - Disclosure - Income taxes: - Loss carry-forwards (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureIncomeTaxesLossCarryForwardsDetails</Role>
      <ShortName>Income taxes: - Loss carry-forwards (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>58</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>99940505 - Disclosure - Income taxes: - Effective income tax rate reconciliation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureIncomeTaxesEffectiveIncomeTaxRateReconciliationDetails</Role>
      <ShortName>Income taxes: - Effective income tax rate reconciliation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>59</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>99940506 - Disclosure - Income taxes: - Income tax paid, net of refunds (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureIncomeTaxesIncomeTaxPaidNetOfRefundsDetails</Role>
      <ShortName>Income taxes: - Income tax paid, net of refunds (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>60</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>99940601 - Disclosure - Commitments and contingencies - Current and potential litigation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureCommitmentsAndContingenciesCurrentAndPotentialLitigationDetails</Role>
      <ShortName>Commitments and contingencies - Current and potential litigation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>61</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>99940602 - Disclosure - Commitments and contingencies - Capital leases - future minimum payments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureCommitmentsAndContingenciesCapitalLeasesFutureMinimumPaymentsDetails</Role>
      <ShortName>Commitments and contingencies - Capital leases - future minimum payments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>62</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>99940603 - Disclosure - Commitments and contingencies - Unconditional purchase obligations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureCommitmentsAndContingenciesUnconditionalPurchaseObligationsDetails</Role>
      <ShortName>Commitments and contingencies - Unconditional purchase obligations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>63</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>99940604 - Disclosure - Commitments and contingencies - Defined contribution plan (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureCommitmentsAndContingenciesDefinedContributionPlanDetails</Role>
      <ShortName>Commitments and contingencies - Defined contribution plan (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>64</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>99940701 - Disclosure - Stockholders' equity: Authorized shares (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureStockholdersEquityAuthorizedSharesDetails</Role>
      <ShortName>Stockholders' equity: Authorized shares (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>65</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>99940702 - Disclosure - Stockholders' equity: Common stock buyback program (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureStockholdersEquityCommonStockBuybackProgramDetails</Role>
      <ShortName>Stockholders' equity: Common stock buyback program (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>66</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>99940801 - Disclosure - Stock option and award plan: Incentive award plan (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureStockOptionAndAwardPlanIncentiveAwardPlanDetails</Role>
      <ShortName>Stock option and award plan: Incentive award plan (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>67</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>99940802 - Disclosure - Stock option and award plan: Incentive award plan fair value assumptions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureStockOptionAndAwardPlanIncentiveAwardPlanFairValueAssumptionsDetails</Role>
      <ShortName>Stock option and award plan: Incentive award plan fair value assumptions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>68</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>99940803 - Disclosure - Stock option and award plan: Incentive award plan - activity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureStockOptionAndAwardPlanIncentiveAwardPlanActivityDetails</Role>
      <ShortName>Stock option and award plan: Incentive award plan - activity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>69</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>99940804 - Disclosure - Stock option and award plan: Non-vested restricted stock (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureStockOptionAndAwardPlanNonVestedRestrictedStockDetails</Role>
      <ShortName>Stock option and award plan: Non-vested restricted stock (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>70</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>99940805 - Disclosure - Stock option and award plan: Incentive award plan, additional information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureStockOptionAndAwardPlanIncentiveAwardPlanAdditionalInformationDetails</Role>
      <ShortName>Stock option and award plan: Incentive award plan, additional information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>71</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>99940901 - Disclosure - Related party transactions: (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureRelatedPartyTransactionsDetails</Role>
      <ShortName>Related party transactions: (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cogentco.com/role/DisclosureRelatedPartyTransactions</ParentRole>
      <Position>72</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>99941001 - Disclosure - Geographic and segment information: (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureGeographicAndSegmentInformationDetails</Role>
      <ShortName>Geographic and segment information: (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cogentco.com/role/DisclosureGeographicAndSegmentInformationTables</ParentRole>
      <Position>73</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>99941101 - Disclosure - Subsequent Events: (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureSubsequentEventsDetails</Role>
      <ShortName>Subsequent Events: (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cogentco.com/role/DisclosureSubsequentEvents</ParentRole>
      <Position>74</Position>
    </Report>
    <Report instance="ccoi-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R75.htm</HtmlFileName>
      <LongName>99941201 - Disclosure - Schedule II VALUATION AND QUALIFYING ACCOUNTS (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureScheduleIiValuationAndQualifyingAccountsDetails</Role>
      <ShortName>Schedule II VALUATION AND QUALIFYING ACCOUNTS (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cogentco.com/role/DisclosureScheduleIiValuationAndQualifyingAccounts</ParentRole>
      <Position>75</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File>ccoi-20251231.xsd</File>
    <File>ccoi-20251231_cal.xml</File>
    <File>ccoi-20251231_def.xml</File>
    <File>ccoi-20251231_lab.xml</File>
    <File>ccoi-20251231_pre.xml</File>
    <File doctype="10-K" isDefinitelyFs="true" isUsgaap="true" original="ccoi-20251231x10k.htm">ccoi-20251231x10k.htm</File>
  </InputFiles>
  <SupplementalFiles>
    <File>ccoi-20251231x10k002.jpg</File>
    <File>ccoi-20251231x10k003.jpg</File>
  </SupplementalFiles>
  <BaseTaxonomies>
    <BaseTaxonomy items="1">http://fasb.org/srt/2025</BaseTaxonomy>
    <BaseTaxonomy items="1014">http://fasb.org/us-gaap/2025</BaseTaxonomy>
    <BaseTaxonomy items="13">http://xbrl.sec.gov/cyd/2025</BaseTaxonomy>
    <BaseTaxonomy items="38">http://xbrl.sec.gov/dei/2025</BaseTaxonomy>
    <BaseTaxonomy items="5">http://xbrl.sec.gov/ecd/2025</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
