<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.24.3</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>312</ContextCount>
  <ElementCount>360</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>71</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>10</UnitCount>
  <MyReports>
    <Report instance="ccoi-20240930x10q.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-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>995200100 - Statement - CONDENSED CONSOLIDATED BALANCE SHEETS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/StatementCondensedConsolidatedBalanceSheets</Role>
      <ShortName>CONDENSED CONSOLIDATED BALANCE SHEETS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>995200105 - Statement - CONDENSED CONSOLIDATED BALANCE SHEETS (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/StatementCondensedConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>CONDENSED CONSOLIDATED BALANCE SHEETS (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>995200200 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF COMPREHENSIVE LOSS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/StatementCondensedConsolidatedStatementsOfComprehensiveLoss</Role>
      <ShortName>CONDENSED CONSOLIDATED STATEMENTS OF COMPREHENSIVE LOSS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>995200205 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF COMPREHENSIVE (LOSS) INCOME (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/StatementCondensedConsolidatedStatementsOfComprehensiveLossIncomeParenthetical</Role>
      <ShortName>CONDENSED CONSOLIDATED STATEMENTS OF COMPREHENSIVE (LOSS) INCOME (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>995200300 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/StatementCondensedConsolidatedStatementsOfCashFlows</Role>
      <ShortName>CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>995200305 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/StatementCondensedConsolidatedStatementsOfCashFlowsParenthetical</Role>
      <ShortName>CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>995210101 - Disclosure - Description of the business:</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusiness</Role>
      <ShortName>Description of the business:</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.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>9</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>995210301 - 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>10</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>995210401 - 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>11</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.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>12</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>995210601 - Disclosure - Common stock buyback program and stock options and award plan:</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureCommonStockBuybackProgramAndStockOptionsAndAwardPlan</Role>
      <ShortName>Common stock buyback program and stock options and award plan:</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>995210701 - Disclosure - Dividends on common stock:</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDividendsOnCommonStock</Role>
      <ShortName>Dividends on common stock:</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>995210801 - 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>15</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>995210901 - Disclosure - Segment information:</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureSegmentInformation</Role>
      <ShortName>Segment information:</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.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>17</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>99920102 - Disclosure - Description of the business: (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessPolicies</Role>
      <ShortName>Description of the business: (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>99930103 - Disclosure - Description of the business: (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessTables</Role>
      <ShortName>Description of the business: (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cogentco.com/role/DisclosureDescriptionOfBusiness</ParentRole>
      <Position>19</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.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>20</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.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>21</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>99931003 - Disclosure - Segment information: (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureSegmentInformationTables</Role>
      <ShortName>Segment information: (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cogentco.com/role/DisclosureSegmentInformation</ParentRole>
      <Position>22</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>99940101 - Disclosure - Description of the business: - Acquisition of Sprint Communications (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessAcquisitionOfSprintCommunicationsDetails</Role>
      <ShortName>Description of the business: - Acquisition of Sprint Communications (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>99940102 - Disclosure - Description of the business: - Acquisition of Sprint Communications - Consideration (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessAcquisitionOfSprintCommunicationsConsiderationDetails</Role>
      <ShortName>Description of the business: - Acquisition of Sprint Communications - Consideration (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>99940103 - Disclosure - Description of the business: - 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/DisclosureDescriptionOfBusinessAcquisitionOfSprintCommunicationsFairValueOfAssetsAcquiredAndLiabilitiesAssumedAndGainOnBargainPurchaseDetails</Role>
      <ShortName>Description of the business: - Acquisition of Sprint Communications - Fair Value of Assets Acquired and Liabilities Assumed and Gain on Bargain Purchase (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>25</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>99940104 - Disclosure - Description of the business: - Acquisition of Sprint Communications - Asset Retirement Obligations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessAcquisitionOfSprintCommunicationsAssetRetirementObligationsDetails</Role>
      <ShortName>Description of the business: - Acquisition of Sprint Communications - Asset Retirement Obligations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>26</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>99940105 - Disclosure - Description of the business: - Acquisition of Sprint Communications - Pro Forma Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessAcquisitionOfSprintCommunicationsProFormaInformationDetails</Role>
      <ShortName>Description of the business: - Acquisition of Sprint Communications - Pro Forma Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>27</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>99940106 - Disclosure - Description of the business: - Financial instruments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessFinancialInstrumentsDetails</Role>
      <ShortName>Description of the business: - Financial instruments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>28</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>99940107 - Disclosure - Description of the business: - Restricted cash and interest rate swap agreement (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessRestrictedCashAndInterestRateSwapAgreementDetails</Role>
      <ShortName>Description of the business: - Restricted cash and interest rate swap agreement (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>29</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>99940108 - Disclosure - Description of the business: - Gross receipts taxes, universal service fund and other surcharges (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessGrossReceiptsTaxesUniversalServiceFundAndOtherSurchargesDetails</Role>
      <ShortName>Description of the business: - Gross receipts taxes, universal service fund and other surcharges (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>30</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>99940109 - Disclosure - Description of the business: - Basic and diluted net income per common share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessBasicAndDilutedNetIncomePerCommonShareDetails</Role>
      <ShortName>Description of the business: - Basic and diluted net income per common share (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>31</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>99940110 - Disclosure - Description of the business: - Stockholders' (Deficit) Equity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessStockholdersDeficitEquityDetails</Role>
      <ShortName>Description of the business: - Stockholders' (Deficit) Equity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>32</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>99940111 - Disclosure - Description of the business: - Revenue recognition (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessRevenueRecognitionDetails</Role>
      <ShortName>Description of the business: - Revenue recognition (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>33</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>99940112 - Disclosure - Description of the business: - Leases (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessLeasesDetails</Role>
      <ShortName>Description of the business: - Leases (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>34</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>99940113 - Disclosure - Description of the business: - Allowance for credit losses (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessAllowanceForCreditLossesDetails</Role>
      <ShortName>Description of the business: - Allowance for credit losses (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>35</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>99940114 - Disclosure - Description of the business: - Allowance for credit losses - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessAllowanceForCreditLossesNarrativeDetails</Role>
      <ShortName>Description of the business: - Allowance for credit losses - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>36</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.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>37</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>99940202 - Disclosure - Property and equipment: - IRU Finance Lease Termination (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosurePropertyAndEquipmentIruFinanceLeaseTerminationDetails</Role>
      <ShortName>Property and equipment: - IRU Finance Lease Termination (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>38</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>99940203 - Disclosure - Property and equipment: - Estimated Useful Life - Owned Fiber (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosurePropertyAndEquipmentEstimatedUsefulLifeOwnedFiberDetails</Role>
      <ShortName>Property and equipment: - Estimated Useful Life - Owned Fiber (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>39</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>99940301 - 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/DisclosureLongTermDebt</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>99940302 - 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>41</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>99940401 - 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>42</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>99940501 - Disclosure - Income taxes: - The components of income before income taxes (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureIncomeTaxesComponentsOfIncomeBeforeIncomeTaxesDetails</Role>
      <ShortName>Income taxes: - The components of income before income taxes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>99940601 - Disclosure - Common stock buyback program and stock options and award plan: (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureCommonStockBuybackProgramAndStockOptionsAndAwardPlanDetails</Role>
      <ShortName>Common stock buyback program and stock options and award plan: (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cogentco.com/role/DisclosureCommonStockBuybackProgramAndStockOptionsAndAwardPlan</ParentRole>
      <Position>44</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>99940701 - Disclosure - Dividends on common stock: (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDividendsOnCommonStockDetails</Role>
      <ShortName>Dividends on common stock: (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cogentco.com/role/DisclosureDividendsOnCommonStock</ParentRole>
      <Position>45</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>99940801 - 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>46</Position>
    </Report>
    <Report instance="ccoi-20240930x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>99940901 - Disclosure - Segment information: (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureSegmentInformationDetails</Role>
      <ShortName>Segment information: (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cogentco.com/role/DisclosureSegmentInformationTables</ParentRole>
      <Position>47</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-20240930.xsd</File>
    <File>ccoi-20240930_cal.xml</File>
    <File>ccoi-20240930_def.xml</File>
    <File>ccoi-20240930_lab.xml</File>
    <File>ccoi-20240930_pre.xml</File>
    <File doctype="10-Q" isDefinitelyFs="true" isUsgaap="true" original="ccoi-20240930x10q.htm">ccoi-20240930x10q.htm</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy items="749">http://fasb.org/us-gaap/2023</BaseTaxonomy>
    <BaseTaxonomy items="29">http://xbrl.sec.gov/dei/2023</BaseTaxonomy>
    <BaseTaxonomy items="4">http://xbrl.sec.gov/ecd/2023</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
