<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.25.2</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>327</ContextCount>
  <ElementCount>327</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>85</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>7</UnitCount>
  <MyReports>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>0000001 - Document - Cover</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/Cover</Role>
      <ShortName>Cover</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>9952151 - Statement - CONDENSED CONSOLIDATED BALANCE SHEETS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/CONDENSEDCONSOLIDATEDBALANCESHEETS</Role>
      <ShortName>CONDENSED CONSOLIDATED BALANCE SHEETS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>9952152 - Statement - CONDENSED CONSOLIDATED BALANCE SHEETS (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/CONDENSEDCONSOLIDATEDBALANCESHEETSParenthetical</Role>
      <ShortName>CONDENSED CONSOLIDATED BALANCE SHEETS (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>9952153 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF OPERATIONS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONS</Role>
      <ShortName>CONDENSED CONSOLIDATED STATEMENTS OF OPERATIONS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>9952154 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF COMPREHENSIVE LOSS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFCOMPREHENSIVELOSS</Role>
      <ShortName>CONDENSED CONSOLIDATED STATEMENTS OF COMPREHENSIVE LOSS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>9952155 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF STOCKHOLDERS??? EQUITY</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITY</Role>
      <ShortName>CONDENSED CONSOLIDATED STATEMENTS OF STOCKHOLDERS??? EQUITY</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>9952156 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWS</Role>
      <ShortName>CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>9952157 - Disclosure - Organization and Basis of Presentation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/OrganizationandBasisofPresentation</Role>
      <ShortName>Organization and Basis of Presentation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>9952158 - Disclosure - Summary of Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/SummaryofSignificantAccountingPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>9952159 - Disclosure - Revenue</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/Revenue</Role>
      <ShortName>Revenue</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>9952160 - Disclosure - Fair Value Measurements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/FairValueMeasurements</Role>
      <ShortName>Fair Value Measurements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>9952161 - Disclosure - Balance Sheet Components</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/BalanceSheetComponents</Role>
      <ShortName>Balance Sheet Components</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>9952162 - Disclosure - Leases</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/Leases</Role>
      <ShortName>Leases</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>9952163 - Disclosure - Financing Arrangements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/FinancingArrangements</Role>
      <ShortName>Financing Arrangements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>9952164 - Disclosure - Commitments and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/CommitmentsandContingencies</Role>
      <ShortName>Commitments and Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>9952165 - Disclosure - Common Stock</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/CommonStock</Role>
      <ShortName>Common Stock</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>9952166 - Disclosure - Stock-based Compensation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/StockbasedCompensation</Role>
      <ShortName>Stock-based Compensation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>9952167 - Disclosure - Net Loss per Share Attributable to Common Stockholders</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/NetLossperShareAttributabletoCommonStockholders</Role>
      <ShortName>Net Loss per Share Attributable to Common Stockholders</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>9952168 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/IncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>9952169 - Disclosure - Business Combinations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/BusinessCombinations</Role>
      <ShortName>Business Combinations</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>9952170 - Disclosure - Segment and Geographic Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/SegmentandGeographicInformation</Role>
      <ShortName>Segment and Geographic Information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.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>22</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.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>23</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>9955511 - Disclosure - Summary of Significant Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/SummaryofSignificantAccountingPoliciesPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.cloudflare.com/role/SummaryofSignificantAccountingPolicies</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>9955512 - Disclosure - Revenue (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/RevenueTables</Role>
      <ShortName>Revenue (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cloudflare.com/role/Revenue</ParentRole>
      <Position>25</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>9955513 - Disclosure - Fair Value Measurements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/FairValueMeasurementsTables</Role>
      <ShortName>Fair Value Measurements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cloudflare.com/role/FairValueMeasurements</ParentRole>
      <Position>26</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>9955514 - Disclosure - Balance Sheet Components (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/BalanceSheetComponentsTables</Role>
      <ShortName>Balance Sheet Components (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cloudflare.com/role/BalanceSheetComponents</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>9955515 - Disclosure - Leases (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/LeasesTables</Role>
      <ShortName>Leases (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cloudflare.com/role/Leases</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>9955516 - Disclosure - Financing Arrangements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/FinancingArrangementsTables</Role>
      <ShortName>Financing Arrangements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cloudflare.com/role/FinancingArrangements</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>9955517 - Disclosure - Common Stock (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/CommonStockTables</Role>
      <ShortName>Common Stock (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cloudflare.com/role/CommonStock</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>9955518 - Disclosure - Stock-based Compensation (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/StockbasedCompensationTables</Role>
      <ShortName>Stock-based Compensation (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cloudflare.com/role/StockbasedCompensation</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>9955519 - Disclosure - Net Loss per Share Attributable to Common Stockholders (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/NetLossperShareAttributabletoCommonStockholdersTables</Role>
      <ShortName>Net Loss per Share Attributable to Common Stockholders (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cloudflare.com/role/NetLossperShareAttributabletoCommonStockholders</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>9955520 - Disclosure - Business Combinations (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/BusinessCombinationsTables</Role>
      <ShortName>Business Combinations (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cloudflare.com/role/BusinessCombinations</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>9955521 - Disclosure - Segment and Geographic Information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/SegmentandGeographicInformationTables</Role>
      <ShortName>Segment and Geographic Information (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.cloudflare.com/role/SegmentandGeographicInformation</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>9955522 - Disclosure - Revenue - Disaggregation of Revenue (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/RevenueDisaggregationofRevenueDetails</Role>
      <ShortName>Revenue - Disaggregation of Revenue (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>35</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>9955523 - Disclosure - Revenue - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/RevenueNarrativeDetails</Role>
      <ShortName>Revenue - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>36</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>9955524 - Disclosure - Revenue - Deferred Contract Acquisition Costs (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/RevenueDeferredContractAcquisitionCostsDetails</Role>
      <ShortName>Revenue - Deferred Contract Acquisition Costs (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>37</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>9955525 - Disclosure - Revenue - Remaining Performance Obligations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/RevenueRemainingPerformanceObligationsDetails</Role>
      <ShortName>Revenue - Remaining Performance Obligations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>38</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>9955526 - Disclosure - Fair Value Measurements - Schedule of Cash and Available-for-sale Debt Securities' Amortized Cost, Unrealized Gains (Losses) and Fair Value by Significant Investment Category (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/FairValueMeasurementsScheduleofCashandAvailableforsaleDebtSecuritiesAmortizedCostUnrealizedGainsLossesandFairValuebySignificantInvestmentCategoryDetails</Role>
      <ShortName>Fair Value Measurements - Schedule of Cash and Available-for-sale Debt Securities' Amortized Cost, Unrealized Gains (Losses) and Fair Value by Significant Investment Category (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>39</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>9955527 - Disclosure - Fair Value Measurements - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/FairValueMeasurementsNarrativeDetails</Role>
      <ShortName>Fair Value Measurements - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>40</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>9955528 - Disclosure - Balance Sheet Components - Accounts Receivable, Net (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/BalanceSheetComponentsAccountsReceivableNetDetails</Role>
      <ShortName>Balance Sheet Components - Accounts Receivable, Net (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>41</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>9955529 - Disclosure - Balance Sheet Components - Property and Equipment, Net (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/BalanceSheetComponentsPropertyandEquipmentNetDetails</Role>
      <ShortName>Balance Sheet Components - Property and Equipment, Net (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>42</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>9955530 - Disclosure - Balance Sheet Components - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/BalanceSheetComponentsNarrativeDetails</Role>
      <ShortName>Balance Sheet Components - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>9955531 - Disclosure - Balance Sheet Components - Acquired Intangible Assets, Net (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/BalanceSheetComponentsAcquiredIntangibleAssetsNetDetails</Role>
      <ShortName>Balance Sheet Components - Acquired Intangible Assets, Net (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>9955532 - Disclosure - Balance Sheet Components - Estimated Future Amortization Expense of Acquired Intangible Assets, Net (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/BalanceSheetComponentsEstimatedFutureAmortizationExpenseofAcquiredIntangibleAssetsNetDetails</Role>
      <ShortName>Balance Sheet Components - Estimated Future Amortization Expense of Acquired Intangible Assets, Net (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>45</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>9955533 - Disclosure - Leases - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/LeasesNarrativeDetails</Role>
      <ShortName>Leases - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>46</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>9955534 - Disclosure - Leases - Schedule of Lease Costs (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/LeasesScheduleofLeaseCostsDetails</Role>
      <ShortName>Leases - Schedule of Lease Costs (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>47</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>9955535 - Disclosure - Leases - Lease Liability Maturities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/LeasesLeaseLiabilityMaturitiesDetails</Role>
      <ShortName>Leases - Lease Liability Maturities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>9955536 - Disclosure - Financing Arrangements - 2030 Convertible Senior Notes (Details)</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://www.cloudflare.com/role/FinancingArrangements2030ConvertibleSeniorNotesDetails</Role>
      <ShortName>Financing Arrangements - 2030 Convertible Senior Notes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>9955537 - Disclosure - Financing Arrangements - 2030 Capped Call Transactions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/FinancingArrangements2030CappedCallTransactionsDetails</Role>
      <ShortName>Financing Arrangements - 2030 Capped Call Transactions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>50</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>9955538 - Disclosure - Financing Arrangements - 2026 Convertible Senior Notes (Details)</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://www.cloudflare.com/role/FinancingArrangements2026ConvertibleSeniorNotesDetails</Role>
      <ShortName>Financing Arrangements - 2026 Convertible Senior Notes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>51</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>9955539 - Disclosure - Financing Arrangements - 2026 Capped Call Transactions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/FinancingArrangements2026CappedCallTransactionsDetails</Role>
      <ShortName>Financing Arrangements - 2026 Capped Call Transactions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>9955540 - Disclosure - Financing Arrangements - 2025 Convertible Senior Notes (Details)</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://www.cloudflare.com/role/FinancingArrangements2025ConvertibleSeniorNotesDetails</Role>
      <ShortName>Financing Arrangements - 2025 Convertible Senior Notes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>53</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>9955541 - Disclosure - Financing Arrangements - 2025 Capped Call Transactions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/FinancingArrangements2025CappedCallTransactionsDetails</Role>
      <ShortName>Financing Arrangements - 2025 Capped Call Transactions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>54</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>9955542 - Disclosure - Financing Arrangements - Schedule of Net Carrying Amount of Notes (Details)</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://www.cloudflare.com/role/FinancingArrangementsScheduleofNetCarryingAmountofNotesDetails</Role>
      <ShortName>Financing Arrangements - Schedule of Net Carrying Amount of Notes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>55</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>9955543 - Disclosure - Financing Arrangements - Schedule of Interest Components (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/FinancingArrangementsScheduleofInterestComponentsDetails</Role>
      <ShortName>Financing Arrangements - Schedule of Interest Components (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>56</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>9955544 - Disclosure - Financing Arrangements - Revolving Credit Facility (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/FinancingArrangementsRevolvingCreditFacilityDetails</Role>
      <ShortName>Financing Arrangements - Revolving Credit Facility (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>57</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>9955545 - Disclosure - Common Stock - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/CommonStockNarrativeDetails</Role>
      <ShortName>Common Stock - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>58</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>9955546 - Disclosure - Common Stock - Schedule of Common Stock Reserved for Future Issuance (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/CommonStockScheduleofCommonStockReservedforFutureIssuanceDetails</Role>
      <ShortName>Common Stock - Schedule of Common Stock Reserved for Future Issuance (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>59</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>9955547 - Disclosure - Stock-based Compensation - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/StockbasedCompensationNarrativeDetails</Role>
      <ShortName>Stock-based Compensation - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>60</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>9955548 - Disclosure - Stock-based Compensation - Schedule of Assumptions Used to Determine the Fair Value of Stock Options Granted (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/StockbasedCompensationScheduleofAssumptionsUsedtoDeterminetheFairValueofStockOptionsGrantedDetails</Role>
      <ShortName>Stock-based Compensation - Schedule of Assumptions Used to Determine the Fair Value of Stock Options Granted (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>61</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>9955549 - Disclosure - Stock-based Compensation - Schedule of Stock-based Compensation Expense (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/StockbasedCompensationScheduleofStockbasedCompensationExpenseDetails</Role>
      <ShortName>Stock-based Compensation - Schedule of Stock-based Compensation Expense (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>62</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>9955550 - Disclosure - Net Loss per Share Attributable to Common Stockholders - Schedule of Computation of Basic and Diluted Earnings per Share Attributable to Common Stockholders (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/NetLossperShareAttributabletoCommonStockholdersScheduleofComputationofBasicandDilutedEarningsperShareAttributabletoCommonStockholdersDetails</Role>
      <ShortName>Net Loss per Share Attributable to Common Stockholders - Schedule of Computation of Basic and Diluted Earnings per Share Attributable to Common Stockholders (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>63</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>9955551 - Disclosure - Net Loss per Share Attributable to Common Stockholders - Schedule of Potential Shares of Common Stock Excluded from Computation of Basic and Diluted Net Loss per Share Attributable to Common Stockholders (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/NetLossperShareAttributabletoCommonStockholdersScheduleofPotentialSharesofCommonStockExcludedfromComputationofBasicandDilutedNetLossperShareAttributabletoCommonStockholdersDetails</Role>
      <ShortName>Net Loss per Share Attributable to Common Stockholders - Schedule of Potential Shares of Common Stock Excluded from Computation of Basic and Diluted Net Loss per Share Attributable to Common Stockholders (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>64</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>9955552 - Disclosure - Income Taxes (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/IncomeTaxesDetails</Role>
      <ShortName>Income Taxes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.cloudflare.com/role/IncomeTaxes</ParentRole>
      <Position>65</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>9955553 - Disclosure - Business Combinations - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/BusinessCombinationsNarrativeDetails</Role>
      <ShortName>Business Combinations - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>66</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>9955554 - Disclosure - Business Combinations - Schedule of Assets Acquired and Liabilities Assumed (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/BusinessCombinationsScheduleofAssetsAcquiredandLiabilitiesAssumedDetails</Role>
      <ShortName>Business Combinations - Schedule of Assets Acquired and Liabilities Assumed (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>67</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>9955555 - Disclosure - Segment and Geographic Information - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/SegmentandGeographicInformationNarrativeDetails</Role>
      <ShortName>Segment and Geographic Information - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>68</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>9955556 - Disclosure - Segment and Geographic Information - Schedule of Reconciliation of Consolidated Revenue to Net Income (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/SegmentandGeographicInformationScheduleofReconciliationofConsolidatedRevenuetoNetIncomeDetails</Role>
      <ShortName>Segment and Geographic Information - Schedule of Reconciliation of Consolidated Revenue to Net Income (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>69</Position>
    </Report>
    <Report instance="cloud-20250630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>9955557 - Disclosure - Segment and Geographic Information - Schedule of Property and Equipment, Net by Geographic Area (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.cloudflare.com/role/SegmentandGeographicInformationScheduleofPropertyandEquipmentNetbyGeographicAreaDetails</Role>
      <ShortName>Segment and Geographic Information - Schedule of Property and Equipment, Net by Geographic Area (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>70</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File doctype="10-Q" isDefinitelyFs="true" isUsgaap="true" original="cloud-20250630.htm">cloud-20250630.htm</File>
    <File>cloud-20250630.xsd</File>
    <File>cloud-20250630_cal.xml</File>
    <File>cloud-20250630_def.xml</File>
    <File>cloud-20250630_lab.xml</File>
    <File>cloud-20250630_pre.xml</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy items="964">http://fasb.org/us-gaap/2025</BaseTaxonomy>
    <BaseTaxonomy items="30">http://xbrl.sec.gov/dei/2025</BaseTaxonomy>
    <BaseTaxonomy items="19">http://xbrl.sec.gov/ecd/2025</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
