<?xml version="1.0" encoding="utf-8"?>
<FilingSummary xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Version>2.4.0.8</Version>
  <ProcessingTime />
  <ReportFormat>HtmlAndXml</ReportFormat>
  <ContextCount>194</ContextCount>
  <ElementCount>204</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>65</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>16</UnitCount>
  <MyReports>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>0001000 - Document - Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/DocumentAndEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <XmlFileName>R1.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>true</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>1001000 - Statement - Condensed Consolidated Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CondensedConsolidatedBalanceSheets</Role>
      <ShortName>Condensed Consolidated Balance Sheets</ShortName>
      <XmlFileName>R2.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>1001501 - Statement - Condensed Consolidated Balance Sheets (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CondensedConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>Condensed Consolidated Balance Sheets (Parenthetical)</ShortName>
      <XmlFileName>R3.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>1002000 - Statement - Condensed Consolidated Statements of Operations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations</Role>
      <ShortName>Condensed Consolidated Statements of Operations</ShortName>
      <XmlFileName>R4.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>1003000 - Statement - Condensed Consolidated Statements of Comprehensive Loss</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CondensedConsolidatedStatementsOfComprehensiveLoss</Role>
      <ShortName>Condensed Consolidated Statements of Comprehensive Loss</ShortName>
      <XmlFileName>R5.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>1003001 - Statement - Condensed Consolidated Statements of Comprehensive Loss (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CondensedConsolidatedStatementsOfComprehensiveLossParenthetical</Role>
      <ShortName>Condensed Consolidated Statements of Comprehensive Loss (Parenthetical)</ShortName>
      <XmlFileName>R6.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>1004000 - Statement - Condensed Consolidated Statements of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows</Role>
      <ShortName>Condensed Consolidated Statements of Cash Flows</ShortName>
      <XmlFileName>R7.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>2101100 - Disclosure - Description of Business</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/DescriptionOfBusiness</Role>
      <ShortName>Description of Business</ShortName>
      <XmlFileName>R8.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>2102100 - 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>
      <XmlFileName>R9.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>2103100 - Disclosure - Collaborative Research and Development Agreements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CollaborativeResearchAndDevelopmentAgreements</Role>
      <ShortName>Collaborative Research and Development Agreements</ShortName>
      <XmlFileName>R10.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>2105100 - Disclosure - Balance Sheets Details</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/BalanceSheetsDetails</Role>
      <ShortName>Balance Sheets Details</ShortName>
      <XmlFileName>R11.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>2106100 - Disclosure - Cash Equivalents and Marketable Securities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CashEquivalentsAndMarketableSecurities</Role>
      <ShortName>Cash Equivalents and Marketable Securities</ShortName>
      <XmlFileName>R12.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>2107100 - Disclosure - Fair Value Measurements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/FairValueMeasurements</Role>
      <ShortName>Fair Value Measurements</ShortName>
      <XmlFileName>R13.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>2108100 - Disclosure - Related Party Transactions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/RelatedPartyTransactions</Role>
      <ShortName>Related Party Transactions</ShortName>
      <XmlFileName>R14.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>2109100 - Disclosure - Commitments and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CommitmentsAndContingencies</Role>
      <ShortName>Commitments and Contingencies</ShortName>
      <XmlFileName>R15.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>2110100 - Disclosure - Warrants</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/Warrants</Role>
      <ShortName>Warrants</ShortName>
      <XmlFileName>R16.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>2111100 - Disclosure - Stock-Based Compensation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/StockBasedCompensation</Role>
      <ShortName>Stock-Based Compensation</ShortName>
      <XmlFileName>R17.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>2112100 - Disclosure - Segment Reporting</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/SegmentReporting</Role>
      <ShortName>Segment Reporting</ShortName>
      <XmlFileName>R18.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>2113100 - Disclosure - Restructuring</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/Restructuring</Role>
      <ShortName>Restructuring</ShortName>
      <XmlFileName>R19.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>2114100 - Disclosure - Subsequent Event</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/SubsequentEvent</Role>
      <ShortName>Subsequent Event</ShortName>
      <XmlFileName>R20.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>2202201 - 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>
      <XmlFileName>R21.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>2302302 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/BasisOfPresentationAndSummaryOfSignificantAccountingPoliciesTables</Role>
      <ShortName>Basis of Presentation and Summary of Significant Accounting Policies (Tables)</ShortName>
      <XmlFileName>R22.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>2305301 - Disclosure - Balance Sheets Details (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/BalanceSheetsDetailsTables</Role>
      <ShortName>Balance Sheets Details (Tables)</ShortName>
      <XmlFileName>R23.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>2306301 - Disclosure - Cash Equivalents and Marketable Securities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesTables</Role>
      <ShortName>Cash Equivalents and Marketable Securities (Tables)</ShortName>
      <XmlFileName>R24.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>2307301 - Disclosure - Fair Value Measurements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/FairValueMeasurementsTables</Role>
      <ShortName>Fair Value Measurements (Tables)</ShortName>
      <XmlFileName>R25.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>2309301 - Disclosure - Commitments and Contingencies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CommitmentsAndContingenciesTables</Role>
      <ShortName>Commitments and Contingencies (Tables)</ShortName>
      <XmlFileName>R26.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>2310301 - Disclosure - Warrants (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/WarrantsTables</Role>
      <ShortName>Warrants (Tables)</ShortName>
      <XmlFileName>R27.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>2311301 - Disclosure - Stock-Based Compensation (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/StockBasedCompensationTables</Role>
      <ShortName>Stock-Based Compensation (Tables)</ShortName>
      <XmlFileName>R28.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>2312301 - Disclosure - Segment Reporting (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/SegmentReportingTables</Role>
      <ShortName>Segment Reporting (Tables)</ShortName>
      <XmlFileName>R29.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>2313301 - Disclosure - Restructuring (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/RestructuringTables</Role>
      <ShortName>Restructuring (Tables)</ShortName>
      <XmlFileName>R30.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>2401401 - Disclosure - Description of Business (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/DescriptionOfBusinessDetails</Role>
      <ShortName>Description of Business (Details)</ShortName>
      <XmlFileName>R31.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>2402403 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies (Textual) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/BasisOfPresentationAndSummaryOfSignificantAccountingPoliciesTextualDetails</Role>
      <ShortName>Basis of Presentation and Summary of Significant Accounting Policies (Textual) (Details)</ShortName>
      <XmlFileName>R32.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>2402404 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies (Anti-Dilutive Securities) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/BasisOfPresentationAndSummaryOfSignificantAccountingPoliciesAntiDilutiveSecuritiesDetails</Role>
      <ShortName>Basis of Presentation and Summary of Significant Accounting Policies (Anti-Dilutive Securities) (Details)</ShortName>
      <XmlFileName>R33.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>2403401 - Disclosure - Collaborative Research and Development Agreements (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CollaborativeResearchAndDevelopmentAgreementsDetails</Role>
      <ShortName>Collaborative Research and Development Agreements (Details)</ShortName>
      <XmlFileName>R34.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>2405402 - Disclosure - Balance Sheets Details (Inventory) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/BalanceSheetsDetailsInventoryDetails</Role>
      <ShortName>Balance Sheets Details (Inventory) (Details)</ShortName>
      <XmlFileName>R35.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>2405403 - Disclosure - Balance Sheets Details (Property and Equipment) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/BalanceSheetsDetailsPropertyAndEquipmentDetails</Role>
      <ShortName>Balance Sheets Details (Property and Equipment) (Details)</ShortName>
      <XmlFileName>R36.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>2405404 - Disclosure - Balance Sheets Details (Accumulated Other Comprehensive Income (Loss)) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/BalanceSheetsDetailsAccumulatedOtherComprehensiveIncomeLossDetails</Role>
      <ShortName>Balance Sheets Details (Accumulated Other Comprehensive Income (Loss)) (Details)</ShortName>
      <XmlFileName>R37.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>2406402 - Disclosure - Cash Equivalents and Marketable Securities (Components of Cash Equivalents and Marketable Securities) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesComponentsOfCashEquivalentsAndMarketableSecuritiesDetails</Role>
      <ShortName>Cash Equivalents and Marketable Securities (Components of Cash Equivalents and Marketable Securities) (Details)</ShortName>
      <XmlFileName>R38.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>2406403 - Disclosure - Cash Equivalents and Marketable Securities (Textual) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesTextualDetails</Role>
      <ShortName>Cash Equivalents and Marketable Securities (Textual) (Details)</ShortName>
      <XmlFileName>R39.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>2407402 - Disclosure - Fair Value Measurements (Schedule of Financial Instruments Measured at Fair Value on Recurring Basis) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/FairValueMeasurementsScheduleOfFinancialInstrumentsMeasuredAtFairValueOnRecurringBasisDetails</Role>
      <ShortName>Fair Value Measurements (Schedule of Financial Instruments Measured at Fair Value on Recurring Basis) (Details)</ShortName>
      <XmlFileName>R40.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>2407403 - Disclosure - Fair Value Measurements (Textual) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/FairValueMeasurementsTextualDetails</Role>
      <ShortName>Fair Value Measurements (Textual) (Details)</ShortName>
      <XmlFileName>R41.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>2408401 - Disclosure - Related Party Transactions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/RelatedPartyTransactionsDetails</Role>
      <ShortName>Related Party Transactions (Details)</ShortName>
      <XmlFileName>R42.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>2409402 - Disclosure - Commitments and Contingencies (Textual) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails</Role>
      <ShortName>Commitments and Contingencies (Textual) (Details)</ShortName>
      <XmlFileName>R43.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>2409403 - Disclosure - Commitments and Contingencies (Future Minimum Lease Payments) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails</Role>
      <ShortName>Commitments and Contingencies (Future Minimum Lease Payments) (Details)</ShortName>
      <XmlFileName>R44.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>2410402 - Disclosure - Warrants (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/WarrantsDetails</Role>
      <ShortName>Warrants (Details)</ShortName>
      <XmlFileName>R45.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>2411402 - Disclosure - Stock-Based Compensation (Textual) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/StockBasedCompensationTextualDetails</Role>
      <ShortName>Stock-Based Compensation (Textual) (Details)</ShortName>
      <XmlFileName>R46.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>2411403 - Disclosure - Stock-Based Compensation (Shares Available For Grant) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/StockBasedCompensationSharesAvailableForGrantDetails</Role>
      <ShortName>Stock-Based Compensation (Shares Available For Grant) (Details)</ShortName>
      <XmlFileName>R47.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>2411404 - 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>
      <XmlFileName>R48.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>2412402 - Disclosure - (Revenues by Geographic Area) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/RevenuesByGeographicAreaDetails</Role>
      <ShortName>(Revenues by Geographic Area) (Details)</ShortName>
      <XmlFileName>R49.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>2412403 - Disclosure - (Long-Lived Assets by Geographic Area) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/LongLivedAssetsByGeographicAreaDetails</Role>
      <ShortName>(Long-Lived Assets by Geographic Area) (Details)</ShortName>
      <XmlFileName>R50.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>2413402 - Disclosure - Restructuring (Changes in Restructuring Accrual) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/RestructuringChangesInRestructuringAccrualDetails</Role>
      <ShortName>Restructuring (Changes in Restructuring Accrual) (Details)</ShortName>
      <XmlFileName>R51.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>2413403 - Disclosure - Restructuring (Textual) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/RestructuringTextualDetails</Role>
      <ShortName>Restructuring (Textual) (Details)</ShortName>
      <XmlFileName>R52.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>2414401 - Disclosure - Subsequent Event (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/SubsequentEventDetails</Role>
      <ShortName>Subsequent Event (Details)</ShortName>
      <XmlFileName>R53.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <Logs>
    <Log type="Info">Element cdxs_LeaseAreaSpaceOccupancy had a mix of decimals attribute values: -3 0.</Log>
    <Log type="Info">Element cdxs_ShellCollaborativeResearchAndDevelopmentRevenue had a mix of decimals attribute values: -5 0.</Log>
    <Log type="Info">Element us-gaap_AvailableForSaleSecuritiesGrossUnrealizedLosses1 had a mix of decimals attribute values: -3 0.</Log>
    <Log type="Info">Element us-gaap_ResearchAndDevelopmentArrangementContractToPerformForOthersCompensationEarned had a mix of decimals attribute values: -5 -3.</Log>
    <Log type="Info">Element us-gaap_RestructuringReserveSettledWithCash had a mix of decimals attribute values: -5 -3.</Log>
    <Log type="Info">'Monetary' elements on report '2402403 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies (Textual) (Details)' had a mix of different decimal attribute values.</Log>
    <Log type="Info">'Monetary' elements on report '2403401 - Disclosure - Collaborative Research and Development Agreements (Details)' had a mix of different decimal attribute values.</Log>
    <Log type="Info">'Monetary' elements on report '2406402 - Disclosure - Cash Equivalents and Marketable Securities (Components of Cash Equivalents and Marketable Securities) (Details)' had a mix of different decimal attribute values.</Log>
    <Log type="Info">'Monetary' elements on report '2406403 - Disclosure - Cash Equivalents and Marketable Securities (Textual) (Details)' had a mix of different decimal attribute values.</Log>
    <Log type="Info">'Monetary' elements on report '2408401 - Disclosure - Related Party Transactions (Details)' had a mix of different decimal attribute values.</Log>
    <Log type="Info">'Monetary' elements on report '2409402 - Disclosure - Commitments and Contingencies (Textual) (Details)' had a mix of different decimal attribute values.</Log>
    <Log type="Info">'Monetary' elements on report '2413403 - Disclosure - Restructuring (Textual) (Details)' had a mix of different decimal attribute values.</Log>
    <Log type="Info">Process Flow-Through: 1001000 - Statement - Condensed Consolidated Balance Sheets</Log>
    <Log type="Info">	Process Flow-Through: Removing column 'Jun. 30, 2012'</Log>
    <Log type="Info">	Process Flow-Through: Removing column 'Dec. 31, 2011'</Log>
    <Log type="Info">Process Flow-Through: 1001501 - Statement - Condensed Consolidated Balance Sheets (Parenthetical)</Log>
    <Log type="Info">Process Flow-Through: 1002000 - Statement - Condensed Consolidated Statements of Operations</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Sep. 30, 2012'</Log>
    <Log type="Info">Process Flow-Through: 1003000 - Statement - Condensed Consolidated Statements of Comprehensive Loss</Log>
    <Log type="Info">Process Flow-Through: 1003001 - Statement - Condensed Consolidated Statements of Comprehensive Loss (Parenthetical)</Log>
    <Log type="Info">Process Flow-Through: 1004000 - Statement - Condensed Consolidated Statements of Cash Flows</Log>
  </Logs>
  <InputFiles>
    <File>cdxs-20130630.xml</File>
    <File>cdxs-20130630.xsd</File>
    <File>cdxs-20130630_cal.xml</File>
    <File>cdxs-20130630_def.xml</File>
    <File>cdxs-20130630_lab.xml</File>
    <File>cdxs-20130630_pre.xml</File>
  </InputFiles>
  <SupplementalFiles />
  <BaseTaxonomies />
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
