<?xml version="1.0" encoding="utf-8"?>
<FilingSummary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Version>2.4.0.6</Version>
  <ProcessingTime />
  <ReportFormat>Html</ReportFormat>
  <ContextCount>332</ContextCount>
  <ElementCount>428</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>103</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>12</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>
    </Report>
    <Report>
      <IsDefault>true</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>1001000 - Statement - Consolidated Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/ConsolidatedBalanceSheets</Role>
      <ShortName>Consolidated Balance Sheets</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>1001501 - Statement - Consolidated Balance Sheets (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/ConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>Consolidated Balance Sheets (Parenthetical)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>1002000 - Statement - Consolidated Statements of Operations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/ConsolidatedStatementsOfOperations</Role>
      <ShortName>Consolidated Statements of Operations</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>1003000 - Statement - Consolidated Statements of Comprehensive Income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/ConsolidatedStatementsOfComprehensiveIncome</Role>
      <ShortName>Consolidated Statements of Comprehensive Income</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>1004000 - Statement - Consolidated Statements of Redeemable Convertible Preferred Stock And Stockholders' Equity (Deficit)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/ConsolidatedStatementsOfRedeemableConvertiblePreferredStockAndStockholdersEquityDeficit</Role>
      <ShortName>Consolidated Statements of Redeemable Convertible Preferred Stock And Stockholders' Equity (Deficit)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>1005000 - Statement - Consolidated Statements of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/ConsolidatedStatementsOfCashFlows</Role>
      <ShortName>Consolidated Statements of Cash Flows</ShortName>
    </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>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>2102100 - Disclosure - Summary of Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/SummaryOfSignificantAccountingPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies</ShortName>
    </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>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>2104100 - Disclosure - Joint Development Agreement with CO2 Solutions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/JointDevelopmentAgreementWithCo2Solutions</Role>
      <ShortName>Joint Development Agreement with CO2 Solutions</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>2105100 - Disclosure - Balance Sheets and Statements of Operations Details</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/BalanceSheetsAndStatementsOfOperationsDetails</Role>
      <ShortName>Balance Sheets and Statements of Operations Details</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>2106100 - Disclosure - Fair Value</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/FairValue</Role>
      <ShortName>Fair Value</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>2107100 - Disclosure - Related Party Transactions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/RelatedPartyTransactions</Role>
      <ShortName>Related Party Transactions</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>2108100 - Disclosure - Commitments and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CommitmentsAndContingencies</Role>
      <ShortName>Commitments and Contingencies</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>2109100 - Disclosure - Warrants</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/Warrants</Role>
      <ShortName>Warrants</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>2110100 - Disclosure - Stockholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/StockholdersEquity</Role>
      <ShortName>Stockholders' Equity</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>2111100 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/IncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>2112100 - Disclosure - 401(k) Plan</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/A401KPlan</Role>
      <ShortName>401(k) Plan</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>2113100 - Disclosure - Segment Reporting</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/SegmentReporting</Role>
      <ShortName>Segment Reporting</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>2114100 - Disclosure - Restructuring</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/Restructuring</Role>
      <ShortName>Restructuring</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>2116100 - Disclosure - Selected Quarterly Financial Data (Unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/SelectedQuarterlyFinancialDataUnaudited</Role>
      <ShortName>Selected Quarterly Financial Data (Unaudited)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>2202201 - Disclosure - Summary of Significant Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/SummaryOfSignificantAccountingPoliciesPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies (Policies)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>2302302 - Disclosure - Summary of Significant Accounting Policies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/SummaryOfSignificantAccountingPoliciesTables</Role>
      <ShortName>Summary of Significant Accounting Policies (Tables)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>2305301 - Disclosure - Balance Sheets and Statements of Operations Details (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/BalanceSheetsAndStatementsOfOperationsDetailsTables</Role>
      <ShortName>Balance Sheets and Statements of Operations Details (Tables)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>2306301 - Disclosure - Fair Value (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/FairValueTables</Role>
      <ShortName>Fair Value (Tables)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>2308301 - Disclosure - Commitments and Contingencies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CommitmentsAndContingenciesTables</Role>
      <ShortName>Commitments and Contingencies (Tables)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>2309301 - Disclosure - Warrants (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/WarrantsTables</Role>
      <ShortName>Warrants (Tables)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>2310301 - Disclosure - Stockholders' Equity (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/StockholdersEquityTables</Role>
      <ShortName>Stockholders' Equity (Tables)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>2311301 - Disclosure - Income Taxes (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/IncomeTaxesTables</Role>
      <ShortName>Income Taxes (Tables)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>2313301 - Disclosure - Segment Reporting (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/SegmentReportingTables</Role>
      <ShortName>Segment Reporting (Tables)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>2314301 - Disclosure - Restructuring (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/RestructuringTables</Role>
      <ShortName>Restructuring (Tables)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>2316301 - Disclosure - Selected Quarterly Financial Data (Unaudited) (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/SelectedQuarterlyFinancialDataUnauditedTables</Role>
      <ShortName>Selected Quarterly Financial Data (Unaudited) (Tables)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.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>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>2402403 - Disclosure - Summary of Significant Accounting Policies (Textual) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/SummaryOfSignificantAccountingPoliciesTextualDetails</Role>
      <ShortName>Summary of Significant Accounting Policies (Textual) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>2402404 - Disclosure - Summary of Significant Accounting Policies (Plant, Property, and Equipment) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/SummaryOfSignificantAccountingPoliciesPlantPropertyAndEquipmentDetails</Role>
      <ShortName>Summary of Significant Accounting Policies (Plant, Property, and Equipment) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>2402405 - Disclosure - Summary of Significant Accounting Policies (Revenue Recognition) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/SummaryOfSignificantAccountingPoliciesRevenueRecognitionDetails</Role>
      <ShortName>Summary of Significant Accounting Policies (Revenue Recognition) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>2402406 - Disclosure - Summary of Significant Accounting Policies (Earnings Per Share) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/SummaryOfSignificantAccountingPoliciesEarningsPerShareDetails</Role>
      <ShortName>Summary of Significant Accounting Policies (Earnings Per Share) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>2402407 - Disclosure - Summary of Significant Accounting Policies (Anti-Dilutive Securities) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/SummaryOfSignificantAccountingPoliciesAntiDilutiveSecuritiesDetails</Role>
      <ShortName>Summary of Significant Accounting Policies (Anti-Dilutive Securities) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.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>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>2404401 - Disclosure - Joint Development Agreement with CO2 Solutions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/JointDevelopmentAgreementWithCo2SolutionsDetails</Role>
      <ShortName>Joint Development Agreement with CO2 Solutions (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>2405402 - Disclosure - Balance Sheets and Statements of Operations Details (Cash Equivalents, Marketable Securities and Other Investments) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/BalanceSheetsAndStatementsOfOperationsDetailsCashEquivalentsMarketableSecuritiesAndOtherInvestmentsDetails</Role>
      <ShortName>Balance Sheets and Statements of Operations Details (Cash Equivalents, Marketable Securities and Other Investments) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>2405403 - Disclosure - Balance Sheets and Statements of Operations Details (Schedule of Inventory Components) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/BalanceSheetsAndStatementsOfOperationsDetailsScheduleOfInventoryComponentsDetails</Role>
      <ShortName>Balance Sheets and Statements of Operations Details (Schedule of Inventory Components) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>2405404 - Disclosure - Balance Sheets and Statements of Operations Details (Property and Equipment, net) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/BalanceSheetsAndStatementsOfOperationsDetailsPropertyAndEquipmentNetDetails</Role>
      <ShortName>Balance Sheets and Statements of Operations Details (Property and Equipment, net) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>2405405 - Disclosure - Balance Sheets and Statements of Operations Details (Intangible Assets) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/BalanceSheetsAndStatementsOfOperationsDetailsIntangibleAssetsDetails</Role>
      <ShortName>Balance Sheets and Statements of Operations Details (Intangible Assets) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>2405406 - Disclosure - Balance Sheets and Statements of Operations Details (Intangible Asset Future Amortization Expense) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/BalanceSheetsAndStatementsOfOperationsDetailsIntangibleAssetFutureAmortizationExpenseDetails</Role>
      <ShortName>Balance Sheets and Statements of Operations Details (Intangible Asset Future Amortization Expense) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>2405407 - Disclosure - Balance Sheets and Statements of Operations Details (Interest Expense and Other, Net) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/BalanceSheetsAndStatementsOfOperationsDetailsInterestExpenseAndOtherNetDetails</Role>
      <ShortName>Balance Sheets and Statements of Operations Details (Interest Expense and Other, Net) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>2405408 - Disclosure - Balance Sheets and Statements of Operations Details (Textual) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/BalanceSheetsAndStatementsOfOperationsDetailsTextualDetails</Role>
      <ShortName>Balance Sheets and Statements of Operations Details (Textual) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>2406402 - Disclosure - Fair Value (Financial Assets measured at Fair Value on a Recurring Basis) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/FairValueFinancialAssetsMeasuredAtFairValueOnRecurringBasisDetails</Role>
      <ShortName>Fair Value (Financial Assets measured at Fair Value on a Recurring Basis) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>2406403 - Disclosure - Fair Value (Textual) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/FairValueTextualDetails</Role>
      <ShortName>Fair Value (Textual) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>2407401 - Disclosure - Related Party Transactions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/RelatedPartyTransactionsDetails</Role>
      <ShortName>Related Party Transactions (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>2408402 - Disclosure - Commitments and Contingencies (Future Minimum Payments Under Operating Leases) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumPaymentsUnderOperatingLeasesDetails</Role>
      <ShortName>Commitments and Contingencies (Future Minimum Payments Under Operating Leases) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>2408403 - 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>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>2409402 - Disclosure - Warrants (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/WarrantsDetails</Role>
      <ShortName>Warrants (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>2409403 - Disclosure - Warrants (Textual) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/WarrantsTextualDetails</Role>
      <ShortName>Warrants (Textual) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>2410402 - Disclosure - Stockholders' Equity (Stock Activity) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/StockholdersEquityStockActivityDetails</Role>
      <ShortName>Stockholders' Equity (Stock Activity) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>2410403 - Disclosure - Stockholders' Equity (Stock Option Exercise Price Range) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/StockholdersEquityStockOptionExercisePriceRangeDetails</Role>
      <ShortName>Stockholders' Equity (Stock Option Exercise Price Range) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>2410404 - Disclosure - Stockholders' Equity (Stock Options Vested and Expected to Vest) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/StockholdersEquityStockOptionsVestedAndExpectedToVestDetails</Role>
      <ShortName>Stockholders' Equity (Stock Options Vested and Expected to Vest) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>2410405 - Disclosure - Stockholders' Equity (Stock Option Assumptions) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/StockholdersEquityStockOptionAssumptionsDetails</Role>
      <ShortName>Stockholders' Equity (Stock Option Assumptions) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>2410407 - Disclosure - Stockholders' Equity (Stock-Based Compensation Expense) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/StockholdersEquityStockBasedCompensationExpenseDetails</Role>
      <ShortName>Stockholders' Equity (Stock-Based Compensation Expense) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>2410408 - Disclosure - Stockholders' Equity (Common Stock Reserve for Future Issuance) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/StockholdersEquityCommonStockReserveForFutureIssuanceDetails</Role>
      <ShortName>Stockholders' Equity (Common Stock Reserve for Future Issuance) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>2410409 - Disclosure - Stockholders' Equity (Textual) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/StockholdersEquityTextualDetails</Role>
      <ShortName>Stockholders' Equity (Textual) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>2411402 - Disclosure - Income Taxes (Components of Loss Before Provision for Income Taxes) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/IncomeTaxesComponentsOfLossBeforeProvisionForIncomeTaxesDetails</Role>
      <ShortName>Income Taxes (Components of Loss Before Provision for Income Taxes) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>2411403 - Disclosure - Income Taxes (Components of Provision for Income Taxes) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/IncomeTaxesComponentsOfProvisionForIncomeTaxesDetails</Role>
      <ShortName>Income Taxes (Components of Provision for Income Taxes) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>2411404 - Disclosure - Income Taxes (Tax Rate Reconciliation) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/IncomeTaxesTaxRateReconciliationDetails</Role>
      <ShortName>Income Taxes (Tax Rate Reconciliation) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>2411405 - Disclosure - Income Taxes (Components of Deferred Tax Assets and Liabilities) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/IncomeTaxesComponentsOfDeferredTaxAssetsAndLiabilitiesDetails</Role>
      <ShortName>Income Taxes (Components of Deferred Tax Assets and Liabilities) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>2411406 - Disclosure - Income Taxes (NOL and Tax Credit Carryforward) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/IncomeTaxesNolAndTaxCreditCarryforwardDetails</Role>
      <ShortName>Income Taxes (NOL and Tax Credit Carryforward) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>2411407 - Disclosure - Income Taxes (Unrecognized Tax Benefit Rollforward) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/IncomeTaxesUnrecognizedTaxBenefitRollforwardDetails</Role>
      <ShortName>Income Taxes (Unrecognized Tax Benefit Rollforward) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>2411408 - Disclosure - Income Taxes (Textual) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/IncomeTaxesTextualDetails</Role>
      <ShortName>Income Taxes (Textual) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>2412401 - Disclosure - 401(k) Plan (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/A401KPlanDetails</Role>
      <ShortName>401(k) Plan (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>2413402 - Disclosure - Segment Reporting (Revenues) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/SegmentReportingRevenuesDetails</Role>
      <ShortName>Segment Reporting (Revenues) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>2413403 - Disclosure - Segment Reporting (Long-lived assets) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/SegmentReportingLongLivedAssetsDetails</Role>
      <ShortName>Segment Reporting (Long-lived assets) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>2414402 - Disclosure - Restructuring (Reserve Rollforward) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/RestructuringReserveRollforwardDetails</Role>
      <ShortName>Restructuring (Reserve Rollforward) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>2414403 - Disclosure - Restructuring (Textual) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/RestructuringTextualDetails</Role>
      <ShortName>Restructuring (Textual) (Details)</ShortName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R75.htm</HtmlFileName>
      <LongName>2416402 - Disclosure - Selected Quarterly Financial Data (Unaudited) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.codexis.com/role/SelectedQuarterlyFinancialDataUnauditedDetails</Role>
      <ShortName>Selected Quarterly Financial Data (Unaudited) (Details)</ShortName>
    </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_CollaborativeResearchAndDevelopmentRevenue had a mix of decimals attribute values: -5 -3.</Log>
    <Log type="Info">Element us-gaap_AvailableForSaleSecuritiesFairValueDisclosure had a mix of decimals attribute values: -3 0.</Log>
    <Log type="Info">Element us-gaap_CommonStockSharesOutstanding had a mix of decimals attribute values: -5 -3.</Log>
    <Log type="Info">Element us-gaap_DueToAffiliateCurrent had a mix of decimals attribute values: -3 0.</Log>
    <Log type="Info">Element us-gaap_FiniteLivedIntangibleAssetsGross had a mix of decimals attribute values: -5 -3.</Log>
    <Log type="Info">Element us-gaap_ReimbursementRevenue had a mix of decimals attribute values: -5 -3.</Log>
    <Log type="Info">Element us-gaap_RestructuringCharges had a mix of decimals attribute values: -3 0.</Log>
    <Log type="Info">Element us-gaap_StockIssuedDuringPeriodSharesConversionOfConvertibleSecurities had a mix of decimals attribute values: -3 0.</Log>
    <Log type="Info">Element us-gaap_StockIssuedDuringPeriodSharesNewIssues had a mix of decimals attribute values: -3 0.</Log>
    <Log type="Info">Element us-gaap_StockIssuedDuringPeriodSharesStockOptionsExercised had a mix of decimals attribute values: -3 0.</Log>
    <Log type="Info">Element us-gaap_UnrecognizedTaxBenefitsIncomeTaxPenaltiesAndInterestExpense had a mix of decimals attribute values: -3 0.</Log>
    <Log type="Info">'Shares' elements on report '1004000 - Statement - Consolidated Statements of Redeemable Convertible Preferred Stock And Stockholders' Equity (Deficit)' had a mix of different decimal attribute values.</Log>
    <Log type="Info">'Monetary' elements on report '2402403 - Disclosure - 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 '2405402 - Disclosure - Balance Sheets and Statements of Operations Details (Cash Equivalents, Marketable Securities and Other Investments) (Details)' had a mix of different decimal attribute values.</Log>
    <Log type="Info">'Monetary' elements on report '2405408 - Disclosure - Balance Sheets and Statements of Operations Details (Textual) (Details)' had a mix of different decimal attribute values.</Log>
    <Log type="Info">'Monetary' elements on report '2406403 - Disclosure - Fair Value (Textual) (Details)' had a mix of different decimal attribute values.</Log>
    <Log type="Info">'Monetary' elements on report '2407401 - Disclosure - Related Party Transactions (Details)' had a mix of different decimal attribute values.</Log>
    <Log type="Info">'Monetary' elements on report '2408403 - Disclosure - Commitments and Contingencies (Textual) (Details)' had a mix of different decimal attribute values.</Log>
    <Log type="Info">'Monetary' elements on report '2410409 - Disclosure - Stockholders' Equity (Textual) (Details)' had a mix of different decimal attribute values.</Log>
    <Log type="Info">'Monetary' elements on report '2411408 - Disclosure - Income Taxes (Textual) (Details)' had a mix of different decimal attribute values.</Log>
    <Log type="Info">'Monetary' elements on report '2414402 - Disclosure - Restructuring (Reserve Rollforward) (Details)' had a mix of different decimal attribute values.</Log>
    <Log type="Info">Process Flow-Through: 1001000 - Statement - Consolidated Balance Sheets</Log>
    <Log type="Info">	Process Flow-Through: Removing column 'Dec. 31, 2010'</Log>
    <Log type="Info">	Process Flow-Through: Removing column 'Dec. 31, 2009'</Log>
    <Log type="Info">Process Flow-Through: 1001501 - Statement - Consolidated Balance Sheets (Parenthetical)</Log>
    <Log type="Info">Process Flow-Through: 1002000 - Statement - Consolidated Statements of Operations</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Dec. 31, 2012'</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Sep. 30, 2012'</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Jun. 30, 2012'</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Mar. 31, 2012'</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Dec. 31, 2011'</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Sep. 30, 2011'</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Jun. 30, 2011'</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Mar. 31, 2011'</Log>
    <Log type="Info">Process Flow-Through: 1003000 - Statement - Consolidated Statements of Comprehensive Income</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Dec. 31, 2012'</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Sep. 30, 2012'</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Jun. 30, 2012'</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Mar. 31, 2012'</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Dec. 31, 2011'</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Sep. 30, 2011'</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Jun. 30, 2011'</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Mar. 31, 2011'</Log>
    <Log type="Info">Process Flow-Through: 1005000 - Statement - Consolidated Statements of Cash Flows</Log>
  </Logs>
  <InputFiles>
    <File>cdxs-20121231.xml</File>
    <File>cdxs-20121231.xsd</File>
    <File>cdxs-20121231_cal.xml</File>
    <File>cdxs-20121231_def.xml</File>
    <File>cdxs-20121231_lab.xml</File>
    <File>cdxs-20121231_pre.xml</File>
  </InputFiles>
  <SupplementalFiles />
  <BaseTaxonomies />
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
