<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.26.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>166</ContextCount>
  <ElementCount>252</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>61</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>6</UnitCount>
  <MyReports>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>0000001 - Document - Cover Page</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CoverPage</Role>
      <ShortName>Cover Page</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>9952151 - Statement - Condensed Consolidated Balance Sheets (Unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CondensedConsolidatedBalanceSheetsUnaudited</Role>
      <ShortName>Condensed Consolidated Balance Sheets (Unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>9952152 - Statement - Condensed Consolidated Balance Sheets (Unaudited) (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CondensedConsolidatedBalanceSheetsUnauditedParenthetical</Role>
      <ShortName>Condensed Consolidated Balance Sheets (Unaudited) (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>9952153 - Statement - Condensed Consolidated Statements of Operations (Unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CondensedConsolidatedStatementsofOperationsUnaudited</Role>
      <ShortName>Condensed Consolidated Statements of Operations (Unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>9952154 - Statement - Condensed Consolidated Statements of Comprehensive Loss (Unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CondensedConsolidatedStatementsofComprehensiveLossUnaudited</Role>
      <ShortName>Condensed Consolidated Statements of Comprehensive Loss (Unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>9952155 - Statement - Condensed Consolidated Statements of Stockholders' Equity (Unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CondensedConsolidatedStatementsofStockholdersEquityUnaudited</Role>
      <ShortName>Condensed Consolidated Statements of Stockholders' Equity (Unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>9952156 - Statement - Condensed Consolidated Statements of Cash Flows (Unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CondensedConsolidatedStatementsofCashFlowsUnaudited</Role>
      <ShortName>Condensed Consolidated Statements of Cash Flows (Unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>9952157 - Disclosure - Description of Business</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/DescriptionofBusiness</Role>
      <ShortName>Description of Business</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>9952158 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPolicies</Role>
      <ShortName>Basis of Presentation and Summary of Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>9952159 - Disclosure - Revenue Recognition</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/RevenueRecognition</Role>
      <ShortName>Revenue Recognition</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>9952160 - Disclosure - Net Loss per Share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/NetLossperShare</Role>
      <ShortName>Net Loss per Share</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>9952161 - Disclosure - Investments in Non-Marketable Securities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/InvestmentsinNonMarketableSecurities</Role>
      <ShortName>Investments in Non-Marketable Securities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>9952162 - Disclosure - Fair Value Measurement</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/FairValueMeasurement</Role>
      <ShortName>Fair Value Measurement</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>9952163 - Disclosure - Balance Sheet Details</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/BalanceSheetDetails</Role>
      <ShortName>Balance Sheet Details</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>9952164 - Disclosure - Stock-based Compensation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/StockbasedCompensation</Role>
      <ShortName>Stock-based Compensation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>9952165 - Disclosure - Capital Stock</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CapitalStock</Role>
      <ShortName>Capital Stock</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>9952166 - Disclosure - Commitments and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CommitmentsandContingencies</Role>
      <ShortName>Commitments and Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>9952167 - Disclosure - Debt</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/Debt</Role>
      <ShortName>Debt</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>9952168 - Disclosure - Segment, Geographical and Other Revenue Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformation</Role>
      <ShortName>Segment, Geographical and Other Revenue Information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.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>20</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>9955511 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPolicies</Role>
      <ShortName>Basis of Presentation and Summary of Significant Accounting Policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPolicies</ParentRole>
      <Position>21</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>9955512 - Disclosure - Revenue Recognition (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/RevenueRecognitionTables</Role>
      <ShortName>Revenue Recognition (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.codexis.com/role/RevenueRecognition</ParentRole>
      <Position>22</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>9955513 - Disclosure - Net Loss per Share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/NetLossperShareTables</Role>
      <ShortName>Net Loss per Share (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.codexis.com/role/NetLossperShare</ParentRole>
      <Position>23</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>9955514 - Disclosure - Investments in Non-Marketable Securities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesTables</Role>
      <ShortName>Investments in Non-Marketable Securities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.codexis.com/role/InvestmentsinNonMarketableSecurities</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>9955515 - Disclosure - Fair Value Measurement (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/FairValueMeasurementTables</Role>
      <ShortName>Fair Value Measurement (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.codexis.com/role/FairValueMeasurement</ParentRole>
      <Position>25</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>9955516 - Disclosure - Balance Sheet Details (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/BalanceSheetDetailsTables</Role>
      <ShortName>Balance Sheet Details (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.codexis.com/role/BalanceSheetDetails</ParentRole>
      <Position>26</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>9955517 - Disclosure - Stock-based Compensation (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/StockbasedCompensationTables</Role>
      <ShortName>Stock-based Compensation (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.codexis.com/role/StockbasedCompensation</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>9955518 - Disclosure - Commitments and Contingencies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CommitmentsandContingenciesTables</Role>
      <ShortName>Commitments and Contingencies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.codexis.com/role/CommitmentsandContingencies</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>9955519 - Disclosure - Debt (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/DebtTables</Role>
      <ShortName>Debt (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.codexis.com/role/Debt</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>9955520 - Disclosure - Segment, Geographical and Other Revenue Information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationTables</Role>
      <ShortName>Segment, Geographical and Other Revenue Information (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformation</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>9955521 - Disclosure - Description of Business (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/DescriptionofBusinessDetails</Role>
      <ShortName>Description of Business (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.codexis.com/role/DescriptionofBusiness</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>9955522 - Disclosure - Revenue Recognition - Disaggregation of Revenue (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/RevenueRecognitionDisaggregationofRevenueDetails</Role>
      <ShortName>Revenue Recognition - Disaggregation of Revenue (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>32</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>9955523 - Disclosure - Revenue Recognition - Contracts with Customer (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/RevenueRecognitionContractswithCustomerDetails</Role>
      <ShortName>Revenue Recognition - Contracts with Customer (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>33</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>9955524 - Disclosure - Revenue Recognition - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/RevenueRecognitionNarrativeDetails</Role>
      <ShortName>Revenue Recognition - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>34</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>9955525 - Disclosure - Revenue Recognition - Revenue Recognized During Period (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/RevenueRecognitionRevenueRecognizedDuringPeriodDetails</Role>
      <ShortName>Revenue Recognition - Revenue Recognized During Period (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>35</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>9955526 - Disclosure - Revenue Recognition - Performance Obligation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/RevenueRecognitionPerformanceObligationDetails</Role>
      <ShortName>Revenue Recognition - Performance Obligation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>36</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>9955527 - Disclosure - Net Loss per Share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/NetLossperShareDetails</Role>
      <ShortName>Net Loss per Share (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.codexis.com/role/NetLossperShareTables</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>9955528 - Disclosure - Investments in Non-Marketable Securities - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesNarrativeDetails</Role>
      <ShortName>Investments in Non-Marketable Securities - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>38</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>9955529 - Disclosure - Investments in Non-Marketable Securities - Carrying Value and Fair Value of Securities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesCarryingValueandFairValueofSecuritiesDetails</Role>
      <ShortName>Investments in Non-Marketable Securities - Carrying Value and Fair Value of Securities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>39</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>9955530 - Disclosure - Fair Value Measurement - Financial Instruments Measured at Fair Value on a Recurring Basis (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/FairValueMeasurementFinancialInstrumentsMeasuredatFairValueonaRecurringBasisDetails</Role>
      <ShortName>Fair Value Measurement - Financial Instruments Measured at Fair Value on a Recurring Basis (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>40</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>9955531 - Disclosure - Fair Value Measurement - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/FairValueMeasurementNarrativeDetails</Role>
      <ShortName>Fair Value Measurement - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>41</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>9955532 - Disclosure - Balance Sheet Details - Inventories (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/BalanceSheetDetailsInventoriesDetails</Role>
      <ShortName>Balance Sheet Details - Inventories (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>42</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>9955533 - Disclosure - Balance Sheet Details - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/BalanceSheetDetailsNarrativeDetails</Role>
      <ShortName>Balance Sheet Details - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>9955534 - Disclosure - Balance Sheet Details - Property and Equipment, net (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/BalanceSheetDetailsPropertyandEquipmentnetDetails</Role>
      <ShortName>Balance Sheet Details - Property and Equipment, net (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>9955535 - Disclosure - Balance Sheet Details - Other Accrued Liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/BalanceSheetDetailsOtherAccruedLiabilitiesDetails</Role>
      <ShortName>Balance Sheet Details - Other Accrued Liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>45</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>9955536 - Disclosure - Stock-based Compensation - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/StockbasedCompensationNarrativeDetails</Role>
      <ShortName>Stock-based Compensation - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>46</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>9955537 - Disclosure - Stock-based Compensation - Stock-based Compensation Expense (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/StockbasedCompensationStockbasedCompensationExpenseDetails</Role>
      <ShortName>Stock-based Compensation - Stock-based Compensation Expense (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>47</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>9955538 - Disclosure - Capital Stock (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CapitalStockDetails</Role>
      <ShortName>Capital Stock (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.codexis.com/role/CapitalStock</ParentRole>
      <Position>48</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>9955539 - Disclosure - Commitments and Contingencies - Lease Cost (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CommitmentsandContingenciesLeaseCostDetails</Role>
      <ShortName>Commitments and Contingencies - Lease Cost (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>9955540 - Disclosure - Commitments and Contingencies - Other Lease Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CommitmentsandContingenciesOtherLeaseInformationDetails</Role>
      <ShortName>Commitments and Contingencies - Other Lease Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>50</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>9955541 - Disclosure - Commitments and Contingencies - Cash Paid for Lease Obligations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CommitmentsandContingenciesCashPaidforLeaseObligationsDetails</Role>
      <ShortName>Commitments and Contingencies - Cash Paid for Lease Obligations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>51</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>9955542 - Disclosure - Commitments and Contingencies - Maturity Analysis of Operating Lease (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CommitmentsandContingenciesMaturityAnalysisofOperatingLeaseDetails</Role>
      <ShortName>Commitments and Contingencies - Maturity Analysis of Operating Lease (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>9955543 - Disclosure - Commitments and Contingencies - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails</Role>
      <ShortName>Commitments and Contingencies - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>53</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>9955544 - Disclosure - Debt - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/DebtNarrativeDetails</Role>
      <ShortName>Debt - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>54</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>9955545 - Disclosure - Debt - Schedule of Long-Term Debt Instruments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/DebtScheduleofLongTermDebtInstrumentsDetails</Role>
      <ShortName>Debt - Schedule of Long-Term Debt Instruments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>55</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>9955546 - Disclosure - Debt - Schedule of Maturities of Long-Term Debt (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/DebtScheduleofMaturitiesofLongTermDebtDetails</Role>
      <ShortName>Debt - Schedule of Maturities of Long-Term Debt (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>56</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>9955547 - Disclosure - Segment, Geographical and Other Revenue Information - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationNarrativeDetails</Role>
      <ShortName>Segment, Geographical and Other Revenue Information - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationTables</ParentRole>
      <Position>57</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>9955548 - Disclosure - Segment, Geographical and Other Revenue Information - Concentration Risk (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationConcentrationRiskDetails</Role>
      <ShortName>Segment, Geographical and Other Revenue Information - Concentration Risk (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>58</Position>
    </Report>
    <Report instance="cdxs-20260331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>9955549 - Disclosure - Segment, Geographical and Other Revenue Information - Long-Lived Assets by Geographic Area (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationLongLivedAssetsbyGeographicAreaDetails</Role>
      <ShortName>Segment, Geographical and Other Revenue Information - Long-Lived Assets by Geographic Area (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>59</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File doctype="10-Q" isDefinitelyFs="true" isUsgaap="true" original="cdxs-20260331.htm">cdxs-20260331.htm</File>
    <File>cdxs-20260331.xsd</File>
    <File>cdxs-20260331_cal.xml</File>
    <File>cdxs-20260331_def.xml</File>
    <File>cdxs-20260331_lab.xml</File>
    <File>cdxs-20260331_pre.xml</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy items="554">http://fasb.org/us-gaap/2025</BaseTaxonomy>
    <BaseTaxonomy items="29">http://xbrl.sec.gov/dei/2025</BaseTaxonomy>
    <BaseTaxonomy items="4">http://xbrl.sec.gov/ecd/2025</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
