<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.25.4</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>228</ContextCount>
  <ElementCount>460</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>75</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>11</UnitCount>
  <MyReports>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>0000001 - Document - Cover</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/Cover</Role>
      <ShortName>Cover</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>0000002 - Document - Audit Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/AuditInformation</Role>
      <ShortName>Audit Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>9952151 - Statement - CONSOLIDATED BALANCE SHEETS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/CONSOLIDATEDBALANCESHEETS</Role>
      <ShortName>CONSOLIDATED BALANCE SHEETS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="okta-20260131.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.okta.com/role/CONSOLIDATEDBALANCESHEETSParenthetical</Role>
      <ShortName>CONSOLIDATED BALANCE SHEETS (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="okta-20260131.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.okta.com/role/CONSOLIDATEDSTATEMENTSOFOPERATIONS</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF OPERATIONS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="okta-20260131.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.okta.com/role/CONSOLIDATEDSTATEMENTSOFCOMPREHENSIVEINCOMELOSS</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF COMPREHENSIVE INCOME (LOSS)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="okta-20260131.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.okta.com/role/CONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITY</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF STOCKHOLDERS' EQUITY</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="okta-20260131.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.okta.com/role/CONSOLIDATEDSTATEMENTSOFCASHFLOWS</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF CASH FLOWS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>9952157 - Disclosure - Overview and Basis of Presentation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/OverviewandBasisofPresentation</Role>
      <ShortName>Overview and Basis of Presentation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="okta-20260131.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.okta.com/role/SummaryofSignificantAccountingPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>9952159 - Disclosure - Restructuring and Other Charges</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/RestructuringandOtherCharges</Role>
      <ShortName>Restructuring and Other Charges</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>9952160 - Disclosure - Cash Equivalents and Investments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/CashEquivalentsandInvestments</Role>
      <ShortName>Cash Equivalents and Investments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>9952161 - Disclosure - Goodwill and Intangible Assets, net</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/GoodwillandIntangibleAssetsnet</Role>
      <ShortName>Goodwill and Intangible Assets, net</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>9952162 - Disclosure - Property and Equipment, net</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/PropertyandEquipmentnet</Role>
      <ShortName>Property and Equipment, net</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>9952163 - Disclosure - Deferred Revenue and Performance Obligations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/DeferredRevenueandPerformanceObligations</Role>
      <ShortName>Deferred Revenue and Performance Obligations</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>9952164 - Disclosure - Convertible Senior Notes, Net</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://www.okta.com/role/ConvertibleSeniorNotesNet</Role>
      <ShortName>Convertible Senior Notes, Net</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>9952165 - Disclosure - Leases</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/Leases</Role>
      <ShortName>Leases</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>9952166 - Disclosure - Commitments and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/CommitmentsandContingencies</Role>
      <ShortName>Commitments and Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>9952167 - Disclosure - Common Stock and Stockholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/CommonStockandStockholdersEquity</Role>
      <ShortName>Common Stock and Stockholders' Equity</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>9952168 - Disclosure - Employee Incentive Plans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/EmployeeIncentivePlans</Role>
      <ShortName>Employee Incentive Plans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>9952169 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/IncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>9952170 - Disclosure - Net Income (Loss) Per Share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/NetIncomeLossPerShare</Role>
      <ShortName>Net Income (Loss) Per Share</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>9952171 - Disclosure - Geographical Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/GeographicalInformation</Role>
      <ShortName>Geographical Information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>9952172 - Disclosure - Business Combinations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/BusinessCombinations</Role>
      <ShortName>Business Combinations</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.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>25</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.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>26</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.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>27</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>9955511 - Disclosure - Summary of Significant Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/SummaryofSignificantAccountingPoliciesPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.okta.com/role/SummaryofSignificantAccountingPolicies</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>9955512 - Disclosure - Summary of Significant Accounting Policies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/SummaryofSignificantAccountingPoliciesTables</Role>
      <ShortName>Summary of Significant Accounting Policies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.okta.com/role/SummaryofSignificantAccountingPolicies</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>9955513 - Disclosure - Restructuring and Other Charges (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/RestructuringandOtherChargesTables</Role>
      <ShortName>Restructuring and Other Charges (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.okta.com/role/RestructuringandOtherCharges</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>9955514 - Disclosure - Cash Equivalents and Investments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/CashEquivalentsandInvestmentsTables</Role>
      <ShortName>Cash Equivalents and Investments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.okta.com/role/CashEquivalentsandInvestments</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>9955515 - Disclosure - Goodwill and Intangible Assets, net (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/GoodwillandIntangibleAssetsnetTables</Role>
      <ShortName>Goodwill and Intangible Assets, net (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.okta.com/role/GoodwillandIntangibleAssetsnet</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>9955516 - Disclosure - Property and Equipment, net (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/PropertyandEquipmentnetTables</Role>
      <ShortName>Property and Equipment, net (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.okta.com/role/PropertyandEquipmentnet</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>9955517 - Disclosure - Leases (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/LeasesTables</Role>
      <ShortName>Leases (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.okta.com/role/Leases</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>9955518 - Disclosure - Common Stock and Stockholders' Equity (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/CommonStockandStockholdersEquityTables</Role>
      <ShortName>Common Stock and Stockholders' Equity (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.okta.com/role/CommonStockandStockholdersEquity</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>9955519 - Disclosure - Employee Incentive Plans (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/EmployeeIncentivePlansTables</Role>
      <ShortName>Employee Incentive Plans (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.okta.com/role/EmployeeIncentivePlans</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>9955520 - Disclosure - Income Taxes (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/IncomeTaxesTables</Role>
      <ShortName>Income Taxes (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.okta.com/role/IncomeTaxes</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>9955521 - Disclosure - Net Income (Loss) Per Share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/NetIncomeLossPerShareTables</Role>
      <ShortName>Net Income (Loss) Per Share (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.okta.com/role/NetIncomeLossPerShare</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>9955522 - Disclosure - Geographical Information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/GeographicalInformationTables</Role>
      <ShortName>Geographical Information (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.okta.com/role/GeographicalInformation</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>9955523 - Disclosure - Overview and Basis of Presentation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/OverviewandBasisofPresentationDetails</Role>
      <ShortName>Overview and Basis of Presentation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.okta.com/role/OverviewandBasisofPresentation</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>9955524 - Disclosure - Summary of Significant Accounting Policies - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/SummaryofSignificantAccountingPoliciesNarrativeDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>41</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>9955525 - Disclosure - Summary of Significant Accounting Policies - Schedule of Estimated Useful Lives (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/SummaryofSignificantAccountingPoliciesScheduleofEstimatedUsefulLivesDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Schedule of Estimated Useful Lives (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>42</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>9955526 - Disclosure - Restructuring and Other Charges - Summary of Restructuring and Other Charges (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/RestructuringandOtherChargesSummaryofRestructuringandOtherChargesDetails</Role>
      <ShortName>Restructuring and Other Charges - Summary of Restructuring and Other Charges (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>9955527 - Disclosure - Restructuring and Other Charges - Schedule of Restructuring Reserve (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/RestructuringandOtherChargesScheduleofRestructuringReserveDetails</Role>
      <ShortName>Restructuring and Other Charges - Schedule of Restructuring Reserve (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>9955528 - Disclosure - Restructuring and Other Charges - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/RestructuringandOtherChargesNarrativeDetails</Role>
      <ShortName>Restructuring and Other Charges - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>45</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>9955529 - Disclosure - Cash Equivalents and Investments - Schedule of Cash Equivalents and Short-term Investments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/CashEquivalentsandInvestmentsScheduleofCashEquivalentsandShorttermInvestmentsDetails</Role>
      <ShortName>Cash Equivalents and Investments - Schedule of Cash Equivalents and Short-term Investments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>46</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>9955530 - Disclosure - Cash Equivalents and Investments - Schedule of Contractual Maturities of Short-term Investments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/CashEquivalentsandInvestmentsScheduleofContractualMaturitiesofShorttermInvestmentsDetails</Role>
      <ShortName>Cash Equivalents and Investments - Schedule of Contractual Maturities of Short-term Investments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>47</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>9955531 - Disclosure - Cash Equivalents and Investments - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/CashEquivalentsandInvestmentsNarrativeDetails</Role>
      <ShortName>Cash Equivalents and Investments - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>9955532 - Disclosure - Goodwill and Intangible Assets, net - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/GoodwillandIntangibleAssetsnetNarrativeDetails</Role>
      <ShortName>Goodwill and Intangible Assets, net - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>9955533 - Disclosure - Goodwill and Intangible Assets, net - Schedule of Intangible Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/GoodwillandIntangibleAssetsnetScheduleofIntangibleAssetsDetails</Role>
      <ShortName>Goodwill and Intangible Assets, net - Schedule of Intangible Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>50</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>9955534 - Disclosure - Goodwill and Intangible Assets, net - Remaining Amortization Expense (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/GoodwillandIntangibleAssetsnetRemainingAmortizationExpenseDetails</Role>
      <ShortName>Goodwill and Intangible Assets, net - Remaining Amortization Expense (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>51</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>9955535 - Disclosure - Property and Equipment, net - Schedule of Property and Equipment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/PropertyandEquipmentnetScheduleofPropertyandEquipmentDetails</Role>
      <ShortName>Property and Equipment, net - Schedule of Property and Equipment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>9955536 - Disclosure - Property and Equipment, net - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/PropertyandEquipmentnetNarrativeDetails</Role>
      <ShortName>Property and Equipment, net - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>53</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>9955537 - Disclosure - Deferred Revenue and Performance Obligations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/DeferredRevenueandPerformanceObligationsDetails</Role>
      <ShortName>Deferred Revenue and Performance Obligations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.okta.com/role/DeferredRevenueandPerformanceObligations</ParentRole>
      <Position>54</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>9955538 - Disclosure - Convertible Senior Notes, Net (Details)</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://www.okta.com/role/ConvertibleSeniorNotesNetDetails</Role>
      <ShortName>Convertible Senior Notes, Net (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.okta.com/role/ConvertibleSeniorNotesNet</ParentRole>
      <Position>55</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>9955539 - Disclosure - Leases - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/LeasesNarrativeDetails</Role>
      <ShortName>Leases - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>56</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>9955540 - Disclosure - Leases - Schedule of Operating Lease Costs (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/LeasesScheduleofOperatingLeaseCostsDetails</Role>
      <ShortName>Leases - Schedule of Operating Lease Costs (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>57</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>9955541 - Disclosure - Leases - Schedule of Maturities of Operating Leases (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/LeasesScheduleofMaturitiesofOperatingLeasesDetails</Role>
      <ShortName>Leases - Schedule of Maturities of Operating Leases (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>58</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>9955542 - Disclosure - Commitments and Contingencies (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/CommitmentsandContingenciesDetails</Role>
      <ShortName>Commitments and Contingencies (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.okta.com/role/CommitmentsandContingencies</ParentRole>
      <Position>59</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>9955543 - Disclosure - Common Stock and Stockholders' Equity - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/CommonStockandStockholdersEquityNarrativeDetails</Role>
      <ShortName>Common Stock and Stockholders' Equity - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>60</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>9955544 - Disclosure - Common Stock and Stockholders' Equity - Schedule of Common Stock Reserved for Future Issuance (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/CommonStockandStockholdersEquityScheduleofCommonStockReservedforFutureIssuanceDetails</Role>
      <ShortName>Common Stock and Stockholders' Equity - Schedule of Common Stock Reserved for Future Issuance (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>61</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>9955545 - Disclosure - Employee Incentive Plans - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/EmployeeIncentivePlansNarrativeDetails</Role>
      <ShortName>Employee Incentive Plans - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>62</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>9955546 - Disclosure - Employee Incentive Plans - Schedule of Stock-based Compensation Expense by Award Type (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/EmployeeIncentivePlansScheduleofStockbasedCompensationExpensebyAwardTypeDetails</Role>
      <ShortName>Employee Incentive Plans - Schedule of Stock-based Compensation Expense by Award Type (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>63</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>9955547 - Disclosure - Employee Incentive Plans - Schedule of Stock-based Compensation Expense by Statement of Operations Location (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/EmployeeIncentivePlansScheduleofStockbasedCompensationExpensebyStatementofOperationsLocationDetails</Role>
      <ShortName>Employee Incentive Plans - Schedule of Stock-based Compensation Expense by Statement of Operations Location (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>64</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>9955548 - Disclosure - Employee Incentive Plans - Schedule of Stock Option Activity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/EmployeeIncentivePlansScheduleofStockOptionActivityDetails</Role>
      <ShortName>Employee Incentive Plans - Schedule of Stock Option Activity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>65</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>9955549 - Disclosure - Employee Incentive Plans - Schedule of Restricted Stock Unit Activity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/EmployeeIncentivePlansScheduleofRestrictedStockUnitActivityDetails</Role>
      <ShortName>Employee Incentive Plans - Schedule of Restricted Stock Unit Activity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>66</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>9955550 - Disclosure - Employee Incentive Plans - Schedule of Estimated Fair Value Assumptions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/EmployeeIncentivePlansScheduleofEstimatedFairValueAssumptionsDetails</Role>
      <ShortName>Employee Incentive Plans - Schedule of Estimated Fair Value Assumptions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>67</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>9955551 - Disclosure - Income Taxes - Schedule of Domestic and Foreign Components of Pre-tax Loss (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/IncomeTaxesScheduleofDomesticandForeignComponentsofPretaxLossDetails</Role>
      <ShortName>Income Taxes - Schedule of Domestic and Foreign Components of Pre-tax Loss (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>68</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>9955552 - Disclosure - Income Taxes - Schedule of Components of Provision for (Benefit from) Income Taxes (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/IncomeTaxesScheduleofComponentsofProvisionforBenefitfromIncomeTaxesDetails</Role>
      <ShortName>Income Taxes - Schedule of Components of Provision for (Benefit from) Income Taxes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>69</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>9955553 - Disclosure - Income Taxes - Reconciliation of Effective Income Tax Rate - 2026 (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/IncomeTaxesReconciliationofEffectiveIncomeTaxRate2026Details</Role>
      <ShortName>Income Taxes - Reconciliation of Effective Income Tax Rate - 2026 (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>70</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>9955554 - Disclosure - Income Taxes - Reconciliation of Effective Income Tax Rate - 2025 and 2024 (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/IncomeTaxesReconciliationofEffectiveIncomeTaxRate2025and2024Details</Role>
      <ShortName>Income Taxes - Reconciliation of Effective Income Tax Rate - 2025 and 2024 (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>71</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>9955555 - Disclosure - Income Taxes - Schedule of Deferred Tax Assets and Liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/IncomeTaxesScheduleofDeferredTaxAssetsandLiabilitiesDetails</Role>
      <ShortName>Income Taxes - Schedule of Deferred Tax Assets and Liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>72</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>9955556 - Disclosure - Income Taxes - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/IncomeTaxesNarrativeDetails</Role>
      <ShortName>Income Taxes - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>73</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>9955557 - Disclosure - Income Taxes - Unrecognized Tax Benefits Rollforward (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/IncomeTaxesUnrecognizedTaxBenefitsRollforwardDetails</Role>
      <ShortName>Income Taxes - Unrecognized Tax Benefits Rollforward (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>74</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R75.htm</HtmlFileName>
      <LongName>9955558 - Disclosure - Income Taxes - Schedule of Income Taxes Paid, Net (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/IncomeTaxesScheduleofIncomeTaxesPaidNetDetails</Role>
      <ShortName>Income Taxes - Schedule of Income Taxes Paid, Net (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>75</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R76.htm</HtmlFileName>
      <LongName>9955559 - Disclosure - Net Income (Loss) Per Share - Schedule of Basic and Diluted Net Loss Per Share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/NetIncomeLossPerShareScheduleofBasicandDilutedNetLossPerShareDetails</Role>
      <ShortName>Net Income (Loss) Per Share - Schedule of Basic and Diluted Net Loss Per Share (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.okta.com/role/NetIncomeLossPerShareTables</ParentRole>
      <Position>76</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R77.htm</HtmlFileName>
      <LongName>9955560 - Disclosure - Net Income (Loss) Per Share - Schedule of Potentially Dilutive Securities Excluded from Computation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/NetIncomeLossPerShareScheduleofPotentiallyDilutiveSecuritiesExcludedfromComputationDetails</Role>
      <ShortName>Net Income (Loss) Per Share - Schedule of Potentially Dilutive Securities Excluded from Computation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.okta.com/role/NetIncomeLossPerShareTables</ParentRole>
      <Position>77</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R78.htm</HtmlFileName>
      <LongName>9955561 - Disclosure - Geographical Information - Schedule of Revenue by Geographic Area (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/GeographicalInformationScheduleofRevenuebyGeographicAreaDetails</Role>
      <ShortName>Geographical Information - Schedule of Revenue by Geographic Area (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>78</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R79.htm</HtmlFileName>
      <LongName>9955562 - Disclosure - Geographical Information - Schedule of Long-Lived Assets by Geographic Areas (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/GeographicalInformationScheduleofLongLivedAssetsbyGeographicAreasDetails</Role>
      <ShortName>Geographical Information - Schedule of Long-Lived Assets by Geographic Areas (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>79</Position>
    </Report>
    <Report instance="okta-20260131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R80.htm</HtmlFileName>
      <LongName>9955563 - Disclosure - Business Combinations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/BusinessCombinationsDetails</Role>
      <ShortName>Business Combinations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.okta.com/role/BusinessCombinations</ParentRole>
      <Position>80</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="okta-20260131.htm">okta-20260131.htm</File>
    <File>okta-20260131.xsd</File>
    <File>okta-20260131_cal.xml</File>
    <File>okta-20260131_def.xml</File>
    <File>okta-20260131_lab.xml</File>
    <File>okta-20260131_pre.xml</File>
  </InputFiles>
  <SupplementalFiles>
    <File>okta-20260131_g1.jpg</File>
  </SupplementalFiles>
  <BaseTaxonomies>
    <BaseTaxonomy items="1">http://fasb.org/srt/2025</BaseTaxonomy>
    <BaseTaxonomy items="1000">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="40">http://xbrl.sec.gov/ecd/2025</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
