<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.26.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>223</ContextCount>
  <ElementCount>288</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>72</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>11</UnitCount>
  <MyReports>
    <Report instance="ccoi-20260331x10q.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-20260331x10q.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-20260331x10q.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-20260331x10q.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-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>995200205 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF COMPREHENSIVE LOSS (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/StatementCondensedConsolidatedStatementsOfComprehensiveLossParenthetical</Role>
      <ShortName>CONDENSED CONSOLIDATED STATEMENTS OF COMPREHENSIVE LOSS (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="ccoi-20260331x10q.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-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.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>7</Position>
    </Report>
    <Report instance="ccoi-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.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>8</Position>
    </Report>
    <Report instance="ccoi-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.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>9</Position>
    </Report>
    <Report instance="ccoi-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.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>10</Position>
    </Report>
    <Report instance="ccoi-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.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>11</Position>
    </Report>
    <Report instance="ccoi-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>995210601 - Disclosure - Common stock buyback program:</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureCommonStockBuybackProgram</Role>
      <ShortName>Common stock buyback program:</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="ccoi-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.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>13</Position>
    </Report>
    <Report instance="ccoi-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.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>14</Position>
    </Report>
    <Report instance="ccoi-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>995210901 - 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>15</Position>
    </Report>
    <Report instance="ccoi-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.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>16</Position>
    </Report>
    <Report instance="ccoi-20260331x10q.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-20260331x10q.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-20260331x10q.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-20260331x10q.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-20260331x10q.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-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>99930903 - 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>22</Position>
    </Report>
    <Report instance="ccoi-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>99940101 - Disclosure - Description of the business: (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessDetails</Role>
      <ShortName>Description of the business: (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessTables</ParentRole>
      <Position>23</Position>
    </Report>
    <Report instance="ccoi-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>99940102 - 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>24</Position>
    </Report>
    <Report instance="ccoi-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>99940103 - 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>25</Position>
    </Report>
    <Report instance="ccoi-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>99940104 - 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>26</Position>
    </Report>
    <Report instance="ccoi-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>99940105 - 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>27</Position>
    </Report>
    <Report instance="ccoi-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>99940106 - 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>28</Position>
    </Report>
    <Report instance="ccoi-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>99940107 - 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>29</Position>
    </Report>
    <Report instance="ccoi-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>99940108 - Disclosure - Description of the business: - Lessor Accounting and Leases (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureDescriptionOfBusinessLessorAccountingAndLeasesDetails</Role>
      <ShortName>Description of the business: - Lessor Accounting and Leases (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>30</Position>
    </Report>
    <Report instance="ccoi-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>99940109 - 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>31</Position>
    </Report>
    <Report instance="ccoi-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>99940110 - 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>32</Position>
    </Report>
    <Report instance="ccoi-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>99940202 - 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>33</Position>
    </Report>
    <Report instance="ccoi-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.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>34</Position>
    </Report>
    <Report instance="ccoi-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.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>35</Position>
    </Report>
    <Report instance="ccoi-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.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>36</Position>
    </Report>
    <Report instance="ccoi-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.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>37</Position>
    </Report>
    <Report instance="ccoi-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>99940601 - Disclosure - Common stock buyback program: (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cogentco.com/role/DisclosureCommonStockBuybackProgramDetails</Role>
      <ShortName>Common stock buyback program: (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cogentco.com/role/DisclosureCommonStockBuybackProgram</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="ccoi-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.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>39</Position>
    </Report>
    <Report instance="ccoi-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.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>40</Position>
    </Report>
    <Report instance="ccoi-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>99940901 - 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>41</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-20260331.xsd</File>
    <File>ccoi-20260331_cal.xml</File>
    <File>ccoi-20260331_def.xml</File>
    <File>ccoi-20260331_lab.xml</File>
    <File>ccoi-20260331_pre.xml</File>
    <File doctype="10-Q" isDefinitelyFs="true" isUsgaap="true" original="ccoi-20260331x10q.htm">ccoi-20260331x10q.htm</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy items="523">http://fasb.org/us-gaap/2025</BaseTaxonomy>
    <BaseTaxonomy items="30">http://xbrl.sec.gov/dei/2025</BaseTaxonomy>
    <BaseTaxonomy items="4">http://xbrl.sec.gov/ecd/2025</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
