<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.25.4</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>323</ContextCount>
  <ElementCount>518</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>103</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>8</UnitCount>
  <MyReports>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>0000001 - Document - Cover</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/Cover</Role>
      <ShortName>Cover</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>0000002 - Document - Audit Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/AuditInformation</Role>
      <ShortName>Audit Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>9952151 - Statement - Consolidated Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/ConsolidatedBalanceSheets</Role>
      <ShortName>Consolidated Balance Sheets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>9952152 - Statement - Consolidated Balance Sheets (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/ConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>Consolidated Balance Sheets (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>9952153 - Statement - Consolidated Statements of Operations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/ConsolidatedStatementsofOperations</Role>
      <ShortName>Consolidated Statements of Operations</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>9952154 - Statement - Consolidated Statements of Comprehensive Income (Loss)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/ConsolidatedStatementsofComprehensiveIncomeLoss</Role>
      <ShortName>Consolidated Statements of Comprehensive Income (Loss)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>9952155 - Statement - Consolidated Statements of Stockholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/ConsolidatedStatementsofStockholdersEquity</Role>
      <ShortName>Consolidated Statements of Stockholders' Equity</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>9952156 - Statement - Consolidated Statements of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/ConsolidatedStatementsofCashFlows</Role>
      <ShortName>Consolidated Statements of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>9952157 - Disclosure - Organization and Description of Business</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/OrganizationandDescriptionofBusiness</Role>
      <ShortName>Organization and Description of Business</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>9952158 - Disclosure - Summary of Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/SummaryofSignificantAccountingPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>9952159 - Disclosure - Fair Value Measurements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/FairValueMeasurements</Role>
      <ShortName>Fair Value Measurements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>9952160 - Disclosure - Property and Equipment</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/PropertyandEquipment</Role>
      <ShortName>Property and Equipment</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>9952161 - Disclosure - Divestitures</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/Divestitures</Role>
      <ShortName>Divestitures</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>9952162 - Disclosure - Impairment of Long-Lived Assets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/ImpairmentofLongLivedAssets</Role>
      <ShortName>Impairment of Long-Lived Assets</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>9952163 - Disclosure - Restructuring Activities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/RestructuringActivities</Role>
      <ShortName>Restructuring Activities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>9952164 - Disclosure - Reorganization and Segment Reporting</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/ReorganizationandSegmentReporting</Role>
      <ShortName>Reorganization and Segment Reporting</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>9952165 - Disclosure - Derivatives and Hedging</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/DerivativesandHedging</Role>
      <ShortName>Derivatives and Hedging</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>9952166 - Disclosure - Right-of-Use Assets and Lease Liabilities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/RightofUseAssetsandLeaseLiabilities</Role>
      <ShortName>Right-of-Use Assets and Lease Liabilities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>9952167 - Disclosure - Business Combinations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/BusinessCombinations</Role>
      <ShortName>Business Combinations</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>9952168 - Disclosure - Equity Method Investment</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/EquityMethodInvestment</Role>
      <ShortName>Equity Method Investment</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>9952169 - Disclosure - Goodwill and Intangible Assets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/GoodwillandIntangibleAssets</Role>
      <ShortName>Goodwill and Intangible Assets</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>9952170 - Disclosure - Balance Sheet Components</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/BalanceSheetComponents</Role>
      <ShortName>Balance Sheet Components</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>9952171 - Disclosure - Long-Term Debt</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/LongTermDebt</Role>
      <ShortName>Long-Term Debt</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>9952172 - Disclosure - Supplemental Balance Sheet Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/SupplementalBalanceSheetInformation</Role>
      <ShortName>Supplemental Balance Sheet Information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>9952173 - Disclosure - Revenue by Geographic Area and Groups of Similar Products</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/RevenuebyGeographicAreaandGroupsofSimilarProducts</Role>
      <ShortName>Revenue by Geographic Area and Groups of Similar Products</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>25</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>9952174 - Disclosure - Commitments and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/CommitmentsandContingencies</Role>
      <ShortName>Commitments and Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>26</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>9952175 - Disclosure - Stockholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/StockholdersEquity</Role>
      <ShortName>Stockholders' Equity</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>27</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>9952176 - Disclosure - Stock-Based Compensation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/StockBasedCompensation</Role>
      <ShortName>Stock-Based Compensation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>28</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>9952177 - Disclosure - Net Income (Loss) Per Share Attributable to Common Stockholders</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/NetIncomeLossPerShareAttributabletoCommonStockholders</Role>
      <ShortName>Net Income (Loss) Per Share Attributable to Common Stockholders</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>29</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>9952178 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/IncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>30</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.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>31</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>995447 - Disclosure - Insider Trading Policies and Procedures</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/InsiderTradingPoliciesProc</Role>
      <ShortName>Insider Trading Policies and Procedures</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>32</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>995550 - Disclosure - Cybersecurity Risk Management and Strategy Disclosure</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/cyd/role/CybersecurityRiskManagementAndStrategyDisclosure</Role>
      <ShortName>Cybersecurity Risk Management and Strategy Disclosure</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>33</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>9955511 - Disclosure - Summary of Significant Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/SummaryofSignificantAccountingPoliciesPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.twilio.com/role/SummaryofSignificantAccountingPolicies</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>9955512 - Disclosure - Summary of Significant Accounting Policies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/SummaryofSignificantAccountingPoliciesTables</Role>
      <ShortName>Summary of Significant Accounting Policies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.twilio.com/role/SummaryofSignificantAccountingPolicies</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>9955513 - Disclosure - Fair Value Measurements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/FairValueMeasurementsTables</Role>
      <ShortName>Fair Value Measurements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.twilio.com/role/FairValueMeasurements</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>9955514 - Disclosure - Property and Equipment (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/PropertyandEquipmentTables</Role>
      <ShortName>Property and Equipment (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.twilio.com/role/PropertyandEquipment</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>9955515 - Disclosure - Impairment of Long-Lived Assets (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/ImpairmentofLongLivedAssetsTables</Role>
      <ShortName>Impairment of Long-Lived Assets (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.twilio.com/role/ImpairmentofLongLivedAssets</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>9955516 - Disclosure - Right-of-Use Assets and Lease Liabilities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/RightofUseAssetsandLeaseLiabilitiesTables</Role>
      <ShortName>Right-of-Use Assets and Lease Liabilities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.twilio.com/role/RightofUseAssetsandLeaseLiabilities</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>9955517 - Disclosure - Business Combinations (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/BusinessCombinationsTables</Role>
      <ShortName>Business Combinations (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.twilio.com/role/BusinessCombinations</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>9955518 - Disclosure - Equity Method Investment (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/EquityMethodInvestmentTables</Role>
      <ShortName>Equity Method Investment (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.twilio.com/role/EquityMethodInvestment</ParentRole>
      <Position>41</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>9955519 - Disclosure - Goodwill and Intangible Assets (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/GoodwillandIntangibleAssetsTables</Role>
      <ShortName>Goodwill and Intangible Assets (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.twilio.com/role/GoodwillandIntangibleAssets</ParentRole>
      <Position>42</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>9955520 - Disclosure - Balance Sheet Components (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/BalanceSheetComponentsTables</Role>
      <ShortName>Balance Sheet Components (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.twilio.com/role/BalanceSheetComponents</ParentRole>
      <Position>43</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>9955521 - Disclosure - Long-Term Debt (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/LongTermDebtTables</Role>
      <ShortName>Long-Term Debt (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.twilio.com/role/LongTermDebt</ParentRole>
      <Position>44</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>9955522 - Disclosure - Supplemental Balance Sheet Information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/SupplementalBalanceSheetInformationTables</Role>
      <ShortName>Supplemental Balance Sheet Information (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.twilio.com/role/SupplementalBalanceSheetInformation</ParentRole>
      <Position>45</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>9955523 - Disclosure - Revenue by Geographic Area and Groups of Similar Products (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/RevenuebyGeographicAreaandGroupsofSimilarProductsTables</Role>
      <ShortName>Revenue by Geographic Area and Groups of Similar Products (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.twilio.com/role/RevenuebyGeographicAreaandGroupsofSimilarProducts</ParentRole>
      <Position>46</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>9955524 - Disclosure - Commitments and Contingencies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/CommitmentsandContingenciesTables</Role>
      <ShortName>Commitments and Contingencies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.twilio.com/role/CommitmentsandContingencies</ParentRole>
      <Position>47</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>9955525 - Disclosure - Stockholders' Equity (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/StockholdersEquityTables</Role>
      <ShortName>Stockholders' Equity (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.twilio.com/role/StockholdersEquity</ParentRole>
      <Position>48</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>9955526 - Disclosure - Stock-Based Compensation (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/StockBasedCompensationTables</Role>
      <ShortName>Stock-Based Compensation (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.twilio.com/role/StockBasedCompensation</ParentRole>
      <Position>49</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>9955527 - Disclosure - Net Income (Loss) Per Share Attributable to Common Stockholders (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/NetIncomeLossPerShareAttributabletoCommonStockholdersTables</Role>
      <ShortName>Net Income (Loss) Per Share Attributable to Common Stockholders (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.twilio.com/role/NetIncomeLossPerShareAttributabletoCommonStockholders</ParentRole>
      <Position>50</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>9955528 - Disclosure - Income Taxes (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/IncomeTaxesTables</Role>
      <ShortName>Income Taxes (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.twilio.com/role/IncomeTaxes</ParentRole>
      <Position>51</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>9955529 - Disclosure - Summary of Significant Accounting Policies - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/SummaryofSignificantAccountingPoliciesNarrativeDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>9955530 - Disclosure - Summary of Significant Accounting Policies - Property and Equipment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/SummaryofSignificantAccountingPoliciesPropertyandEquipmentDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Property and Equipment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>53</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>9955531 - Disclosure - Summary of Significant Accounting Policies - Schedule of Useful Lives of Intangible Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/SummaryofSignificantAccountingPoliciesScheduleofUsefulLivesofIntangibleAssetsDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Schedule of Useful Lives of Intangible Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>54</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>9955532 - Disclosure - Fair Value Measurements - Assets Measured at Fair Value on a Recurring Basis (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/FairValueMeasurementsAssetsMeasuredatFairValueonaRecurringBasisDetails</Role>
      <ShortName>Fair Value Measurements - Assets Measured at Fair Value on a Recurring Basis (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>55</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>9955533 - Disclosure - Fair Value Measurements - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/FairValueMeasurementsNarrativeDetails</Role>
      <ShortName>Fair Value Measurements - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>56</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>9955534 - Disclosure - Fair Value Measurements - Contractual Maturities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/FairValueMeasurementsContractualMaturitiesDetails</Role>
      <ShortName>Fair Value Measurements - Contractual Maturities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>57</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>9955535 - Disclosure - Property and Equipment - Schedule of Property and Equipment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/PropertyandEquipmentScheduleofPropertyandEquipmentDetails</Role>
      <ShortName>Property and Equipment - Schedule of Property and Equipment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>58</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>9955536 - Disclosure - Property and Equipment - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/PropertyandEquipmentNarrativeDetails</Role>
      <ShortName>Property and Equipment - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>59</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>9955537 - Disclosure - Divestitures (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/DivestituresDetails</Role>
      <ShortName>Divestitures (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.twilio.com/role/Divestitures</ParentRole>
      <Position>60</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>9955538 - Disclosure - Impairment of Long-Lived Assets - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/ImpairmentofLongLivedAssetsNarrativeDetails</Role>
      <ShortName>Impairment of Long-Lived Assets - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>61</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>9955539 - Disclosure - Impairment of Long-Lived Assets - Schedule of Impairment of Intangible Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/ImpairmentofLongLivedAssetsScheduleofImpairmentofIntangibleAssetsDetails</Role>
      <ShortName>Impairment of Long-Lived Assets - Schedule of Impairment of Intangible Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>62</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>9955540 - Disclosure - Restructuring Activities - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/RestructuringActivitiesNarrativeDetails</Role>
      <ShortName>Restructuring Activities - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>63</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>9955541 - Disclosure - Reorganization and Segment Reporting (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/ReorganizationandSegmentReportingDetails</Role>
      <ShortName>Reorganization and Segment Reporting (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.twilio.com/role/ReorganizationandSegmentReporting</ParentRole>
      <Position>64</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>9955542 - Disclosure - Derivatives and Hedging - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/DerivativesandHedgingNarrativeDetails</Role>
      <ShortName>Derivatives and Hedging - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>65</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>9955543 - Disclosure - Right-of-Use Assets and Lease Liabilities - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/RightofUseAssetsandLeaseLiabilitiesNarrativeDetails</Role>
      <ShortName>Right-of-Use Assets and Lease Liabilities - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>66</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>9955544 - Disclosure - Right-of-Use Assets and Lease Liabilities - Supplemental Cash Flows and Other Information related to Operating Leases (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/RightofUseAssetsandLeaseLiabilitiesSupplementalCashFlowsandOtherInformationrelatedtoOperatingLeasesDetails</Role>
      <ShortName>Right-of-Use Assets and Lease Liabilities - Supplemental Cash Flows and Other Information related to Operating Leases (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>67</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>9955545 - Disclosure - Right-of-Use Assets and Lease Liabilities - Lease Maturities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/RightofUseAssetsandLeaseLiabilitiesLeaseMaturitiesDetails</Role>
      <ShortName>Right-of-Use Assets and Lease Liabilities - Lease Maturities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>68</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>9955546 - Disclosure - Business Combinations - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/BusinessCombinationsNarrativeDetails</Role>
      <ShortName>Business Combinations - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>69</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>9955547 - Disclosure - Business Combinations - Purchase Price Allocation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/BusinessCombinationsPurchasePriceAllocationDetails</Role>
      <ShortName>Business Combinations - Purchase Price Allocation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>70</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>9955548 - Disclosure - Business Combinations - Identifiable Finite-lived Intangible Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/BusinessCombinationsIdentifiableFinitelivedIntangibleAssetsDetails</Role>
      <ShortName>Business Combinations - Identifiable Finite-lived Intangible Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>71</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>9955549 - Disclosure - Equity Method Investment - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/EquityMethodInvestmentNarrativeDetails</Role>
      <ShortName>Equity Method Investment - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>72</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>9955550 - Disclosure - Equity Method Investment - Schedule of Ownership Percentage and Other Information Related to Equity Method Investment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/EquityMethodInvestmentScheduleofOwnershipPercentageandOtherInformationRelatedtoEquityMethodInvestmentDetails</Role>
      <ShortName>Equity Method Investment - Schedule of Ownership Percentage and Other Information Related to Equity Method Investment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>73</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>9955551 - Disclosure - Equity Method Investment - Schedule of Financial Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/EquityMethodInvestmentScheduleofFinancialInformationDetails</Role>
      <ShortName>Equity Method Investment - Schedule of Financial Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>74</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R75.htm</HtmlFileName>
      <LongName>9955552 - Disclosure - Goodwill and Intangible Assets - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/GoodwillandIntangibleAssetsNarrativeDetails</Role>
      <ShortName>Goodwill and Intangible Assets - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>75</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R76.htm</HtmlFileName>
      <LongName>9955553 - Disclosure - Goodwill and Intangible Assets - Goodwill Balance (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/GoodwillandIntangibleAssetsGoodwillBalanceDetails</Role>
      <ShortName>Goodwill and Intangible Assets - Goodwill Balance (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>76</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R77.htm</HtmlFileName>
      <LongName>9955554 - Disclosure - Goodwill and Intangible Assets - Intangible Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/GoodwillandIntangibleAssetsIntangibleAssetsDetails</Role>
      <ShortName>Goodwill and Intangible Assets - Intangible Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>77</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R78.htm</HtmlFileName>
      <LongName>9955555 - Disclosure - Goodwill and Intangible Assets - Total Estimated Future Amortization Expense (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/GoodwillandIntangibleAssetsTotalEstimatedFutureAmortizationExpenseDetails</Role>
      <ShortName>Goodwill and Intangible Assets - Total Estimated Future Amortization Expense (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>78</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R79.htm</HtmlFileName>
      <LongName>9955556 - Disclosure - Balance Sheet Components - Prepaid Expenses and Other Current Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/BalanceSheetComponentsPrepaidExpensesandOtherCurrentAssetsDetails</Role>
      <ShortName>Balance Sheet Components - Prepaid Expenses and Other Current Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>79</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R80.htm</HtmlFileName>
      <LongName>9955557 - Disclosure - Balance Sheet Components - Accrued Expenses and Other Current Liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/BalanceSheetComponentsAccruedExpensesandOtherCurrentLiabilitiesDetails</Role>
      <ShortName>Balance Sheet Components - Accrued Expenses and Other Current Liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>80</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R81.htm</HtmlFileName>
      <LongName>9955558 - Disclosure - Long-Term Debt - Schedule of Long-Term Debt (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/LongTermDebtScheduleofLongTermDebtDetails</Role>
      <ShortName>Long-Term Debt - Schedule of Long-Term Debt (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>81</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R82.htm</HtmlFileName>
      <LongName>9955559 - Disclosure - Long-Term Debt - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/LongTermDebtNarrativeDetails</Role>
      <ShortName>Long-Term Debt - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>82</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R83.htm</HtmlFileName>
      <LongName>9955560 - Disclosure - Supplemental Balance Sheet Information - Customer Credit Reserve (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/SupplementalBalanceSheetInformationCustomerCreditReserveDetails</Role>
      <ShortName>Supplemental Balance Sheet Information - Customer Credit Reserve (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>83</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R84.htm</HtmlFileName>
      <LongName>9955561 - Disclosure - Revenue by Geographic Area and Groups of Similar Products - Revenue by Geographic Area (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/RevenuebyGeographicAreaandGroupsofSimilarProductsRevenuebyGeographicAreaDetails</Role>
      <ShortName>Revenue by Geographic Area and Groups of Similar Products - Revenue by Geographic Area (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>84</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R85.htm</HtmlFileName>
      <LongName>9955562 - Disclosure - Revenue by Geographic Area and Groups of Similar Products - Long-Lived Assets by Geographic Area (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/RevenuebyGeographicAreaandGroupsofSimilarProductsLongLivedAssetsbyGeographicAreaDetails</Role>
      <ShortName>Revenue by Geographic Area and Groups of Similar Products - Long-Lived Assets by Geographic Area (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>85</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R86.htm</HtmlFileName>
      <LongName>9955563 - Disclosure - Commitments and Contingencies - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/CommitmentsandContingenciesNarrativeDetails</Role>
      <ShortName>Commitments and Contingencies - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>86</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R87.htm</HtmlFileName>
      <LongName>9955564 - Disclosure - Commitment and Contingencies - Future Minimum Payments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/CommitmentandContingenciesFutureMinimumPaymentsDetails</Role>
      <ShortName>Commitment and Contingencies - Future Minimum Payments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>87</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R88.htm</HtmlFileName>
      <LongName>9955565 - Disclosure - Stockholders' Equity - Preferred Stock (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/StockholdersEquityPreferredStockDetails</Role>
      <ShortName>Stockholders' Equity - Preferred Stock (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>88</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R89.htm</HtmlFileName>
      <LongName>9955566 - Disclosure - Stockholders' Equity - Common Stock (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/StockholdersEquityCommonStockDetails</Role>
      <ShortName>Stockholders' Equity - Common Stock (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>89</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R90.htm</HtmlFileName>
      <LongName>9955567 - Disclosure - Stockholders' Equity - Common Stock Shares Reserved (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/StockholdersEquityCommonStockSharesReservedDetails</Role>
      <ShortName>Stockholders' Equity - Common Stock Shares Reserved (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>90</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R91.htm</HtmlFileName>
      <LongName>9955568 - Disclosure - Stockholders' Equity - Share Repurchase Program (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/StockholdersEquityShareRepurchaseProgramDetails</Role>
      <ShortName>Stockholders' Equity - Share Repurchase Program (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>91</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R92.htm</HtmlFileName>
      <LongName>9955569 - Disclosure - Stock-Based Compensation - 2016 Stock Option Plan (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/StockBasedCompensation2016StockOptionPlanDetails</Role>
      <ShortName>Stock-Based Compensation - 2016 Stock Option Plan (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>92</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R93.htm</HtmlFileName>
      <LongName>9955570 - Disclosure - Stock-Based Compensation - 2016 Employee Stock Purchase Plan (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/StockBasedCompensation2016EmployeeStockPurchasePlanDetails</Role>
      <ShortName>Stock-Based Compensation - 2016 Employee Stock Purchase Plan (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>93</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R94.htm</HtmlFileName>
      <LongName>9955571 - Disclosure - Stock-Based Compensation - Stock Option Activity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/StockBasedCompensationStockOptionActivityDetails</Role>
      <ShortName>Stock-Based Compensation - Stock Option Activity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>94</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R95.htm</HtmlFileName>
      <LongName>9955572 - Disclosure - Stock-Based Compensation - Stock Option Fair Value (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/StockBasedCompensationStockOptionFairValueDetails</Role>
      <ShortName>Stock-Based Compensation - Stock Option Fair Value (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>95</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R96.htm</HtmlFileName>
      <LongName>9955573 - Disclosure - Stock-Based Compensation - Restricted Stock Units Activity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/StockBasedCompensationRestrictedStockUnitsActivityDetails</Role>
      <ShortName>Stock-Based Compensation - Restricted Stock Units Activity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>96</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R97.htm</HtmlFileName>
      <LongName>9955574 - Disclosure - Stock-Based Compensation - Restricted Stock Units Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/StockBasedCompensationRestrictedStockUnitsNarrativeDetails</Role>
      <ShortName>Stock-Based Compensation - Restricted Stock Units Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>97</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R98.htm</HtmlFileName>
      <LongName>9955575 - Disclosure - Stock-Based Compensation - Valuation Assumptions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/StockBasedCompensationValuationAssumptionsDetails</Role>
      <ShortName>Stock-Based Compensation - Valuation Assumptions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>98</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R99.htm</HtmlFileName>
      <LongName>9955576 - Disclosure - Stock-Based Compensation - Stock-Based Compensation Expense (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/StockBasedCompensationStockBasedCompensationExpenseDetails</Role>
      <ShortName>Stock-Based Compensation - Stock-Based Compensation Expense (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>99</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R100.htm</HtmlFileName>
      <LongName>9955577 - Disclosure - Net Income (Loss) Per Share Attributable to Common Stockholders - Basic and Diluted Net Income (Loss) per Share Attributable to Common Stockholders (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/NetIncomeLossPerShareAttributabletoCommonStockholdersBasicandDilutedNetIncomeLossperShareAttributabletoCommonStockholdersDetails</Role>
      <ShortName>Net Income (Loss) Per Share Attributable to Common Stockholders - Basic and Diluted Net Income (Loss) per Share Attributable to Common Stockholders (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.twilio.com/role/NetIncomeLossPerShareAttributabletoCommonStockholdersTables</ParentRole>
      <Position>100</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R101.htm</HtmlFileName>
      <LongName>9955578 - Disclosure - Net Income (Loss) Per Share Attributable to Common Stockholders - Common Stock Equivalents excluded from Calculation of Diluted Net Income (Loss) Per Share attributable to Common Stockholders (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/NetIncomeLossPerShareAttributabletoCommonStockholdersCommonStockEquivalentsexcludedfromCalculationofDilutedNetIncomeLossPerShareattributabletoCommonStockholdersDetails</Role>
      <ShortName>Net Income (Loss) Per Share Attributable to Common Stockholders - Common Stock Equivalents excluded from Calculation of Diluted Net Income (Loss) Per Share attributable to Common Stockholders (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.twilio.com/role/NetIncomeLossPerShareAttributabletoCommonStockholdersTables</ParentRole>
      <Position>101</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R102.htm</HtmlFileName>
      <LongName>9955579 - Disclosure - Income Taxes - Domestic and Foreign Components of Loss Before Income Taxes (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/IncomeTaxesDomesticandForeignComponentsofLossBeforeIncomeTaxesDetails</Role>
      <ShortName>Income Taxes - Domestic and Foreign Components of Loss Before Income Taxes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>102</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R103.htm</HtmlFileName>
      <LongName>9955580 - Disclosure - Income Taxes - Provision for Income Taxes (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/IncomeTaxesProvisionforIncomeTaxesDetails</Role>
      <ShortName>Income Taxes - Provision for Income Taxes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>103</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R104.htm</HtmlFileName>
      <LongName>9955581 - Disclosure - Income Taxes - Statutory Federal Tax Rate and Effective Tax Rate (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/IncomeTaxesStatutoryFederalTaxRateandEffectiveTaxRateDetails</Role>
      <ShortName>Income Taxes - Statutory Federal Tax Rate and Effective Tax Rate (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>104</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R105.htm</HtmlFileName>
      <LongName>9955582 - Disclosure - Income Taxes - Cash Paid for Income Taxes, Net of Refunds (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/IncomeTaxesCashPaidforIncomeTaxesNetofRefundsDetails</Role>
      <ShortName>Income Taxes - Cash Paid for Income Taxes, Net of Refunds (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>105</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R106.htm</HtmlFileName>
      <LongName>9955583 - Disclosure - Income Taxes - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/IncomeTaxesNarrativeDetails</Role>
      <ShortName>Income Taxes - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>106</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R107.htm</HtmlFileName>
      <LongName>9955584 - Disclosure - Income Taxes - Significant Components of Deferred Tax Assets and Liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/IncomeTaxesSignificantComponentsofDeferredTaxAssetsandLiabilitiesDetails</Role>
      <ShortName>Income Taxes - Significant Components of Deferred Tax Assets and Liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>107</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R108.htm</HtmlFileName>
      <LongName>9955585 - Disclosure - Income Taxes - Tax Carryforwards, Carryovers and Credits (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/IncomeTaxesTaxCarryforwardsCarryoversandCreditsDetails</Role>
      <ShortName>Income Taxes - Tax Carryforwards, Carryovers and Credits (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>108</Position>
    </Report>
    <Report instance="twlo-20251231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R109.htm</HtmlFileName>
      <LongName>9955586 - Disclosure - Income Taxes - Unrecognized Tax Benefits (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.twilio.com/role/IncomeTaxesUnrecognizedTaxBenefitsDetails</Role>
      <ShortName>Income Taxes - Unrecognized Tax Benefits (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>109</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-K" isDefinitelyFs="true" isUsgaap="true" original="twlo-20251231.htm">twlo-20251231.htm</File>
    <File>twlo-20251231.xsd</File>
    <File>twlo-20251231_cal.xml</File>
    <File>twlo-20251231_def.xml</File>
    <File>twlo-20251231_lab.xml</File>
    <File>twlo-20251231_pre.xml</File>
  </InputFiles>
  <SupplementalFiles>
    <File>twlo-20251231_g1.jpg</File>
    <File>twlo-20251231_g2.jpg</File>
  </SupplementalFiles>
  <BaseTaxonomies>
    <BaseTaxonomy items="1">http://fasb.org/srt/2025</BaseTaxonomy>
    <BaseTaxonomy items="1319">http://fasb.org/us-gaap/2025</BaseTaxonomy>
    <BaseTaxonomy items="15">http://xbrl.sec.gov/cyd/2025</BaseTaxonomy>
    <BaseTaxonomy items="39">http://xbrl.sec.gov/dei/2025</BaseTaxonomy>
    <BaseTaxonomy items="12">http://xbrl.sec.gov/ecd/2025</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
