<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.22.4</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>285</ContextCount>
  <ElementCount>475</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>80</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>13</UnitCount>
  <MyReports>
    <Report instance="okta-20230131.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-20230131.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-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>0000003 - 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-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>0000004 - 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-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>0000005 - 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-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>0000006 - Statement - CONSOLIDATED STATEMENTS OF COMPREHENSIVE LOSS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/CONSOLIDATEDSTATEMENTSOFCOMPREHENSIVELOSS</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF COMPREHENSIVE LOSS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>0000007 - 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-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>0000008 - 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-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>0000009 - 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-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>0000010 - 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-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>0000011 - Disclosure - Business Combinations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/BusinessCombinations</Role>
      <ShortName>Business Combinations</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>0000012 - 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-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>0000013 - Disclosure - Fair Value Measurements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/FairValueMeasurements</Role>
      <ShortName>Fair Value Measurements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>0000014 - 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>14</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>0000015 - Disclosure - Balance Sheet Components</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/BalanceSheetComponents</Role>
      <ShortName>Balance Sheet Components</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>0000016 - 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>16</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>0000017 - 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>17</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>0000018 - Disclosure - Leases</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/Leases</Role>
      <ShortName>Leases</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>0000019 - 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>19</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>0000020 - 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>20</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>0000021 - 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>21</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>0000022 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/IncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>0000023 - Disclosure - Net Loss Per Share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/NetLossPerShare</Role>
      <ShortName>Net Loss Per Share</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>0000024 - 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>24</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>0000025 - Disclosure - Geographical Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/GeographicalInformation</Role>
      <ShortName>Geographical Information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>25</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>0000026 - 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>26</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>0000027 - 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>27</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>0000028 - 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>28</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>0000029 - Disclosure - Fair Value Measurements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/FairValueMeasurementsTables</Role>
      <ShortName>Fair Value Measurements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.okta.com/role/FairValueMeasurements</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>0000030 - 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>30</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>0000031 - Disclosure - Balance Sheet Components (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/BalanceSheetComponentsTables</Role>
      <ShortName>Balance Sheet Components (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.okta.com/role/BalanceSheetComponents</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>0000032 - Disclosure - Convertible Senior Notes, Net (Tables)</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://www.okta.com/role/ConvertibleSeniorNotesNetTables</Role>
      <ShortName>Convertible Senior Notes, Net (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.okta.com/role/ConvertibleSeniorNotesNet</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>0000033 - 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>33</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>0000034 - 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>34</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>0000035 - 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>35</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>0000036 - 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>36</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>0000037 - Disclosure - Net Loss Per Share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/NetLossPerShareTables</Role>
      <ShortName>Net Loss Per Share (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.okta.com/role/NetLossPerShare</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>0000038 - 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>38</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>0000039 - 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-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>0000040 - 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-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>0000041 - 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-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>0000042 - 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-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>0000043 - Disclosure - Summary of Significant Accounting Policies - Schedule of New Accounting Pronouncements (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/SummaryofSignificantAccountingPoliciesScheduleofNewAccountingPronouncementsDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Schedule of New Accounting Pronouncements (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>0000044 - 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>44</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>0000045 - 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>45</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>0000046 - 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>46</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>0000047 - 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>47</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>0000048 - Disclosure - Cash Equivalents and Investments - Schedule of Unrealized Loss Position and Fair Value of Debt Securities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/CashEquivalentsandInvestmentsScheduleofUnrealizedLossPositionandFairValueofDebtSecuritiesDetails</Role>
      <ShortName>Cash Equivalents and Investments - Schedule of Unrealized Loss Position and Fair Value of Debt Securities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>0000049 - Disclosure - Fair Value Measurements - Schedule of Financial Assets and Liabilities Measured at Fair Value (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/FairValueMeasurementsScheduleofFinancialAssetsandLiabilitiesMeasuredatFairValueDetails</Role>
      <ShortName>Fair Value Measurements - Schedule of Financial Assets and Liabilities Measured at Fair Value (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>0000050 - Disclosure - Fair Value Measurements - Schedule of Carrying Amounts and Estimated Fair Values of Convertible Note (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/FairValueMeasurementsScheduleofCarryingAmountsandEstimatedFairValuesofConvertibleNoteDetails</Role>
      <ShortName>Fair Value Measurements - Schedule of Carrying Amounts and Estimated Fair Values of Convertible Note (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>50</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>0000051 - 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>51</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>0000052 - 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>52</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>0000053 - 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>53</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>0000054 - Disclosure - Balance Sheet Components - Property and Equipment, Net (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/BalanceSheetComponentsPropertyandEquipmentNetDetails</Role>
      <ShortName>Balance Sheet Components - Property and Equipment, Net (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>54</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>0000055 - Disclosure - Balance Sheet Components - Schedule of Accrued Expenses and Other Current Liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/BalanceSheetComponentsScheduleofAccruedExpensesandOtherCurrentLiabilitiesDetails</Role>
      <ShortName>Balance Sheet Components - Schedule of Accrued Expenses and Other Current Liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>55</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>0000056 - Disclosure - Balance Sheet Components - Schedule of Other Liabilities, Noncurrent (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/BalanceSheetComponentsScheduleofOtherLiabilitiesNoncurrentDetails</Role>
      <ShortName>Balance Sheet Components - Schedule of Other Liabilities, Noncurrent (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>56</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>0000057 - 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>57</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>0000058 - Disclosure - Convertible Senior Notes, Net - Narrative (Details)</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://www.okta.com/role/ConvertibleSeniorNotesNetNarrativeDetails</Role>
      <ShortName>Convertible Senior Notes, Net - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>58</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>0000059 - Disclosure - Convertible Senior Notes, Net - Schedule of Interest Expense (Details)</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://www.okta.com/role/ConvertibleSeniorNotesNetScheduleofInterestExpenseDetails</Role>
      <ShortName>Convertible Senior Notes, Net - Schedule of Interest Expense (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>59</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>0000060 - Disclosure - Convertible Senior Notes, Net - Schedule of Convertible Debt (Details)</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://www.okta.com/role/ConvertibleSeniorNotesNetScheduleofConvertibleDebtDetails</Role>
      <ShortName>Convertible Senior Notes, Net - Schedule of Convertible Debt (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>60</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>0000061 - 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>61</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>0000062 - 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>62</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>0000063 - 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>63</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>0000064 - 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>64</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>0000065 - 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>65</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>0000066 - 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>66</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>0000067 - 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>67</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>0000068 - 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>68</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>0000069 - 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>69</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>0000070 - 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>70</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>0000071 - 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>71</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>0000072 - 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>72</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>0000073 - 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>73</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>0000074 - 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>74</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R75.htm</HtmlFileName>
      <LongName>0000075 - Disclosure - Income Taxes - Reconciliation of Effective Income Tax Rate (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/IncomeTaxesReconciliationofEffectiveIncomeTaxRateDetails</Role>
      <ShortName>Income Taxes - Reconciliation of Effective Income Tax Rate (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>75</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R76.htm</HtmlFileName>
      <LongName>0000076 - 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>76</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R77.htm</HtmlFileName>
      <LongName>0000077 - 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>77</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R78.htm</HtmlFileName>
      <LongName>0000078 - 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>78</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R79.htm</HtmlFileName>
      <LongName>0000079 - Disclosure - Net Loss Per Share - Schedule of Basic and Diluted Net Loss Per Share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/NetLossPerShareScheduleofBasicandDilutedNetLossPerShareDetails</Role>
      <ShortName>Net Loss Per Share - Schedule of Basic and Diluted Net Loss Per Share (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>79</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R80.htm</HtmlFileName>
      <LongName>0000080 - Disclosure - Net Loss Per Share - Schedule of Potentially Dilutive Securities Excluded from Computation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/NetLossPerShareScheduleofPotentiallyDilutiveSecuritiesExcludedfromComputationDetails</Role>
      <ShortName>Net Loss Per Share - Schedule of Potentially Dilutive Securities Excluded from Computation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>80</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R81.htm</HtmlFileName>
      <LongName>0000081 - Disclosure - Net Loss Per Share - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/NetLossPerShareNarrativeDetails</Role>
      <ShortName>Net Loss Per Share - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>81</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R82.htm</HtmlFileName>
      <LongName>0000082 - 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>82</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R83.htm</HtmlFileName>
      <LongName>0000083 - 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>83</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R84.htm</HtmlFileName>
      <LongName>0000084 - 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>84</Position>
    </Report>
    <Report instance="okta-20230131.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R85.htm</HtmlFileName>
      <LongName>0000085 - Disclosure - Geographical Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.okta.com/role/GeographicalInformationDetails</Role>
      <ShortName>Geographical Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.okta.com/role/GeographicalInformationTables</ParentRole>
      <Position>85</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <Logs>
    <Log type="Warning">[ix-0514-Hidden-Fact-Eligible-For-Transform] WARN: 7 fact(s) appearing in ix:hidden were eligible for transformation: okta:RevenueFromContractWithCustomerContractDuration, us-gaap:DebtInstrumentConvertibleConversionRatio1, us-gaap:SharebasedCompensationArrangementBySharebasedPaymentAwardAwardVestingRightsPercentage -  okta-20230131.htm 4</Log>
  </Logs>
  <InputFiles>
    <File doctype="10-K" original="okta-20230131.htm">okta-20230131.htm</File>
    <File>exhibit1016-transitionagre.htm</File>
    <File>okta-1312023_ex211.htm</File>
    <File>okta-1312023_ex231.htm</File>
    <File>okta-1312023_ex311.htm</File>
    <File>okta-1312023_ex312.htm</File>
    <File>okta-1312023_ex321.htm</File>
    <File>okta-20230131.xsd</File>
    <File>okta-20230131_cal.xml</File>
    <File>okta-20230131_def.xml</File>
    <File>okta-20230131_lab.xml</File>
    <File>okta-20230131_pre.xml</File>
  </InputFiles>
  <SupplementalFiles>
    <File>okta-20230131_g1.jpg</File>
  </SupplementalFiles>
  <BaseTaxonomies>
    <BaseTaxonomy items="1208">http://fasb.org/us-gaap/2022</BaseTaxonomy>
    <BaseTaxonomy items="38">http://xbrl.sec.gov/dei/2022</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
