{
 "instance": {
  "cdxs2019093010qsp.htm": {
   "axisCustom": 2,
   "axisStandard": 33,
   "contextCount": 370,
   "dts": {
    "calculationLink": {
     "local": [
      "cdxs-20190930_cal.xml"
     ]
    },
    "definitionLink": {
     "local": [
      "cdxs-20190930_def.xml"
     ],
     "remote": [
      "http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-eedm-def-2019-01-31.xml",
      "http://xbrl.fasb.org/srt/2019/elts/srt-eedm1-def-2019-01-31.xml"
     ]
    },
    "inline": {
     "local": [
      "cdxs2019093010qsp.htm"
     ]
    },
    "labelLink": {
     "local": [
      "cdxs-20190930_lab.xml"
     ],
     "remote": [
      "http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-doc-2019-01-31.xml",
      "https://xbrl.sec.gov/dei/2019/dei-doc-2019-01-31.xml"
     ]
    },
    "presentationLink": {
     "local": [
      "cdxs-20190930_pre.xml"
     ]
    },
    "referenceLink": {
     "remote": [
      "https://xbrl.sec.gov/dei/2019/dei-ref-2019-01-31.xml",
      "http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-ref-2019-01-31.xml"
     ]
    },
    "schema": {
     "local": [
      "cdxs-20190930.xsd"
     ],
     "remote": [
      "http://xbrl.fasb.org/srt/2019/elts/srt-types-2019-01-31.xsd",
      "http://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd",
      "http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd",
      "http://www.xbrl.org/2003/xl-2003-12-31.xsd",
      "http://www.xbrl.org/2003/xlink-2003-12-31.xsd",
      "http://www.xbrl.org/dtr/type/numeric-2009-12-16.xsd",
      "http://www.xbrl.org/dtr/type/nonNumeric-2009-12-16.xsd",
      "http://www.xbrl.org/2006/ref-2006-02-27.xsd",
      "http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd",
      "http://www.xbrl.org/2005/xbrldt-2005.xsd",
      "http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd",
      "http://xbrl.fasb.org/us-gaap/2019/elts/us-roles-2019-01-31.xsd",
      "http://xbrl.fasb.org/srt/2019/elts/srt-roles-2019-01-31.xsd",
      "https://xbrl.sec.gov/country/2017/country-2017-01-31.xsd",
      "http://xbrl.fasb.org/us-gaap/2019/elts/us-types-2019-01-31.xsd",
      "http://www.xbrl.org/lrr/arcrole/factExplanatory-2009-12-16.xsd",
      "http://www.xbrl.org/lrr/role/negated-2009-12-16.xsd",
      "http://www.xbrl.org/lrr/role/net-2009-12-16.xsd",
      "https://xbrl.sec.gov/currency/2019/currency-2019-01-31.xsd",
      "https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd",
      "https://xbrl.sec.gov/exch/2019/exch-2019-01-31.xsd",
      "http://xbrl.sec.gov/invest/2013/invest-2013-01-31.xsd",
      "http://xbrl.sec.gov/naics/2017/naics-2017-01-31.xsd",
      "http://xbrl.sec.gov/sic/2011/sic-2011-01-31.xsd",
      "https://xbrl.sec.gov/stpr/2018/stpr-2018-01-31.xsd",
      "http://www.xbrl.org/lrr/role/deprecated-2009-12-16.xsd",
      "http://www.xbrl.org/lrr/role/reference-2009-12-16.xsd",
      "http://xbrl.fasb.org/us-gaap/2019/elts/us-parts-codification-2019-01-31.xsd"
     ]
    }
   },
   "elementCount": 589,
   "entityCount": 1,
   "hidden": {
    "http://fasb.org/us-gaap/2019-01-31": 57,
    "http://www.codexis.com/20190930": 2,
    "http://xbrl.sec.gov/dei/2019-01-31": 5,
    "total": 64
   },
   "keyCustom": 41,
   "keyStandard": 357,
   "memberCustom": 59,
   "memberStandard": 46,
   "nsprefix": "cdxs",
   "nsuri": "http://www.codexis.com/20190930",
   "report": {
    "R1": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "dei:DocumentType",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "document",
     "isDefault": "true",
     "longName": "0001000 - Document - Cover Page",
     "role": "http://www.codexis.com/role/CoverPage",
     "shortName": "Cover Page",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "dei:DocumentType",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R10": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:RevenueFromContractWithCustomerTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2103100 - Disclosure - Revenue Recognition",
     "role": "http://www.codexis.com/role/RevenueRecognition",
     "shortName": "Revenue Recognition",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:RevenueFromContractWithCustomerTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R11": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:EarningsPerShareTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2104100 - Disclosure - Net Income (loss) per Share",
     "role": "http://www.codexis.com/role/NetIncomeLossPerShare",
     "shortName": "Net Income (loss) per Share",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:EarningsPerShareTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R12": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:CollaborativeArrangementDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2105100 - Disclosure - Collaborative Arrangements",
     "role": "http://www.codexis.com/role/CollaborativeArrangements",
     "shortName": "Collaborative Arrangements",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:CollaborativeArrangementDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R13": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "cdxs:CashEquivalentsandMarketableSecuritiesTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2106100 - Disclosure - Cash Equivalents and Marketable Securities",
     "role": "http://www.codexis.com/role/CashEquivalentsAndMarketableSecurities",
     "shortName": "Cash Equivalents and Marketable Securities",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "cdxs:CashEquivalentsandMarketableSecuritiesTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R14": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:FairValueMeasurementInputsDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2107100 - Disclosure - Fair Value Measurements",
     "role": "http://www.codexis.com/role/FairValueMeasurements",
     "shortName": "Fair Value Measurements",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:FairValueMeasurementInputsDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R15": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "cdxs:BalanceSheetsDetailsTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2108100 - Disclosure - Balance Sheets Details",
     "role": "http://www.codexis.com/role/BalanceSheetsDetails",
     "shortName": "Balance Sheets Details",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "cdxs:BalanceSheetsDetailsTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R16": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2109100 - Disclosure - Stock-Based Compensation",
     "role": "http://www.codexis.com/role/StockBasedCompensation",
     "shortName": "Stock-Based Compensation",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R17": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:StockholdersEquityNoteDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2110100 - Disclosure - Capital Stock",
     "role": "http://www.codexis.com/role/CapitalStock",
     "shortName": "Capital Stock",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:StockholdersEquityNoteDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R18": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:CommitmentsAndContingenciesDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2111100 - Disclosure - Commitments and Contingencies",
     "role": "http://www.codexis.com/role/CommitmentsAndContingencies",
     "shortName": "Commitments and Contingencies",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:CommitmentsAndContingenciesDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R19": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:RelatedPartyTransactionsDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2112100 - Disclosure - Related Party Transactions",
     "role": "http://www.codexis.com/role/RelatedPartyTransactions",
     "shortName": "Related Party Transactions",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:RelatedPartyTransactionsDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R2": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FI2019Q3",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:CashAndCashEquivalentsAtCarryingValue",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "1001000 - Statement - Condensed Consolidated Balance Sheets",
     "role": "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets",
     "shortName": "Condensed Consolidated Balance Sheets",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FI2019Q3",
      "decimals": "-3",
      "lang": null,
      "name": "us-gaap:AccountsReceivableNetCurrent",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R20": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:SegmentReportingDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2113100 - Disclosure - Segment, Geographical and Other Revenue Information",
     "role": "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformation",
     "shortName": "Segment, Geographical and Other Revenue Information",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:SegmentReportingDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R21": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:BasisOfAccountingPolicyPolicyTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2202201 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies (Policies)",
     "role": "http://www.codexis.com/role/BasisOfPresentationAndSummaryOfSignificantAccountingPoliciesPolicies",
     "shortName": "Basis of Presentation and Summary of Significant Accounting Policies (Policies)",
     "subGroupType": "policies",
     "uniqueAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:BasisOfAccountingPolicyPolicyTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R22": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DisaggregationOfRevenueTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2303301 - Disclosure - Revenue Recognition (Tables)",
     "role": "http://www.codexis.com/role/RevenueRecognitionTables",
     "shortName": "Revenue Recognition (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DisaggregationOfRevenueTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R23": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfEarningsPerShareBasicAndDilutedTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2304301 - Disclosure - Net Income (loss) per Share (Tables)",
     "role": "http://www.codexis.com/role/NetIncomeLossPerShareTables",
     "shortName": "Net Income (loss) per Share (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfEarningsPerShareBasicAndDilutedTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R24": {
     "firstAnchor": {
      "ancestors": [
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:InvestmentTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2306301 - Disclosure - Cash Equivalents and Marketable Securities (Tables)",
     "role": "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesTables",
     "shortName": "Cash Equivalents and Marketable Securities (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:InvestmentTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R25": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:FairValueAssetsMeasuredOnRecurringBasisTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2307301 - Disclosure - Fair Value Measurements (Tables)",
     "role": "http://www.codexis.com/role/FairValueMeasurementsTables",
     "shortName": "Fair Value Measurements (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:FairValueAssetsMeasuredOnRecurringBasisTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R26": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfInventoryCurrentTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2308301 - Disclosure - Balance Sheets Details (Tables)",
     "role": "http://www.codexis.com/role/BalanceSheetsDetailsTables",
     "shortName": "Balance Sheets Details (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfInventoryCurrentTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R27": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2309301 - Disclosure - Stock-Based Compensation (Tables)",
     "role": "http://www.codexis.com/role/StockBasedCompensationTables",
     "shortName": "Stock-Based Compensation (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R28": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfNewAccountingPronouncementsAndChangesInAccountingPrinciplesTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2311301 - Disclosure - Commitments and Contingencies (Tables)",
     "role": "http://www.codexis.com/role/CommitmentsAndContingenciesTables",
     "shortName": "Commitments and Contingencies (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfNewAccountingPronouncementsAndChangesInAccountingPrinciplesTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R29": {
     "firstAnchor": {
      "ancestors": [
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfSegmentReportingInformationBySegmentTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2313301 - Disclosure - Segment, Geographical and Other Revenue Information (Tables)",
     "role": "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationTables",
     "shortName": "Segment, Geographical and Other Revenue Information (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfSegmentReportingInformationBySegmentTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R3": {
     "firstAnchor": null,
     "groupType": "statement",
     "isDefault": "false",
     "longName": "1001501 - Statement - Condensed Consolidated Balance Sheets (Parenthetical)",
     "role": "http://www.codexis.com/role/CondensedConsolidatedBalanceSheetsParenthetical",
     "shortName": "Condensed Consolidated Balance Sheets (Parenthetical)",
     "subGroupType": "parenthetical",
     "uniqueAnchor": null
    },
    "R30": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:PaymentsOfStockIssuanceCosts",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2401401 - Disclosure - Description of Business - Textual (Details)",
     "role": "http://www.codexis.com/role/DescriptionOfBusinessTextualDetails",
     "shortName": "Description of Business - Textual (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "D2018Q4Dec-2018_srt_CounterpartyNameAxis_cdxs_NestecLtd.NestleHealthSciencesMember_us-gaap_CapitalizedCostsOfUnprovedPropertiesExcludedFromAmortizationByPropertyOrProjectAxis_cdxs_CDX6114Member_us-gaap_TypeOfArrangementAxis_us-gaap_CollaborativeArrangementMember",
      "decimals": "-5",
      "lang": null,
      "name": "cdxs:RevenueRecognitionMilestonePaymentAmount",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R31": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "us-gaap:SegmentReportingPolicyPolicyTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": "INF",
      "first": true,
      "lang": null,
      "name": "us-gaap:NumberOfOperatingSegments",
      "reportCount": 1,
      "unitRef": "segment",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2402402 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies - Textual (Details)",
     "role": "http://www.codexis.com/role/BasisOfPresentationAndSummaryOfSignificantAccountingPoliciesTextualDetails",
     "shortName": "Basis of Presentation and Summary of Significant Accounting Policies - Textual (Details)",
     "subGroupType": "details",
     "uniqueAnchor": null
    },
    "R32": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3QTD",
      "decimals": "INF",
      "first": true,
      "lang": null,
      "name": "us-gaap:ContractWithCustomerAssetCreditLossExpense",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2403402 - Disclosure - Revenue Recognition  - Additional Information (Details)",
     "role": "http://www.codexis.com/role/RevenueRecognitionAdditionalInformationDetails",
     "shortName": "Revenue Recognition  - Additional Information (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3QTD",
      "decimals": "INF",
      "first": true,
      "lang": null,
      "name": "us-gaap:ContractWithCustomerAssetCreditLossExpense",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R33": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3QTD",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2403403 - Disclosure - Revenue Recognition  - Disaggregation of Revenue (Details)",
     "role": "http://www.codexis.com/role/RevenueRecognitionDisaggregationOfRevenueDetails",
     "shortName": "Revenue Recognition  - Disaggregation of Revenue (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3QTD_srt_StatementGeographicalAxis_srt_AmericasMember_us-gaap_StatementBusinessSegmentsAxis_cdxs_CoreSegmentMember",
      "decimals": "-3",
      "lang": null,
      "name": "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R34": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FI2018Q4",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:ContractWithCustomerAssetNet",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2403405 - Disclosure - Revenue Recognition  - Contracts with Customer (Details)",
     "role": "http://www.codexis.com/role/RevenueRecognitionContractsWithCustomerDetails",
     "shortName": "Revenue Recognition  - Contracts with Customer (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": "-3",
      "lang": null,
      "name": "cdxs:ContractwithCustomerAssetNewContractAdditions",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R35": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FI2019Q3_us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionStartDateAxis_us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionStartDateAxis.domain_2019-10-01",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:RevenueRemainingPerformanceObligation",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2403406 - Disclosure - Revenue Recognition  - Performance Obligation (Details)",
     "role": "http://www.codexis.com/role/RevenueRecognitionPerformanceObligationDetails",
     "shortName": "Revenue Recognition  - Performance Obligation (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FI2019Q3_us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionStartDateAxis_us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionStartDateAxis.domain_2019-10-01",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:RevenueRemainingPerformanceObligation",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R36": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3QTD",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:NetIncomeLoss",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2404402 - Disclosure - Net Income (loss) per Share - Earnings Per Share (Details)",
     "role": "http://www.codexis.com/role/NetIncomeLossPerShareEarningsPerShareDetails",
     "shortName": "Net Income (loss) per Share - Earnings Per Share (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:ScheduleOfEarningsPerShareBasicAndDilutedTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3QTD",
      "decimals": "-3",
      "lang": null,
      "name": "us-gaap:WeightedAverageNumberDilutedSharesOutstandingAdjustment",
      "reportCount": 1,
      "unique": true,
      "unitRef": "shares",
      "xsiNil": "false"
     }
    },
    "R37": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3QTD_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_us-gaap_StockCompensationPlanMember",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount",
      "reportCount": 1,
      "unique": true,
      "unitRef": "shares",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2404403 - Disclosure - Net Income (loss) per Share - Anti-Dilutive Securities (Details)",
     "role": "http://www.codexis.com/role/NetIncomeLossPerShareAntiDilutiveSecuritiesDetails",
     "shortName": "Net Income (loss) per Share - Anti-Dilutive Securities (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3QTD_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_us-gaap_StockCompensationPlanMember",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount",
      "reportCount": 1,
      "unique": true,
      "unitRef": "shares",
      "xsiNil": "false"
     }
    },
    "R38": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3QTD",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2405401 - Disclosure - Collaborative Arrangements - Textual (Details)",
     "role": "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails",
     "shortName": "Collaborative Arrangements - Textual (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3QTD_cdxs_AgreementTypeAxis_cdxs_TechnologyTransferCollaborationandLicenseAgreementMember_srt_CounterpartyNameAxis_cdxs_GSKMember",
      "decimals": "-5",
      "lang": null,
      "name": "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R39": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FI2018Q4",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:CashAndCashEquivalentsAtCarryingValue",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2406402 - Disclosure - Cash Equivalents and Marketable Securities - Components of Cash Equivalents and Marketable Securities (Details)",
     "role": "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesComponentsOfCashEquivalentsAndMarketableSecuritiesDetails",
     "shortName": "Cash Equivalents and Marketable Securities - Components of Cash Equivalents and Marketable Securities (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FI2018Q4",
      "decimals": "-3",
      "lang": null,
      "name": "us-gaap:EquitySecuritiesFvNiCost",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R4": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3QTD",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "1002000 - Statement - Condensed Consolidated Statements of Operations",
     "role": "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations",
     "shortName": "Condensed Consolidated Statements of Operations",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3QTD",
      "decimals": "-3",
      "lang": null,
      "name": "us-gaap:InvestmentIncomeInterest",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R40": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FI2019Q3",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:CashAndCashEquivalentsAtCarryingValue",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2406403 - Disclosure - Cash Equivalents and Marketable Securities - Additional Information (Details)",
     "role": "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesAdditionalInformationDetails",
     "shortName": "Cash Equivalents and Marketable Securities - Additional Information (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "I2009Q4",
      "decimals": "3",
      "lang": null,
      "name": "cdxs:PercentageofOutstandingSharesOwnedatTimeofInvestment",
      "reportCount": 1,
      "unique": true,
      "unitRef": "number",
      "xsiNil": "false"
     }
    },
    "R41": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FI2018Q4",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:EquitySecuritiesFvNi",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2407402 - Disclosure - Fair Value Measurements  - Schedule of Financial Instruments Measured at Fair Value on Recurring Basis (Details)",
     "role": "http://www.codexis.com/role/FairValueMeasurementsScheduleOfFinancialInstrumentsMeasuredAtFairValueOnRecurringBasisDetails",
     "shortName": "Fair Value Measurements  - Schedule of Financial Instruments Measured at Fair Value on Recurring Basis (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:FairValueAssetsMeasuredOnRecurringBasisTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FI2018Q4",
      "decimals": "-3",
      "lang": null,
      "name": "us-gaap:AssetsFairValueDisclosure",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R42": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:ScheduleOfInventoryCurrentTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FI2019Q3",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:InventoryRawMaterials",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2408403 - Disclosure - Balance Sheets Details  - Inventories (Details)",
     "role": "http://www.codexis.com/role/BalanceSheetsDetailsInventoriesDetails",
     "shortName": "Balance Sheets Details  - Inventories (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:ScheduleOfInventoryCurrentTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FI2019Q3",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:InventoryRawMaterials",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R43": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:PropertyPlantAndEquipmentTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FI2019Q3",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:PropertyPlantAndEquipmentGross",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2408404 - Disclosure - Balance Sheets Details  - Property and Equipment, net (Details)",
     "role": "http://www.codexis.com/role/BalanceSheetsDetailsPropertyAndEquipmentNetDetails",
     "shortName": "Balance Sheets Details  - Property and Equipment, net (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:PropertyPlantAndEquipmentTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FI2019Q3",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:PropertyPlantAndEquipmentGross",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R44": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FI2019Q3",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:Goodwill",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2408405 - Disclosure - Balance Sheets Details  - Goodwill (Details)",
     "role": "http://www.codexis.com/role/BalanceSheetsDetailsGoodwillDetails",
     "shortName": "Balance Sheets Details  - Goodwill (Details)",
     "subGroupType": "details",
     "uniqueAnchor": null
    },
    "R45": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:ScheduleOfAccruedLiabilitiesTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FI2019Q3",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "cdxs:AccruedPurchaseReceivedNotYetBilled",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2408406 - Disclosure - Balance Sheets Details  - Accrued Liabilities (Details)",
     "role": "http://www.codexis.com/role/BalanceSheetsDetailsAccruedLiabilitiesDetails",
     "shortName": "Balance Sheets Details  - Accrued Liabilities (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:ScheduleOfAccruedLiabilitiesTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FI2019Q3",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "cdxs:AccruedPurchaseReceivedNotYetBilled",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R46": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "D2019Q2Jun-2019_us-gaap_AwardTypeAxis_cdxs_IncentiveStockOptionsMember",
      "decimals": "INF",
      "first": true,
      "lang": null,
      "name": "us-gaap:SharebasedCompensationArrangementBySharebasedPaymentAwardPurchasePriceOfCommonStockPercent",
      "reportCount": 1,
      "unique": true,
      "unitRef": "number",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2409402 - Disclosure - Stock-Based Compensation  - Textual (Details)",
     "role": "http://www.codexis.com/role/StockBasedCompensationTextualDetails",
     "shortName": "Stock-Based Compensation  - Textual (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "D2019Q2Jun-2019_us-gaap_AwardTypeAxis_cdxs_IncentiveStockOptionsMember",
      "decimals": "INF",
      "first": true,
      "lang": null,
      "name": "us-gaap:SharebasedCompensationArrangementBySharebasedPaymentAwardPurchasePriceOfCommonStockPercent",
      "reportCount": 1,
      "unique": true,
      "unitRef": "number",
      "xsiNil": "false"
     }
    },
    "R47": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3QTD",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:ShareBasedCompensation",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2409403 - Disclosure - Stock-Based Compensation  - Stock-Based Compensation Expense (Details)",
     "role": "http://www.codexis.com/role/StockBasedCompensationStockBasedCompensationExpenseDetails",
     "shortName": "Stock-Based Compensation  - Stock-Based Compensation Expense (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:ScheduleOfSharebasedCompensationRestrictedStockAndRestrictedStockUnitsActivityTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3QTD_us-gaap_AwardTypeAxis_us-gaap_EmployeeStockOptionMember",
      "decimals": "-3",
      "lang": null,
      "name": "us-gaap:ShareBasedCompensation",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R48": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": "INF",
      "first": true,
      "lang": null,
      "name": "us-gaap:StockIssuedDuringPeriodSharesStockOptionsExercised",
      "reportCount": 1,
      "unitRef": "shares",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2410402 - Disclosure - Capital Stock  - Textual (Details)",
     "role": "http://www.codexis.com/role/CapitalStockTextualDetails",
     "shortName": "Capital Stock  - Textual (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": "2",
      "lang": null,
      "name": "us-gaap:ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsExercisesInPeriodWeightedAverageExercisePrice",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usdPerShare",
      "xsiNil": "false"
     }
    },
    "R49": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FI2019Q3",
      "decimals": "0",
      "first": true,
      "lang": null,
      "name": "us-gaap:AreaOfRealEstateProperty",
      "reportCount": 1,
      "unitRef": "sqft",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2411402 - Disclosure - Commitments and Contingencies  - Textual (Details)",
     "role": "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails",
     "shortName": "Commitments and Contingencies  - Textual (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FI2018Q4",
      "decimals": "-5",
      "lang": null,
      "name": "us-gaap:IncentiveFromLessor",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R5": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FI2017Q4_us-gaap_StatementEquityComponentsAxis_us-gaap_CommonStockMember",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:SharesOutstanding",
      "reportCount": 1,
      "unique": true,
      "unitRef": "shares",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "1004000 - Statement - Condensed Consolidated Statements of Stockholders' Equity",
     "role": "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquity",
     "shortName": "Condensed Consolidated Statements of Stockholders' Equity",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FI2017Q4_us-gaap_StatementEquityComponentsAxis_us-gaap_CommonStockMember",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:SharesOutstanding",
      "reportCount": 1,
      "unique": true,
      "unitRef": "shares",
      "xsiNil": "false"
     }
    },
    "R50": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FI2019Q3",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:OperatingLeaseRightOfUseAsset",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2411403 - Disclosure - Commitments and Contingencies  - Reconciliation of Right-of-use Assets and Lease Liabilities (Details)",
     "role": "http://www.codexis.com/role/CommitmentsAndContingenciesReconciliationOfRightOfUseAssetsAndLeaseLiabilitiesDetails",
     "shortName": "Commitments and Contingencies  - Reconciliation of Right-of-use Assets and Lease Liabilities (Details)",
     "subGroupType": "details",
     "uniqueAnchor": null
    },
    "R51": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:LeaseCostTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3QTD",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:FinanceLeaseRightOfUseAssetAmortization",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2411404 - Disclosure - Commitments and Contingencies  - Lease Cost (Details)",
     "role": "http://www.codexis.com/role/CommitmentsAndContingenciesLeaseCostDetails",
     "shortName": "Commitments and Contingencies  - Lease Cost (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:LeaseCostTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3QTD",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:FinanceLeaseRightOfUseAssetAmortization",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R52": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:FinanceLeaseLiabilityMaturityTableTextBlock",
       "us-gaap:LesseeOperatingLeaseLiabilityMaturityTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FI2019Q3",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:FinanceLeaseLiabilityPaymentsRemainderOfFiscalYear",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2411405 - Disclosure - Commitments and Contingencies  - Future Minimum Lease Payments (Details)",
     "role": "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails",
     "shortName": "Commitments and Contingencies  - Future Minimum Lease Payments (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:FinanceLeaseLiabilityMaturityTableTextBlock",
       "us-gaap:LesseeOperatingLeaseLiabilityMaturityTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FI2019Q3",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:FinanceLeaseLiabilityPaymentsRemainderOfFiscalYear",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R53": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:ScheduleOfFutureMinimumRentalPaymentsForOperatingLeasesTableTextBlock",
       "us-gaap:ScheduleOfFutureMinimumLeasePaymentsForCapitalLeasesTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FI2018Q4",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:CapitalLeasesFutureMinimumPaymentsRemainderOfFiscalYear",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2411406 - Disclosure - Commitments and Contingencies  - Future Minimum Lease Payments Under Topic 840 (Details)",
     "role": "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details",
     "shortName": "Commitments and Contingencies  - Future Minimum Lease Payments Under Topic 840 (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:ScheduleOfFutureMinimumRentalPaymentsForOperatingLeasesTableTextBlock",
       "us-gaap:ScheduleOfFutureMinimumLeasePaymentsForCapitalLeasesTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FI2018Q4",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:CapitalLeasesFutureMinimumPaymentsRemainderOfFiscalYear",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R54": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:SupplyCommitmentTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FI2019Q3_us-gaap_SupplyCommitmentAxis_us-gaap_SupplyCommitmentMember",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:UnrecordedUnconditionalPurchaseObligationBalanceSheetAmount",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2411407 - Disclosure - Commitments and Contingencies  - Other Commitments (Details)",
     "role": "http://www.codexis.com/role/CommitmentsAndContingenciesOtherCommitmentsDetails",
     "shortName": "Commitments and Contingencies  - Other Commitments (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:SupplyCommitmentTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FI2019Q3_us-gaap_SupplyCommitmentAxis_us-gaap_SupplyCommitmentMember",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:UnrecordedUnconditionalPurchaseObligationBalanceSheetAmount",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R55": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3QTD",
      "decimals": "-5",
      "first": true,
      "lang": null,
      "name": "us-gaap:RevenueFromRelatedParties",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2412401 - Disclosure - Related Party Transactions - Textual (Details)",
     "role": "http://www.codexis.com/role/RelatedPartyTransactionsTextualDetails",
     "shortName": "Related Party Transactions - Textual (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3QTD",
      "decimals": "-5",
      "first": true,
      "lang": null,
      "name": "us-gaap:RevenueFromRelatedParties",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R56": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "us-gaap:SegmentReportingPolicyPolicyTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": "INF",
      "first": true,
      "lang": null,
      "name": "us-gaap:NumberOfOperatingSegments",
      "reportCount": 1,
      "unitRef": "segment",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2413402 - Disclosure - Segment, Geographical and Other Revenue Information  - Additional Information (Details)",
     "role": "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationAdditionalInformationDetails",
     "shortName": "Segment, Geographical and Other Revenue Information  - Additional Information (Details)",
     "subGroupType": "details",
     "uniqueAnchor": null
    },
    "R57": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3QTD",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2413403 - Disclosure - Segment, Geographical and Other Revenue Information  - Segment Reporting (Details)",
     "role": "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationSegmentReportingDetails",
     "shortName": "Segment, Geographical and Other Revenue Information  - Segment Reporting (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "us-gaap:ScheduleOfSegmentReportingInformationBySegmentTextBlock",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3QTD_srt_ConsolidationItemsAxis_us-gaap_OperatingSegmentsMember",
      "decimals": "-3",
      "lang": null,
      "name": "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R58": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:SchedulesOfConcentrationOfRiskByRiskFactorTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3QTD_srt_MajorCustomersAxis_cdxs_CustomerAMember_us-gaap_ConcentrationRiskByBenchmarkAxis_us-gaap_SalesMember_us-gaap_ConcentrationRiskByTypeAxis_us-gaap_CustomerConcentrationRiskMember",
      "decimals": "2",
      "first": true,
      "lang": null,
      "name": "us-gaap:ConcentrationRiskPercentage1",
      "reportCount": 1,
      "unique": true,
      "unitRef": "number",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2413404 - Disclosure - Segment, Geographical and Other Revenue Information  - Concentration Risk (Details)",
     "role": "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationConcentrationRiskDetails",
     "shortName": "Segment, Geographical and Other Revenue Information  - Concentration Risk (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:SchedulesOfConcentrationOfRiskByRiskFactorTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3QTD_srt_MajorCustomersAxis_cdxs_CustomerAMember_us-gaap_ConcentrationRiskByBenchmarkAxis_us-gaap_SalesMember_us-gaap_ConcentrationRiskByTypeAxis_us-gaap_CustomerConcentrationRiskMember",
      "decimals": "2",
      "first": true,
      "lang": null,
      "name": "us-gaap:ConcentrationRiskPercentage1",
      "reportCount": 1,
      "unique": true,
      "unitRef": "number",
      "xsiNil": "false"
     }
    },
    "R59": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "ix:continuation",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3QTD",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2413405 - Disclosure - Segment, Geographical and Other Revenue Information  - Revenues by Geographic Area (Details)",
     "role": "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationRevenuesByGeographicAreaDetails",
     "shortName": "Segment, Geographical and Other Revenue Information  - Revenues by Geographic Area (Details)",
     "subGroupType": "details",
     "uniqueAnchor": null
    },
    "R6": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "I2018Q1Jan1_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_us-gaap_AccountingStandardsUpdate201601Member",
      "decimals": "-5",
      "first": true,
      "lang": null,
      "name": "us-gaap:NewAccountingPronouncementOrChangeInAccountingPrincipleCumulativeEffectOfChangeOnEquityOrNetAssets1",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "1004001 - Statement - Condensed Consolidated Statements of Stockholders' Equity (parenthetical)",
     "role": "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquityParenthetical",
     "shortName": "Condensed Consolidated Statements of Stockholders' Equity (parenthetical)",
     "subGroupType": "",
     "uniqueAnchor": null
    },
    "R60": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "ix:continuation",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FI2019Q3_srt_StatementGeographicalAxis_country_US",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:NoncurrentAssets",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2413406 - Disclosure - Segment, Geographical and Other Revenue Information  - Long-Lived Assets by Geographic Area (Details)",
     "role": "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationLongLivedAssetsByGeographicAreaDetails",
     "shortName": "Segment, Geographical and Other Revenue Information  - Long-Lived Assets by Geographic Area (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "ix:continuation",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FI2019Q3_srt_StatementGeographicalAxis_country_US",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:NoncurrentAssets",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R61": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FI2019Q3",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:Goodwill",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2413407 - Disclosure - Segment, Geographical and Other Revenue Information  - Goodwill (Details)",
     "role": "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationGoodwillDetails",
     "shortName": "Segment, Geographical and Other Revenue Information  - Goodwill (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:ScheduleOfIntangibleAssetsAndGoodwillTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FI2019Q3_srt_ConsolidationItemsAxis_us-gaap_OperatingSegmentsMember",
      "decimals": "-3",
      "lang": null,
      "name": "us-gaap:Goodwill",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R7": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "us-gaap:ScheduleOfEarningsPerShareBasicAndDilutedTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:NetIncomeLoss",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "1005000 - Statement - Condensed Consolidated Statements of Cash Flows",
     "role": "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows",
     "shortName": "Condensed Consolidated Statements of Cash Flows",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": "-3",
      "lang": null,
      "name": "cdxs:LeaseRightofUseAssetAmortization",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R8": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:NatureOfOperations",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2101100 - Disclosure - Description of Business",
     "role": "http://www.codexis.com/role/DescriptionOfBusiness",
     "shortName": "Description of Business",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:NatureOfOperations",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R9": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:SignificantAccountingPoliciesTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "2102100 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies",
     "role": "http://www.codexis.com/role/BasisOfPresentationAndSummaryOfSignificantAccountingPolicies",
     "shortName": "Basis of Presentation and Summary of Significant Accounting Policies",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "FD2019Q3YTD",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:SignificantAccountingPoliciesTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R9999": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs2019093010qsp.htm",
      "contextRef": "I2018Q1Jan1",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:CumulativeEffectOfNewAccountingPrincipleInPeriodOfAdoption",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "",
     "isDefault": "false",
     "longName": "Uncategorized Items - cdxs2019093010qsp.htm",
     "role": "http://xbrl.sec.gov/role/uncategorizedFacts",
     "shortName": "Uncategorized Items - cdxs2019093010qsp.htm",
     "subGroupType": "",
     "uniqueAnchor": null
    }
   },
   "segmentCount": 105,
   "tag": {
    "cdxs_A2016PSUPlanMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "2016 PSU Plan [Member]",
        "label": "2016 PSU Plan [Member]",
        "terseLabel": "2016 PSU Plan [Member]"
       }
      }
     },
     "localname": "A2016PSUPlanMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_A2017PSUandPBOPlanMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "2017 PSU and PBO Plan [Member]",
        "label": "2017 PSU and PBO Plan [Member]",
        "terseLabel": "2017 PSU and PBO Plan [Member]"
       }
      }
     },
     "localname": "A2017PSUandPBOPlanMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_A2018PSUandPBOPlanMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "2018 PSU and PBO Plan [Member]",
        "label": "2018 PSU and PBO Plan [Member]",
        "terseLabel": "2018 PSU and PBO Plan [Member]"
       }
      }
     },
     "localname": "A2018PSUandPBOPlanMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_A2019PSUandPBOPlanMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "2019 PSU and PBO Plan [Member]",
        "label": "2019 PSU and PBO Plan [Member]",
        "terseLabel": "2019 PSU and PBO Plan [Member]"
       }
      }
     },
     "localname": "A2019PSUandPBOPlanMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_A2019PlanMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "2019 Plan [Member]",
        "label": "2019 Plan [Member]",
        "terseLabel": "2019 Plan [Member]"
       }
      }
     },
     "localname": "A2019PlanMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_APACMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Regions of Australia, New Zealand, Southeast Asia and China",
        "label": "APAC [Member]",
        "terseLabel": "APAC [Member]"
       }
      }
     },
     "localname": "APACMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionDisaggregationOfRevenueDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationRevenuesByGeographicAreaDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_AccruedPurchaseReceivedNotYetBilled": {
     "auth_ref": [],
     "calculation": {
      "http://www.codexis.com/role/BalanceSheetsDetailsAccruedLiabilitiesDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_AccruedLiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Accrued Purchase, Received Not Yet Billed",
        "label": "Accrued Purchase, Received Not Yet Billed",
        "terseLabel": "Accrued purchases"
       }
      }
     },
     "localname": "AccruedPurchaseReceivedNotYetBilled",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetsDetailsAccruedLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_AdjustmentstoAdditionalPaidinCapitalShortSwingProfitSettlement": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Adjustments to Additional Paid in Capital, Short Swing Profit Settlement",
        "label": "Adjustments to Additional Paid in Capital, Short Swing Profit Settlement",
        "terseLabel": "Short swing profit settlement"
       }
      }
     },
     "localname": "AdjustmentstoAdditionalPaidinCapitalShortSwingProfitSettlement",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquity"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_AgreementDateAxis": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Agreement Date [Axis]",
        "label": "Agreement Date [Axis]",
        "terseLabel": "Agreement Date [Axis]"
       }
      }
     },
     "localname": "AgreementDateAxis",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesOtherCommitmentsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "cdxs_AgreementDateDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "[Domain] for Agreement Date [Axis]",
        "label": "Agreement Date [Domain]",
        "terseLabel": "Agreement Date [Domain]"
       }
      }
     },
     "localname": "AgreementDateDomain",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesOtherCommitmentsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_AgreementTypeAxis": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Agreement Type [Axis]",
        "label": "Agreement Type [Axis]",
        "terseLabel": "Agreement Type [Axis]"
       }
      }
     },
     "localname": "AgreementTypeAxis",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "cdxs_AgreementTypeDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "[Domain] for Agreement Type [Axis]",
        "label": "Agreement Type [Domain]",
        "terseLabel": "Agreement Type [Domain]"
       }
      }
     },
     "localname": "AgreementTypeDomain",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_April2016Member": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "April 2016 [Member]",
        "label": "April 2016 [Member]",
        "terseLabel": "April 2016 [Member]"
       }
      }
     },
     "localname": "April2016Member",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesOtherCommitmentsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_BalanceSheetDetailsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Balance Sheet Details [Abstract]",
        "label": "Balance Sheet Details [Abstract]"
       }
      }
     },
     "localname": "BalanceSheetDetailsAbstract",
     "nsuri": "http://www.codexis.com/20190930",
     "xbrltype": "stringItemType"
    },
    "cdxs_BalanceSheetsDetailsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "-- None. No documentation exists for this element. --",
        "label": "Balance Sheets Details [Abstract]"
       }
      }
     },
     "localname": "BalanceSheetsDetailsAbstract",
     "nsuri": "http://www.codexis.com/20190930",
     "xbrltype": "stringItemType"
    },
    "cdxs_BalanceSheetsDetailsTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Balance sheets details.",
        "label": "Balance Sheets Details [Text Block]",
        "verboseLabel": "Balance Sheets Details"
       }
      }
     },
     "localname": "BalanceSheetsDetailsTextBlock",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetsDetails"
     ],
     "xbrltype": "textBlockItemType"
    },
    "cdxs_BiotherapeuticSegmentMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Biotherapeutic Segment [Member]",
        "label": "Biotherapeutic Segment [Member]",
        "verboseLabel": "Novel Biotherapeutics [Member]"
       }
      }
     },
     "localname": "BiotherapeuticSegmentMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionDisaggregationOfRevenueDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_CDX6114Member": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "CDX-6114 [Member]",
        "label": "CDX-6114 [Member]",
        "terseLabel": "CDX-6114 [Member]"
       }
      }
     },
     "localname": "CDX6114Member",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails",
      "http://www.codexis.com/role/DescriptionOfBusinessTextualDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_CashCashEquivalentsAndShorttermInvestmentsAmortizedCost": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Cash, Cash Equivalents, And Short-term Investments, Amortized Cost",
        "label": "Cash, Cash Equivalents, And Short-term Investments, Amortized Cost",
        "terseLabel": "Adjusted Cost"
       }
      }
     },
     "localname": "CashCashEquivalentsAndShorttermInvestmentsAmortizedCost",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesComponentsOfCashEquivalentsAndMarketableSecuritiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_CashEquivalentsAndMarketableSecuritiesLineItems": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Cash equivalents and marketable securities.",
        "label": "Cash Equivalents and Marketable Securities [Line Items]",
        "terseLabel": "Cash Equivalents and Marketable Securities [Line Items]"
       }
      }
     },
     "localname": "CashEquivalentsAndMarketableSecuritiesLineItems",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesComponentsOfCashEquivalentsAndMarketableSecuritiesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "cdxs_CashEquivalentsandMarketableSecuritiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Cash Equivalents and Marketable Securities [Abstract]",
        "label": "Cash Equivalents and Marketable Securities [Abstract]"
       }
      }
     },
     "localname": "CashEquivalentsandMarketableSecuritiesAbstract",
     "nsuri": "http://www.codexis.com/20190930",
     "xbrltype": "stringItemType"
    },
    "cdxs_CashEquivalentsandMarketableSecuritiesTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Cash Equivalents and Marketable Securities [Text Block]",
        "label": "Cash Equivalents and Marketable Securities [Text Block]",
        "terseLabel": "Cash Equivalents and Marketable Securities"
       }
      }
     },
     "localname": "CashEquivalentsandMarketableSecuritiesTextBlock",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecurities"
     ],
     "xbrltype": "textBlockItemType"
    },
    "cdxs_ChangeinContractwithCustomerAssetRollForward": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Change in Contract with Customer, Asset [Roll Forward]",
        "label": "Change in Contract with Customer, Asset [Roll Forward]",
        "terseLabel": "Contract Assets"
       }
      }
     },
     "localname": "ChangeinContractwithCustomerAssetRollForward",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionContractsWithCustomerDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "cdxs_ChangeinContractwithCustomerContractCostsRollForward": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Change in Contract with Customer, Contract Costs [Roll Forward]",
        "label": "Change in Contract with Customer, Contract Costs [Roll Forward]",
        "terseLabel": "Contract Costs"
       }
      }
     },
     "localname": "ChangeinContractwithCustomerContractCostsRollForward",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionContractsWithCustomerDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "cdxs_ChangeinContractwithCustomerLiabilityRollForward": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Change in Contract with Customer, Liability [Roll Forward]",
        "label": "Change in Contract with Customer, Liability [Roll Forward]",
        "terseLabel": "Contract Liabilities: Deferred Revenue"
       }
      }
     },
     "localname": "ChangeinContractwithCustomerLiabilityRollForward",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionContractsWithCustomerDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "cdxs_CollaborativeResearchandDevelopmentAgreementOptionalExtensionPeriod": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Collaborative Research and Development Agreement, Optional Extension Period",
        "label": "Collaborative Research and Development Agreement, Optional Extension Period",
        "terseLabel": "Optional extension period"
       }
      }
     },
     "localname": "CollaborativeResearchandDevelopmentAgreementOptionalExtensionPeriod",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "cdxs_CommitmentsAndContingenciesLineItems": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Commitments and contingencies.",
        "label": "Commitments and Contingencies [Line Items]",
        "terseLabel": "Commitments and Contingencies [Line Items]"
       }
      }
     },
     "localname": "CommitmentsAndContingenciesLineItems",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "cdxs_CommonSharesOfCoTwoSolutionMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Common shares of co two solution.",
        "label": "Common Shares of Co Two Solution [Member]",
        "terseLabel": "Common Shares of Co Two Solution [Member]"
       }
      }
     },
     "localname": "CommonSharesOfCoTwoSolutionMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesAdditionalInformationDetails",
      "http://www.codexis.com/role/FairValueMeasurementsScheduleOfFinancialInstrumentsMeasuredAtFairValueOnRecurringBasisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_ContractWithCustomerContractCostsAdditions": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Contract With Customer, Contract Costs, Additions",
        "label": "Contract With Customer, Contract Costs, Additions",
        "terseLabel": "Additions"
       }
      }
     },
     "localname": "ContractWithCustomerContractCostsAdditions",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionContractsWithCustomerDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_ContractWithCustomerContractCostsDeductions": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Contract With Customer, Contract Costs, Deductions",
        "label": "Contract With Customer, Contract Costs, Deductions",
        "negatedTerseLabel": "Deductions"
       }
      }
     },
     "localname": "ContractWithCustomerContractCostsDeductions",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionContractsWithCustomerDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_ContractwithCustomerAssetNewContractAdditions": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Contract with Customer, Asset, New Contract Additions",
        "label": "Contract with Customer, Asset, New Contract Additions",
        "terseLabel": "Additions"
       }
      }
     },
     "localname": "ContractwithCustomerAssetNewContractAdditions",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionContractsWithCustomerDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_ContractwithCustomerAssetUnbilledReceivablesCurrentAdditions": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Contract with Customer, Asset, Unbilled Receivables, Current, Additions",
        "label": "Contract with Customer, Asset, Unbilled Receivables, Current, Additions",
        "terseLabel": "Additions"
       }
      }
     },
     "localname": "ContractwithCustomerAssetUnbilledReceivablesCurrentAdditions",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionContractsWithCustomerDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_ContractwithCustomerAssetUnbilledReceivablesCurrentDeductions": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Contract with Customer, Asset, Unbilled Receivables, Current, Deductions",
        "label": "Contract with Customer, Asset, Unbilled Receivables, Current, Deductions",
        "negatedTerseLabel": "Deductions"
       }
      }
     },
     "localname": "ContractwithCustomerAssetUnbilledReceivablesCurrentDeductions",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionContractsWithCustomerDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_ContractwithCustomerAssetUnbilledReceivablesLongtermAdditions": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Contract with Customer, Asset, Unbilled Receivables, Long-term, Additions",
        "label": "Contract with Customer, Asset, Unbilled Receivables, Long-term, Additions",
        "terseLabel": "Additions"
       }
      }
     },
     "localname": "ContractwithCustomerAssetUnbilledReceivablesLongtermAdditions",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionContractsWithCustomerDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_ContractwithCustomerAssetUnbilledReceivablesLongtermDeductions": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Contract with Customer, Asset, Unbilled Receivables, Long-term, Deductions",
        "label": "Contract with Customer, Asset, Unbilled Receivables, Long-term, Deductions",
        "negatedTerseLabel": "Deductions"
       }
      }
     },
     "localname": "ContractwithCustomerAssetUnbilledReceivablesLongtermDeductions",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionContractsWithCustomerDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_ContractwithCustomerLiabilityDeductions": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Contract with Customer, Liability, Deductions",
        "label": "Contract with Customer, Liability, Deductions",
        "negatedLabel": "Deductions"
       }
      }
     },
     "localname": "ContractwithCustomerLiabilityDeductions",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionContractsWithCustomerDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_ContractwithCustomerLiabilityIncreasefromCashReceipts": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Contract with Customer, Liability, Increase from Cash Receipts",
        "label": "Contract with Customer, Liability, Increase from Cash Receipts",
        "terseLabel": "Additions"
       }
      }
     },
     "localname": "ContractwithCustomerLiabilityIncreasefromCashReceipts",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionContractsWithCustomerDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_ContractwithCustomerLiabilityNewActivitiesPerformanceObligationSatisfiedRevenueRecognition": {
     "auth_ref": [],
     "calculation": {
      "http://www.codexis.com/role/RevenueRecognitionContractsWithCustomerDetails": {
       "order": 3.0,
       "parentTag": "us-gaap_ContractWithCustomerLiabilityRevenueRecognized",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Contract with Customer, Liability, New Activities, Performance Obligation Satisfied, Revenue Recognition",
        "label": "Contract with Customer, Liability, New Activities, Performance Obligation Satisfied, Revenue Recognition",
        "terseLabel": "Performance obligations satisfied from new activities in the period - contract revenue"
       }
      }
     },
     "localname": "ContractwithCustomerLiabilityNewActivitiesPerformanceObligationSatisfiedRevenueRecognition",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionContractsWithCustomerDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_CoreSegmentMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Core Segment [Member]",
        "label": "Core Segment [Member]",
        "verboseLabel": "Performance Enzymes [Member]"
       }
      }
     },
     "localname": "CoreSegmentMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionDisaggregationOfRevenueDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_CustomerAMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Customer A [Member]",
        "label": "Customer A [Member]",
        "terseLabel": "Customer A [Member]"
       }
      }
     },
     "localname": "CustomerAMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_CustomerBMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Customer B [Member]",
        "label": "Customer B [Member]",
        "terseLabel": "Customer B [Member]"
       }
      }
     },
     "localname": "CustomerBMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_CustomerCMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Customer C [Member]",
        "label": "Customer C [Member]",
        "terseLabel": "Customer C [Member]"
       }
      }
     },
     "localname": "CustomerCMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_CustomerDMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Customer D [Member]",
        "label": "Customer D [Member]",
        "terseLabel": "Customer D [Member]"
       }
      }
     },
     "localname": "CustomerDMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_CustomerEMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Customer E [Member]",
        "label": "Customer E [Member]",
        "terseLabel": "Customer E [Member]"
       }
      }
     },
     "localname": "CustomerEMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_CustomerFMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Customer F [Member]",
        "label": "Customer F [Member]",
        "terseLabel": "Customer F [Member]"
       }
      }
     },
     "localname": "CustomerFMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_CustomerGMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Customer G [Member]",
        "label": "Customer G [Member]",
        "terseLabel": "Customer G [Member]"
       }
      }
     },
     "localname": "CustomerGMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_CustomerHMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Customer H [Member]",
        "label": "Customer H [Member]",
        "terseLabel": "Customer H [Member]"
       }
      }
     },
     "localname": "CustomerHMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_CustomerMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Customer [Member]",
        "label": "Customer [Member]",
        "terseLabel": "Customer [Member]"
       }
      }
     },
     "localname": "CustomerMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_DebtInstrumentMinimumCashMultiplierofAverageSixMonthTrailingOperatingCashFlowNetOutlayPlustheAverageMonthlyPrincipalDueandPayableintheImmediatelySucceedingThreeMonths": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Debt Instrument, Minimum Cash Multiplier of Average Six-Month Trailing Operating Cash Flow Net Outlay Plus the Average Monthly Principal Due and Payable in the Immediately Succeeding Three-Months",
        "label": "Debt Instrument, Minimum Cash Multiplier of Average Six-Month Trailing Operating Cash Flow Net Outlay Plus the Average Monthly Principal Due and Payable in the Immediately Succeeding Three-Months",
        "terseLabel": "Minimum cash multiplier"
       }
      }
     },
     "localname": "DebtInstrumentMinimumCashMultiplierofAverageSixMonthTrailingOperatingCashFlowNetOutlayPlustheAverageMonthlyPrincipalDueandPayableintheImmediatelySucceedingThreeMonths",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "integerItemType"
    },
    "cdxs_December2017Member": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "December 2017 [Member]",
        "label": "December 2017 [Member]",
        "terseLabel": "December 2017 [Member]"
       }
      }
     },
     "localname": "December2017Member",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesOtherCommitmentsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_EighthLeaseAmendmentMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Eighth Lease Amendment [Member]",
        "label": "Eighth Lease Amendment [Member]",
        "terseLabel": "Eighth Lease Amendment [Member]"
       }
      }
     },
     "localname": "EighthLeaseAmendmentMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_EquitySecuritiesFVNINumberOfCommonSharesSold": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Equity Securities, FV-NI, Number Of Common Shares Sold",
        "label": "Equity Securities, FV-NI, Number Of Common Shares Sold",
        "terseLabel": "Number of common shares sold (in shares)"
       }
      }
     },
     "localname": "EquitySecuritiesFVNINumberOfCommonSharesSold",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesAdditionalInformationDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "cdxs_FineChemicalCustomerMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fine Chemical Customer [Member]",
        "label": "Fine Chemical Customer [Member]",
        "terseLabel": "Fine chemical customer [Member]"
       }
      }
     },
     "localname": "FineChemicalCustomerMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_GSKMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "GSK [Member]",
        "label": "GSK [Member]",
        "terseLabel": "GSK [Member]"
       }
      }
     },
     "localname": "GSKMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_GlobalDevelopmentOptionandLicenseAgreementMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Global Development, Option and License Agreement [Member]",
        "label": "Global Development, Option and License Agreement [Member]",
        "terseLabel": "Global Development, Option and License Agreement [Member]"
       }
      }
     },
     "localname": "GlobalDevelopmentOptionandLicenseAgreementMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_IncentiveStockOptionsMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Incentive Stock Options [Member]",
        "label": "Incentive Stock Options [Member]",
        "terseLabel": "Incentive Stock Options [Member]"
       }
      }
     },
     "localname": "IncentiveStockOptionsMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_IncreaseDecreaseinContractwithCustomerAssetUnbilled": {
     "auth_ref": [],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 8.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Increase (Decrease) in Contract with Customer, Asset, Unbilled",
        "label": "Increase (Decrease) in Contract with Customer, Asset, Unbilled",
        "negatedTerseLabel": "Unbilled receivables"
       }
      }
     },
     "localname": "IncreaseDecreaseinContractwithCustomerAssetUnbilled",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_LaboratoryEquipmentMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Laboratory Equipment [Member]",
        "label": "Laboratory Equipment [Member]",
        "terseLabel": "Laboratory equipment [Member]"
       }
      }
     },
     "localname": "LaboratoryEquipmentMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetsDetailsPropertyAndEquipmentNetDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_LeaseIncentiveObligationNoncurrent": {
     "auth_ref": [],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 5.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Lease Incentive Obligation, Noncurrent",
        "label": "Lease Incentive Obligation, Noncurrent",
        "terseLabel": "Lease incentive obligation, net of current portion"
       }
      }
     },
     "localname": "LeaseIncentiveObligationNoncurrent",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_LeaseRightofUseAssetAmortization": {
     "auth_ref": [],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 3.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Lease, Right-of-Use Asset, Amortization",
        "label": "Lease, Right-of-Use Asset, Amortization",
        "verboseLabel": "Amortization expense - right-of-use assets - operating and finance leases"
       }
      }
     },
     "localname": "LeaseRightofUseAssetAmortization",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_LeaseSupplementalCashFlowAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Lease, Supplemental Cash Flow [Abstract]",
        "label": "Lease, Supplemental Cash Flow [Abstract]",
        "terseLabel": "Cash paid for amounts included in the measurement of lease obligations"
       }
      }
     },
     "localname": "LeaseSupplementalCashFlowAbstract",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesLeaseCostDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "cdxs_LesseeOtherInformationAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Lessee, Other Information [Abstract]",
        "label": "Lessee, Other Information [Abstract]",
        "terseLabel": "Other information"
       }
      }
     },
     "localname": "LesseeOtherInformationAbstract",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesLeaseCostDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "cdxs_LesseeWeightedaverageDiscountRateAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Lessee, Weighted-average Discount Rate [Abstract]",
        "label": "Lessee, Weighted-average Discount Rate [Abstract]",
        "terseLabel": "Weighted-average discount rate:"
       }
      }
     },
     "localname": "LesseeWeightedaverageDiscountRateAbstract",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesLeaseCostDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "cdxs_LesseeWeightedaverageRemainingLeaseTermAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Lessee, Weighted-average Remaining Lease Term [Abstract]",
        "label": "Lessee, Weighted-average Remaining Lease Term [Abstract]",
        "terseLabel": "Weighted-average remaining lease term (in years):"
       }
      }
     },
     "localname": "LesseeWeightedaverageRemainingLeaseTermAbstract",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesLeaseCostDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "cdxs_LineofCreditFacilityAccountsReceivableBorrowingBasePercentage": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Line of Credit Facility, Accounts Receivable Borrowing Base Percentage",
        "label": "Line of Credit Facility, Accounts Receivable Borrowing Base Percentage",
        "terseLabel": "Accounts receivable borrowing base percentage"
       }
      }
     },
     "localname": "LineofCreditFacilityAccountsReceivableBorrowingBasePercentage",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "cdxs_MerckMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Merck [Member]",
        "label": "Merck [Member]",
        "terseLabel": "Merck [Member]"
       }
      }
     },
     "localname": "MerckMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_MerckPlatformTechnologyTransferandLicenseAgreementProteinEngineeringMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Merck Platform Technology Transfer and License Agreement, Protein Engineering [Member]",
        "label": "Merck Platform Technology Transfer and License Agreement, Protein Engineering [Member]",
        "terseLabel": "Merck Platform Technology Transfer and License Agreement, Protein Engineering [Member]"
       }
      }
     },
     "localname": "MerckPlatformTechnologyTransferandLicenseAgreementProteinEngineeringMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_MilestoneOneMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Milestone One [Member]",
        "label": "Milestone One [Member]",
        "terseLabel": "Milestone One [Member]"
       }
      }
     },
     "localname": "MilestoneOneMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_MilestoneTwoMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Milestone Two [Member]",
        "label": "Milestone Two [Member]",
        "terseLabel": "Milestone Two [Member]"
       }
      }
     },
     "localname": "MilestoneTwoMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_NestecLtd.NestleHealthSciencesMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Nestec Ltd. (Nestle Health Sciences) [Member]",
        "label": "Nestec Ltd. (Nestle Health Sciences) [Member]",
        "terseLabel": "Nestec Ltd. (Nestle Health Sciences) [Member]"
       }
      }
     },
     "localname": "NestecLtd.NestleHealthSciencesMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails",
      "http://www.codexis.com/role/DescriptionOfBusinessTextualDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_NonStatutoryStockOptionsMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Non-Statutory Stock Options [Member]",
        "label": "Non-Statutory Stock Options [Member]",
        "terseLabel": "Non-Statutory Stock Options [Member]"
       }
      }
     },
     "localname": "NonStatutoryStockOptionsMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_NovartisMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Novartis [Member]",
        "label": "Novartis [Member]",
        "terseLabel": "Novartis [Member]"
       }
      }
     },
     "localname": "NovartisMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_NovelBiotherapeuticsMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Novel Biotherapeutics [Member]",
        "label": "Novel Biotherapeutics [Member]",
        "terseLabel": "Novel Biotherapeutics [Member]"
       }
      }
     },
     "localname": "NovelBiotherapeuticsMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationGoodwillDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_NumberOfCommonSharesFairValue": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Number of common shares fair value.",
        "label": "Number of Common Shares Fair Value",
        "terseLabel": "Number of common shares fair value (in shares)"
       }
      }
     },
     "localname": "NumberOfCommonSharesFairValue",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesAdditionalInformationDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "cdxs_OfficeEquipmentAndFurnitureMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Office Equipment and Furniture [Member]",
        "label": "Office Equipment and Furniture [Member]",
        "terseLabel": "Office equipment and furniture [Member]"
       }
      }
     },
     "localname": "OfficeEquipmentAndFurnitureMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetsDetailsPropertyAndEquipmentNetDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_PercentageofOutstandingSharesOwnedatTimeofInvestment": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Percentage of Outstanding Shares Owned at Time of Investment",
        "label": "Percentage of Outstanding Shares Owned at Time of Investment",
        "terseLabel": "Percentage of outstanding shares owned at time of investment"
       }
      }
     },
     "localname": "PercentageofOutstandingSharesOwnedatTimeofInvestment",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesAdditionalInformationDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "cdxs_PercentofVotingInterestsThresholdtotriggerhigherexerciseprice": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Percent of Voting Interests Threshold to trigger higher exercise price",
        "label": "Percent of Voting Interests Threshold to trigger higher exercise price",
        "terseLabel": "Percent of voting interests"
       }
      }
     },
     "localname": "PercentofVotingInterestsThresholdtotriggerhigherexerciseprice",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "cdxs_PerformanceBasedOptionsPBOsMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Performance Based Options (PBOs) [Member]",
        "label": "Performance Based Options (PBOs) [Member]",
        "terseLabel": "Performance Based Options (PBOs) [Member]"
       }
      }
     },
     "localname": "PerformanceBasedOptionsPBOsMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationStockBasedCompensationExpenseDetails",
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_PerformanceEnzymesMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Performance Enzymes [Member]",
        "label": "Performance Enzymes [Member]",
        "terseLabel": "Performance Enzymes [Member]"
       }
      }
     },
     "localname": "PerformanceEnzymesMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationGoodwillDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_PerformanceStockUnitsMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Performance Stock Units [Member]",
        "label": "Performance Stock Units [Member]",
        "terseLabel": "Performance Stock Units (PSUs) [Member]"
       }
      }
     },
     "localname": "PerformanceStockUnitsMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationStockBasedCompensationExpenseDetails",
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_PlatformTechnologyTransferandLicenseAgreementAnnualTechnologyTransferMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Platform Technology Transfer and License Agreement Annual Technology Transfer [Member]",
        "label": "Platform Technology Transfer and License Agreement Annual Technology Transfer [Member]",
        "terseLabel": "Platform Technology Transfer and License Agreement Annual Technology Transfer [Member]"
       }
      }
     },
     "localname": "PlatformTechnologyTransferandLicenseAgreementAnnualTechnologyTransferMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_PlatformTechnologyTransferandLicenseAgreementMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Platform Technology Transfer and License Agreement [Member]",
        "label": "Platform Technology Transfer and License Agreement [Member]",
        "terseLabel": "Platform Technology Transfer and License Agreement [Member]"
       }
      }
     },
     "localname": "PlatformTechnologyTransferandLicenseAgreementMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_PlatformTechnologyTransferandLicenseAgreementMilestoneOneMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Platform Technology Transfer and License Agreement, Milestone One [Member]",
        "label": "Platform Technology Transfer and License Agreement, Milestone One [Member]",
        "terseLabel": "Platform Technology Transfer and License Agreement, Milestone One [Member]"
       }
      }
     },
     "localname": "PlatformTechnologyTransferandLicenseAgreementMilestoneOneMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_PlatformTechnologyTransferandLicenseAgreementMilestoneTwoMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Platform Technology Transfer and License Agreement, Milestone Two [Member]",
        "label": "Platform Technology Transfer and License Agreement, Milestone Two [Member]",
        "terseLabel": "Platform Technology Transfer and License Agreement, Milestone Two [Member]"
       }
      }
     },
     "localname": "PlatformTechnologyTransferandLicenseAgreementMilestoneTwoMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_PortonAgreementMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Porton Agreement [Member]",
        "label": "Porton Agreement [Member]",
        "terseLabel": "Porton Agreement [Member]"
       }
      }
     },
     "localname": "PortonAgreementMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_PortonMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Porton [Member]",
        "label": "Porton [Member]",
        "terseLabel": "Porton [Member]"
       }
      }
     },
     "localname": "PortonMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_ProductSalesMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Product Sales [Member]",
        "label": "Product Sales [Member]",
        "terseLabel": "Product Sales [Member]"
       }
      }
     },
     "localname": "ProductSalesMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations",
      "http://www.codexis.com/role/RevenueRecognitionDisaggregationOfRevenueDetails",
      "http://www.codexis.com/role/RevenueRecognitionPerformanceObligationDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_RSAsandRSUsMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "RSAs and RSUs [Member]",
        "label": "RSAs and RSUs [Member]",
        "terseLabel": "RSAs and RSUs [Member]"
       }
      }
     },
     "localname": "RSAsandRSUsMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationStockBasedCompensationExpenseDetails",
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_RedwoodCityCalifornia501ChesapeakeSpaceMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Redwood City, California, 501 Chesapeake Space [Member]",
        "label": "Redwood City, California, 501 Chesapeake Space [Member]",
        "terseLabel": "Redwood City, California, 501 Chesapeake Space [Member]"
       }
      }
     },
     "localname": "RedwoodCityCalifornia501ChesapeakeSpaceMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_RedwoodCityCaliforniaBuilding2SpaceMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Redwood City, California, Building 2 Space [Member]",
        "label": "Redwood City, California, Building 2 Space [Member]",
        "terseLabel": "Redwood City, California, Building 2 Space [Member]"
       }
      }
     },
     "localname": "RedwoodCityCaliforniaBuilding2SpaceMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_RedwoodCityCaliforniaPenobscotSpaceMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Redwood City, California, Penobscot Space [Member]",
        "label": "Redwood City, California, Penobscot Space [Member]",
        "terseLabel": "Redwood City, California, Penobscot Space [Member]"
       }
      }
     },
     "localname": "RedwoodCityCaliforniaPenobscotSpaceMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_RedwoodCityCaliforniaSaginawSpaceMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Redwood City, California, Saginaw Space [Member]",
        "label": "Redwood City, California, Saginaw Space [Member]",
        "terseLabel": "Redwood City, California, Saginaw Space [Member]"
       }
      }
     },
     "localname": "RedwoodCityCaliforniaSaginawSpaceMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_ResearchandDevelopmentAgreementMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Research and Development Agreement [Member]",
        "label": "Research and Development Agreement [Member]",
        "terseLabel": "Research and Development Agreement [Member]"
       }
      }
     },
     "localname": "ResearchandDevelopmentAgreementMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_ResearchandDevelopmentRevenueMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Research and Development Revenue [Member]",
        "label": "Research and Development Revenue [Member]",
        "terseLabel": "Research and Development Revenue [Member]"
       }
      }
     },
     "localname": "ResearchandDevelopmentRevenueMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails",
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations",
      "http://www.codexis.com/role/RevenueRecognitionDisaggregationOfRevenueDetails",
      "http://www.codexis.com/role/RevenueRecognitionPerformanceObligationDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_RevenueRecognitionContingentAnnualReceivableIncrease": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Revenue Recognition, Contingent Annual Receivable Increase",
        "label": "Revenue Recognition, Contingent Annual Receivable Increase",
        "terseLabel": "Contingent annual receivable increase"
       }
      }
     },
     "localname": "RevenueRecognitionContingentAnnualReceivableIncrease",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_RevenueRecognitionContingentReceivable": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Revenue Recognition, Contingent Receivable",
        "label": "Revenue Recognition, Contingent Receivable",
        "terseLabel": "Contingent receivable"
       }
      }
     },
     "localname": "RevenueRecognitionContingentReceivable",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_RevenueRecognitionDurationtoPayAfterMilestoneAchievement": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Revenue Recognition, Duration to Pay After Milestone Achievement",
        "label": "Revenue Recognition, Duration to Pay After Milestone Achievement",
        "terseLabel": "Duration to pay after milestone achievement (in days)",
        "verboseLabel": "Duration to pay after milestone achievement"
       }
      }
     },
     "localname": "RevenueRecognitionDurationtoPayAfterMilestoneAchievement",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/DescriptionOfBusinessTextualDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationAdditionalInformationDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "cdxs_RevenueRecognitionEventofCounterpartyExercisingAlternativeOption": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Revenue Recognition, Event of Counterparty Exercising Alternative Option",
        "label": "Revenue Recognition, Event of Counterparty Exercising Alternative Option",
        "terseLabel": "Event of counterparty exercising alternative option"
       }
      }
     },
     "localname": "RevenueRecognitionEventofCounterpartyExercisingAlternativeOption",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/DescriptionOfBusinessTextualDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_RevenueRecognitionMilestonePaymentAmount": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Revenue Recognition, Milestone Payment Amount",
        "label": "Revenue Recognition, Milestone Payment Amount",
        "terseLabel": "Milestone payment amount"
       }
      }
     },
     "localname": "RevenueRecognitionMilestonePaymentAmount",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/DescriptionOfBusinessTextualDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_RevenueRecognitionMilestoneRevenue": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Revenue Recognition, Milestone Revenue",
        "label": "Revenue Recognition, Milestone Revenue",
        "terseLabel": "Milestone revenue",
        "verboseLabel": "Milestone payment amount"
       }
      }
     },
     "localname": "RevenueRecognitionMilestoneRevenue",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_RevenueRecognitionMilestoneRevenueNumberofDaysforPayment": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Revenue Recognition, Milestone Revenue, Number of Days for Payment",
        "label": "Revenue Recognition, Milestone Revenue, Number of Days for Payment",
        "terseLabel": "Number of days for payment"
       }
      }
     },
     "localname": "RevenueRecognitionMilestoneRevenueNumberofDaysforPayment",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "cdxs_RevenueRecognitionTargetSalesforSalesMilestone": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Revenue Recognition, Target Sales for Sales Milestone",
        "label": "Revenue Recognition, Target Sales for Sales Milestone",
        "terseLabel": "Target sales for sales milestone"
       }
      }
     },
     "localname": "RevenueRecognitionTargetSalesforSalesMilestone",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_SalesBasedMilestoneMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Sales-Based Milestone [Member]",
        "label": "Sales-Based Milestone [Member]",
        "terseLabel": "Sales-Based Milestone [Member]"
       }
      }
     },
     "localname": "SalesBasedMilestoneMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_ScheduleOfCashEquivalentsAndMarketableSecuritiesTable": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Schedule of cash equivalents and marketable securities.",
        "label": "Schedule of Cash Equivalents and Marketable Securities [Table]",
        "terseLabel": "Schedule of Cash Equivalents and Marketable Securities [Table]"
       }
      }
     },
     "localname": "ScheduleOfCashEquivalentsAndMarketableSecuritiesTable",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesComponentsOfCashEquivalentsAndMarketableSecuritiesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "cdxs_ScheduleOfCommitmentsAndContingenciesTable": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Schedule of commitments and contingencies.",
        "label": "Schedule of Commitments and Contingencies [Table]",
        "terseLabel": "Schedule of Commitments and Contingencies [Table]"
       }
      }
     },
     "localname": "ScheduleOfCommitmentsAndContingenciesTable",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "cdxs_September2019Member": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "September 2019 [Member]",
        "label": "September 2019 [Member]",
        "terseLabel": "September 2019 [Member]"
       }
      }
     },
     "localname": "September2019Member",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesOtherCommitmentsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_ShareBasedCompensationArrangementByShareBasedPaymentAwardPurchasePriceOfCommonStockAboveMinimumThresholdPercent": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Share-based Compensation Arrangement by Share-based Payment Award, Purchase Price of Common Stock Above Minimum Threshold, Percent",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Purchase Price of Common Stock Above Minimum Threshold, Percent",
        "terseLabel": "Purchase price of common stock above minimum threshold"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardPurchasePriceOfCommonStockAboveMinimumThresholdPercent",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "cdxs_SharebasedCompensationArrangementBySharebasedPaymentAwardFutureVestingRightsPercentage": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Share-based Compensation Arrangement By Share-based Payment Award, Future Vesting Rights, Percentage",
        "label": "Share-based Compensation Arrangement By Share-based Payment Award, Future Vesting Rights, Percentage",
        "terseLabel": "Future vesting rights, percentage"
       }
      }
     },
     "localname": "SharebasedCompensationArrangementBySharebasedPaymentAwardFutureVestingRightsPercentage",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "cdxs_SharebasedCompensationArrangementbySharebasedPaymentAwardEstimatedPerformanceGoalAchievementRate": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Share-based Compensation Arrangement by Share-based Payment Award, Estimated Performance Goal Achievement Rate",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Estimated Performance Goal Achievement Rate",
        "terseLabel": "Estimated performance goal achievement rate"
       }
      }
     },
     "localname": "SharebasedCompensationArrangementbySharebasedPaymentAwardEstimatedPerformanceGoalAchievementRate",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "cdxs_SharebasedCompensationArrangementbySharebasedPaymentAwardNumberofInstallments": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Share-based Compensation Arrangement by Share-based Payment Award, Number of Installments",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Number of Installments",
        "terseLabel": "Number of installments"
       }
      }
     },
     "localname": "SharebasedCompensationArrangementbySharebasedPaymentAwardNumberofInstallments",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "integerItemType"
    },
    "cdxs_SharebasedCompensationArrangementbySharebasedPaymentAwardPerformanceAwardsThresholdLevelNumberofSharesMultiplier": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Share-based Compensation Arrangement by Share-based Payment Award, Performance Awards, Threshold Level, Number of Shares, Multiplier",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Performance Awards, Threshold Level, Number of Shares, Multiplier",
        "terseLabel": "Performance awards, threshold level, number of shares, multiplier"
       }
      }
     },
     "localname": "SharebasedCompensationArrangementbySharebasedPaymentAwardPerformanceAwardsThresholdLevelNumberofSharesMultiplier",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "pureItemType"
    },
    "cdxs_StatutoryResaleRestrictionExpiryPeriod": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Statutory resale restriction expiry period.",
        "label": "Statutory Resale Restriction Expiry Period",
        "terseLabel": "Statutory resale restriction expiry period"
       }
      }
     },
     "localname": "StatutoryResaleRestrictionExpiryPeriod",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesAdditionalInformationDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "cdxs_StrategicCollaborationAgreementMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Strategic Collaboration Agreement [Member]",
        "label": "Strategic Collaboration Agreement [Member]",
        "terseLabel": "Strategic Collaboration Agreement [Member]"
       }
      }
     },
     "localname": "StrategicCollaborationAgreementMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_SupplyAgreementMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Supply Agreement [Member]",
        "label": "Supply Agreement [Member]",
        "terseLabel": "Supply Agreement [Member]"
       }
      }
     },
     "localname": "SupplyAgreementMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_TechnologyTransferCollaborationandLicenseAgreementMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Technology Transfer, Collaboration and License Agreement [Member]",
        "label": "Technology Transfer, Collaboration and License Agreement [Member]",
        "terseLabel": "Technology Transfer, Collaboration and License Agreement [Member]"
       }
      }
     },
     "localname": "TechnologyTransferCollaborationandLicenseAgreementMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_TermLoanMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Term Loan [Member]",
        "label": "Term Loan [Member]",
        "terseLabel": "Term Loan [Member]"
       }
      }
     },
     "localname": "TermLoanMember",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_TermOfCollaborativeResearchAndDevelopmentAgreement": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Term of collaborative research and development agreement.",
        "label": "Term of Collaborative Research and Development Agreement",
        "verboseLabel": "Term of collaborative research and development agreement"
       }
      }
     },
     "localname": "TermOfCollaborativeResearchAndDevelopmentAgreement",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "cdxs_UnbilledReceivablesCurrentRollForward": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Unbilled Receivables, Current [Roll Forward]",
        "label": "Unbilled Receivables, Current [Roll Forward]",
        "terseLabel": "Unbilled receivables, current"
       }
      }
     },
     "localname": "UnbilledReceivablesCurrentRollForward",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionContractsWithCustomerDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "cdxs_UnbilledReceivablesLongtermRollForward": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Unbilled Receivables, Long-term [Roll Forward]",
        "label": "Unbilled Receivables, Long-term [Roll Forward]",
        "terseLabel": "Unbilled receivables, non-current"
       }
      }
     },
     "localname": "UnbilledReceivablesLongtermRollForward",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionContractsWithCustomerDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "cdxs_UnbilledReceivablesNoncurrent": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Unbilled Receivables, Noncurrent",
        "label": "Unbilled Receivables, Noncurrent",
        "periodEndLabel": "September 30, 2019 balance",
        "periodStartLabel": "January 1, 2019 balance"
       }
      }
     },
     "localname": "UnbilledReceivablesNoncurrent",
     "nsuri": "http://www.codexis.com/20190930",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionContractsWithCustomerDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "country_US": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "UNITED STATES",
        "terseLabel": "United States [Member]"
       }
      }
     },
     "localname": "US",
     "nsuri": "http://xbrl.sec.gov/country/2017-01-31",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationLongLivedAssetsByGeographicAreaDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "dei_AmendmentFlag": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Boolean flag that is true when the XBRL content amends previously-filed or accepted submission.",
        "label": "Amendment Flag",
        "terseLabel": "Amendment Flag"
       }
      }
     },
     "localname": "AmendmentFlag",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_CityAreaCode": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Area code of city",
        "label": "City Area Code",
        "terseLabel": "City Area Code"
       }
      }
     },
     "localname": "CityAreaCode",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "dei_CoverAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Cover page.",
        "label": "Cover page."
       }
      }
     },
     "localname": "CoverAbstract",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "dei_CurrentFiscalYearEndDate": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "End date of current fiscal year in the format --MM-DD.",
        "label": "Current Fiscal Year End Date",
        "terseLabel": "Current Fiscal Year End Date"
       }
      }
     },
     "localname": "CurrentFiscalYearEndDate",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "gMonthDayItemType"
    },
    "dei_DocumentFiscalPeriodFocus": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fiscal period values are FY, Q1, Q2, and Q3.  1st, 2nd and 3rd quarter 10-Q or 10-QT statements have value Q1, Q2, and Q3 respectively, with 10-K, 10-KT or other fiscal year statements having FY.",
        "label": "Document Fiscal Period Focus",
        "terseLabel": "Document Fiscal Period Focus"
       }
      }
     },
     "localname": "DocumentFiscalPeriodFocus",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "fiscalPeriodItemType"
    },
    "dei_DocumentFiscalYearFocus": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "This is focus fiscal year of the document report in CCYY format. For a 2006 annual report, which may also provide financial information from prior periods, fiscal 2006 should be given as the fiscal year focus. Example: 2006.",
        "label": "Document Fiscal Year Focus",
        "terseLabel": "Document Fiscal Year Focus"
       }
      }
     },
     "localname": "DocumentFiscalYearFocus",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "gYearItemType"
    },
    "dei_DocumentPeriodEndDate": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The end date of the period reflected on the cover page if a periodic report. For all other reports and registration statements containing historical data, it is the date up through which that historical data is presented.  If there is no historical data in the report, use the filing date. The format of the date is CCYY-MM-DD.",
        "label": "Document Period End Date",
        "terseLabel": "Document Period End Date"
       }
      }
     },
     "localname": "DocumentPeriodEndDate",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "dateItemType"
    },
    "dei_DocumentQuarterlyReport": {
     "auth_ref": [
      "r336"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Boolean flag that is true only for a form used as an quarterly report.",
        "label": "Document Quarterly Report",
        "terseLabel": "Document Quarterly Report"
       }
      }
     },
     "localname": "DocumentQuarterlyReport",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_DocumentTransitionReport": {
     "auth_ref": [
      "r337"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Boolean flag that is true only for a form used as a transition report.",
        "label": "Document Transition Report",
        "terseLabel": "Document Transition Report"
       }
      }
     },
     "localname": "DocumentTransitionReport",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_DocumentType": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The type of document being provided (such as 10-K, 10-Q, 485BPOS, etc). The document type is limited to the same value as the supporting SEC submission type, or the word 'Other'.",
        "label": "Document Type",
        "terseLabel": "Document Type"
       }
      }
     },
     "localname": "DocumentType",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "submissionTypeItemType"
    },
    "dei_EntityAddressAddressLine1": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Address Line 1 such as Attn, Building Name, Street Name",
        "label": "Entity Address, Address Line One",
        "terseLabel": "Entity Address, Address Line One"
       }
      }
     },
     "localname": "EntityAddressAddressLine1",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "dei_EntityAddressCityOrTown": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Name of the City or Town",
        "label": "Entity Address, City or Town",
        "terseLabel": "Entity Address, City or Town"
       }
      }
     },
     "localname": "EntityAddressCityOrTown",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "dei_EntityAddressPostalZipCode": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Code for the postal or zip code",
        "label": "Entity Address, Postal Zip Code",
        "terseLabel": "Entity Address, Postal Zip Code"
       }
      }
     },
     "localname": "EntityAddressPostalZipCode",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "dei_EntityAddressStateOrProvince": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Name of the state or province.",
        "label": "Entity Address, State or Province",
        "terseLabel": "Entity Address, State or Province"
       }
      }
     },
     "localname": "EntityAddressStateOrProvince",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "stateOrProvinceItemType"
    },
    "dei_EntityCentralIndexKey": {
     "auth_ref": [
      "r338"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "A unique 10-digit SEC-issued value to identify entities that have filed disclosures with the SEC. It is commonly abbreviated as CIK.",
        "label": "Entity Central Index Key",
        "terseLabel": "Entity Central Index Key"
       }
      }
     },
     "localname": "EntityCentralIndexKey",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "centralIndexKeyItemType"
    },
    "dei_EntityCommonStockSharesOutstanding": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Indicate number of shares or other units outstanding of each of registrant's classes of capital or common stock or other ownership interests, if and as stated on cover of related periodic report. Where multiple classes or units exist define each class/interest by adding class of stock items such as Common Class A [Member], Common Class B [Member] or Partnership Interest [Member] onto the Instrument [Domain] of the Entity Listings, Instrument.",
        "label": "Entity Common Stock, Shares Outstanding",
        "terseLabel": "Entity Common Stock, Shares Outstanding"
       }
      }
     },
     "localname": "EntityCommonStockSharesOutstanding",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "sharesItemType"
    },
    "dei_EntityCurrentReportingStatus": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Indicate 'Yes' or 'No' whether registrants (1) have filed all reports required to be filed by Section 13 or 15(d) of the Securities Exchange Act of 1934 during the preceding 12 months (or for such shorter period that registrants were required to file such reports), and (2) have been subject to such filing requirements for the past 90 days. This information should be based on the registrant's current or most recent filing containing the related disclosure.",
        "label": "Entity Current Reporting Status",
        "terseLabel": "Entity Current Reporting Status"
       }
      }
     },
     "localname": "EntityCurrentReportingStatus",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "yesNoItemType"
    },
    "dei_EntityEmergingGrowthCompany": {
     "auth_ref": [
      "r338"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Indicate if registrant meets the emerging growth company criteria.",
        "label": "Entity Emerging Growth Company",
        "terseLabel": "Entity Emerging Growth"
       }
      }
     },
     "localname": "EntityEmergingGrowthCompany",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_EntityFileNumber": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Commission file number. The field allows up to 17 characters. The prefix may contain 1-3 digits, the sequence number may contain 1-8 digits, the optional suffix may contain 1-4 characters, and the fields are separated with a hyphen.",
        "label": "Entity File Number",
        "terseLabel": "Entity File Number"
       }
      }
     },
     "localname": "EntityFileNumber",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "fileNumberItemType"
    },
    "dei_EntityFilerCategory": {
     "auth_ref": [
      "r338"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Indicate whether the registrant is one of the following: Large Accelerated Filer, Accelerated Filer, Non-accelerated Filer. Definitions of these categories are stated in Rule 12b-2 of the Exchange Act. This information should be based on the registrant's current or most recent filing containing the related disclosure.",
        "label": "Entity Filer Category",
        "terseLabel": "Entity Filer Category"
       }
      }
     },
     "localname": "EntityFilerCategory",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "filerCategoryItemType"
    },
    "dei_EntityIncorporationStateCountryCode": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Two-character EDGAR code representing the state or country of incorporation.",
        "label": "Entity Incorporation, State or Country Code",
        "terseLabel": "Entity Incorporation, State or Country Code"
       }
      }
     },
     "localname": "EntityIncorporationStateCountryCode",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "edgarStateCountryItemType"
    },
    "dei_EntityInteractiveDataCurrent": {
     "auth_ref": [
      "r339"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Boolean flag that is true when the registrant has submitted electronically every Interactive Data File required to be submitted pursuant to Rule 405 of Regulation S-T during the preceding 12 months (or for such shorter period that the registrant was required to submit such files).",
        "label": "Entity Interactive Data Current",
        "terseLabel": "Entity Interactive Data Current"
       }
      }
     },
     "localname": "EntityInteractiveDataCurrent",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "yesNoItemType"
    },
    "dei_EntityRegistrantName": {
     "auth_ref": [
      "r338"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The exact name of the entity filing the report as specified in its charter, which is required by forms filed with the SEC.",
        "label": "Entity Registrant Name",
        "terseLabel": "Entity Registrant Name"
       }
      }
     },
     "localname": "EntityRegistrantName",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "dei_EntityShellCompany": {
     "auth_ref": [
      "r338"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Boolean flag that is true when the registrant is a shell company as defined in Rule 12b-2 of the Exchange Act.",
        "label": "Entity Shell Company",
        "terseLabel": "Entity Shell Company"
       }
      }
     },
     "localname": "EntityShellCompany",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_EntitySmallBusiness": {
     "auth_ref": [
      "r338"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Indicates that the company is a Smaller Reporting Company (SRC).",
        "label": "Entity Small Business",
        "terseLabel": "Entity Small Business"
       }
      }
     },
     "localname": "EntitySmallBusiness",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_EntityTaxIdentificationNumber": {
     "auth_ref": [
      "r338"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The Tax Identification Number (TIN), also known as an Employer Identification Number (EIN), is a unique 9-digit value assigned by the IRS.",
        "label": "Entity Tax Identification Number",
        "terseLabel": "Entity Tax Identification Number"
       }
      }
     },
     "localname": "EntityTaxIdentificationNumber",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "employerIdItemType"
    },
    "dei_LocalPhoneNumber": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Local phone number for entity.",
        "label": "Local Phone Number",
        "terseLabel": "Local Phone Number"
       }
      }
     },
     "localname": "LocalPhoneNumber",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "dei_Security12bTitle": {
     "auth_ref": [
      "r334"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Title of a 12(b) registered security.",
        "label": "Title of 12(b) Security",
        "terseLabel": "Title of 12(b) Security"
       }
      }
     },
     "localname": "Security12bTitle",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "securityTitleItemType"
    },
    "dei_SecurityExchangeName": {
     "auth_ref": [
      "r335"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Name of the Exchange on which a security is registered.",
        "label": "Security Exchange Name",
        "terseLabel": "Security Exchange Name"
       }
      }
     },
     "localname": "SecurityExchangeName",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "edgarExchangeCodeItemType"
    },
    "dei_TradingSymbol": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Trading symbol of an instrument as listed on an exchange.",
        "label": "Trading Symbol",
        "terseLabel": "Trading Symbol"
       }
      }
     },
     "localname": "TradingSymbol",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "tradingSymbolItemType"
    },
    "srt_AmericasMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Americas [Member]",
        "terseLabel": "Americas [Member]"
       }
      }
     },
     "localname": "AmericasMember",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionDisaggregationOfRevenueDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationRevenuesByGeographicAreaDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_ConsolidationItemsAxis": {
     "auth_ref": [
      "r122",
      "r130"
     ],
     "lang": {
      "en-US": {
       "role": {
        "label": "Consolidation Items [Axis]",
        "terseLabel": "Consolidation Items [Axis]"
       }
      }
     },
     "localname": "ConsolidationItemsAxis",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationGoodwillDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "srt_ConsolidationItemsDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Consolidation Items [Domain]",
        "terseLabel": "Consolidation Items [Domain]"
       }
      }
     },
     "localname": "ConsolidationItemsDomain",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationGoodwillDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_CounterpartyNameAxis": {
     "auth_ref": [
      "r48",
      "r87"
     ],
     "lang": {
      "en-US": {
       "role": {
        "label": "Counterparty Name [Axis]",
        "terseLabel": "Counterparty Name [Axis]"
       }
      }
     },
     "localname": "CounterpartyNameAxis",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails",
      "http://www.codexis.com/role/DescriptionOfBusinessTextualDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationAdditionalInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "srt_MajorCustomersAxis": {
     "auth_ref": [
      "r135",
      "r203",
      "r208",
      "r319"
     ],
     "lang": {
      "en-US": {
       "role": {
        "label": "Customer [Axis]",
        "terseLabel": "Customer [Axis]"
       }
      }
     },
     "localname": "MajorCustomersAxis",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "srt_MaximumMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Maximum [Member]",
        "terseLabel": "Maximum [Member]"
       }
      }
     },
     "localname": "MaximumMember",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_MinimumMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Minimum [Member]",
        "terseLabel": "Minimum [Member]"
       }
      }
     },
     "localname": "MinimumMember",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_NameOfMajorCustomerDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Customer [Domain]",
        "terseLabel": "Customer [Domain]"
       }
      }
     },
     "localname": "NameOfMajorCustomerDomain",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_ProductOrServiceAxis": {
     "auth_ref": [
      "r132",
      "r203",
      "r206",
      "r316",
      "r317"
     ],
     "lang": {
      "en-US": {
       "role": {
        "label": "Product and Service [Axis]",
        "terseLabel": "Product and Service [Axis]"
       }
      }
     },
     "localname": "ProductOrServiceAxis",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails",
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations",
      "http://www.codexis.com/role/RevenueRecognitionDisaggregationOfRevenueDetails",
      "http://www.codexis.com/role/RevenueRecognitionPerformanceObligationDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "srt_ProductsAndServicesDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Product and Service [Domain]",
        "terseLabel": "Product and Service [Domain]"
       }
      }
     },
     "localname": "ProductsAndServicesDomain",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails",
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations",
      "http://www.codexis.com/role/RevenueRecognitionDisaggregationOfRevenueDetails",
      "http://www.codexis.com/role/RevenueRecognitionPerformanceObligationDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_RangeAxis": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Statistical Measurement [Axis]",
        "terseLabel": "Statistical Measurement [Axis]"
       }
      }
     },
     "localname": "RangeAxis",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "srt_RangeMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Statistical Measurement [Domain]",
        "terseLabel": "Statistical Measurement [Domain]"
       }
      }
     },
     "localname": "RangeMember",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_RealEstateAndAccumulatedDepreciationDescriptionOfPropertyAxis": {
     "auth_ref": [
      "r332"
     ],
     "lang": {
      "en-US": {
       "role": {
        "label": "Name of Property [Axis]",
        "terseLabel": "Name of Property [Axis]"
       }
      }
     },
     "localname": "RealEstateAndAccumulatedDepreciationDescriptionOfPropertyAxis",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "srt_RealEstateAndAccumulatedDepreciationNameOfPropertyDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Name of Property [Domain]",
        "terseLabel": "Name of Property [Domain]"
       }
      }
     },
     "localname": "RealEstateAndAccumulatedDepreciationNameOfPropertyDomain",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_RepurchaseAgreementCounterpartyNameDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Counterparty Name [Domain]",
        "terseLabel": "Counterparty Name [Domain]"
       }
      }
     },
     "localname": "RepurchaseAgreementCounterpartyNameDomain",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails",
      "http://www.codexis.com/role/DescriptionOfBusinessTextualDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_SegmentGeographicalDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Geographical [Domain]",
        "terseLabel": "Geographical [Domain]"
       }
      }
     },
     "localname": "SegmentGeographicalDomain",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionDisaggregationOfRevenueDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationLongLivedAssetsByGeographicAreaDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationRevenuesByGeographicAreaDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_StatementGeographicalAxis": {
     "auth_ref": [
      "r134",
      "r203",
      "r207",
      "r318",
      "r330",
      "r331"
     ],
     "lang": {
      "en-US": {
       "role": {
        "label": "Geographical [Axis]",
        "terseLabel": "Geographical [Axis]",
        "verboseLabel": "Geographical [Axis]"
       }
      }
     },
     "localname": "StatementGeographicalAxis",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionDisaggregationOfRevenueDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationLongLivedAssetsByGeographicAreaDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationRevenuesByGeographicAreaDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AccountingPoliciesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Accounting Policies [Abstract]"
       }
      }
     },
     "localname": "AccountingPoliciesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_AccountingStandardsUpdate201409Member": {
     "auth_ref": [
      "r209"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Accounting Standards Update 2014-09 Revenue from Contracts with Customers (Topic 606).",
        "label": "Accounting Standards Update 2014-09 [Member]",
        "terseLabel": "Accounting Standards Update 2014-09 [Member]"
       }
      }
     },
     "localname": "AccountingStandardsUpdate201409Member",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquityParenthetical"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_AccountingStandardsUpdate201601Member": {
     "auth_ref": [
      "r252"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Accounting Standards Update 2016-01 Financial Instruments-Overall (Subtopic 825-10): Recognition and Measurement of Financial Assets and Financial Liabilities.",
        "label": "Accounting Standards Update 2016-01 [Member]",
        "terseLabel": "Accounting Standards Update 2016-01 [Member]"
       }
      }
     },
     "localname": "AccountingStandardsUpdate201601Member",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesAdditionalInformationDetails",
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquityParenthetical"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_AccountingStandardsUpdate201602Member": {
     "auth_ref": [
      "r266"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Accounting Standards Update 2016-02 Leases (Topic 842).",
        "label": "Accounting Standards Update 2016-02 [Member]",
        "terseLabel": "Accounting Standards Update 2016-02 [Member]"
       }
      }
     },
     "localname": "AccountingStandardsUpdate201602Member",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BasisOfPresentationAndSummaryOfSignificantAccountingPoliciesTextualDetails",
      "http://www.codexis.com/role/CommitmentsAndContingenciesReconciliationOfRightOfUseAssetsAndLeaseLiabilitiesDetails",
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_AccountsPayableCurrent": {
     "auth_ref": [
      "r32"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 1.0,
       "parentTag": "us-gaap_LiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Carrying value as of the balance sheet date of liabilities incurred (and for which invoices have typically been received) and payable to vendors for goods and services received that are used in an entity's business. Used to reflect the current portion of the liabilities (due within one year or within the normal operating cycle if longer).",
        "label": "Accounts Payable, Current",
        "verboseLabel": "Accounts payable"
       }
      }
     },
     "localname": "AccountsPayableCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccountsReceivableMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Due from customers or clients for goods or services that have been delivered or sold.",
        "label": "Accounts Receivable [Member]",
        "terseLabel": "Accounts Receivable [Member]"
       }
      }
     },
     "localname": "AccountsReceivableMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_AccountsReceivableNetCurrent": {
     "auth_ref": [
      "r3",
      "r15",
      "r137",
      "r138",
      "r204"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 2.0,
       "parentTag": "us-gaap_AssetsCurrent",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount, after allowance for credit loss, of right to consideration from customer for product sold and service rendered in normal course of business, classified as current.",
        "label": "Accounts Receivable, after Allowance for Credit Loss, Current",
        "verboseLabel": "Accounts receivable, net of allowances of $34 at September 30, 2019 and December 31, 2018"
       }
      }
     },
     "localname": "AccountsReceivableNetCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccountsReceivableRelatedParties": {
     "auth_ref": [
      "r14",
      "r86",
      "r286",
      "r287",
      "r288",
      "r310"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "For an unclassified balance sheet, amount of receivables arising from transactions with related parties.",
        "label": "Accounts Receivable, Related Parties",
        "terseLabel": "Accounts receivable from related parties"
       }
      }
     },
     "localname": "AccountsReceivableRelatedParties",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/RelatedPartyTransactionsTextualDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccruedLiabilitiesCurrent": {
     "auth_ref": [
      "r35"
     ],
     "calculation": {
      "http://www.codexis.com/role/BalanceSheetsDetailsAccruedLiabilitiesDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      },
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 3.0,
       "parentTag": "us-gaap_LiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Carrying value as of the balance sheet date of obligations incurred and payable, pertaining to costs that are statutory in nature, are incurred on contractual obligations, or accumulate over time and for which invoices have not yet been received or will not be rendered. Examples include taxes, interest, rent and utilities. Used to reflect the current portion of the liabilities (due within one year or within the normal operating cycle if longer).",
        "label": "Accrued Liabilities, Current",
        "totalLabel": "Total",
        "verboseLabel": "Other accrued liabilities"
       }
      }
     },
     "localname": "AccruedLiabilitiesCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetsDetailsAccruedLiabilitiesDetails",
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccruedProfessionalFeesCurrentAndNoncurrent": {
     "auth_ref": [
      "r301",
      "r313"
     ],
     "calculation": {
      "http://www.codexis.com/role/BalanceSheetsDetailsAccruedLiabilitiesDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_AccruedLiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Carrying value as of the balance sheet date of obligations incurred through that date and payable for professional fees, such as for legal and accounting services received.",
        "label": "Accrued Professional Fees",
        "terseLabel": "Accrued professional and outside service fees"
       }
      }
     },
     "localname": "AccruedProfessionalFeesCurrentAndNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetsDetailsAccruedLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment": {
     "auth_ref": [
      "r30",
      "r165"
     ],
     "calculation": {
      "http://www.codexis.com/role/BalanceSheetsDetailsPropertyAndEquipmentNetDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_PropertyPlantAndEquipmentNet",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of accumulated depreciation, depletion and amortization for physical assets used in the normal conduct of business to produce goods and services.",
        "label": "Accumulated Depreciation, Depletion and Amortization, Property, Plant, and Equipment",
        "negatedTerseLabel": "Less: accumulated depreciation and amortization"
       }
      }
     },
     "localname": "AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetsDetailsPropertyAndEquipmentNetDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccumulatedOtherComprehensiveIncomeMember": {
     "auth_ref": [
      "r49",
      "r50",
      "r51",
      "r241"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Accumulated increase (decrease) in equity from transactions and other events and circumstances from non-owner sources, attributable to the parent. Excludes net income (loss), and accumulated changes in equity from transactions resulting from investments by owners and distributions to owners.",
        "label": "AOCI Attributable to Parent [Member]",
        "terseLabel": "Accumulated Other Comprehensive Income (Loss) [Member]"
       }
      }
     },
     "localname": "AccumulatedOtherComprehensiveIncomeMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquity"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_AdditionalPaidInCapital": {
     "auth_ref": [
      "r16"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 3.0,
       "parentTag": "us-gaap_StockholdersEquity",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Excess of issue price over par or stated value of the entity's capital stock and amounts received from other transactions involving the entity's stock or stockholders. Includes adjustments to additional paid in capital. Some examples of such adjustments include recording the issuance of debt with a beneficial conversion feature and certain tax consequences of equity instruments awarded to employees. Use this element for the aggregate amount of additional paid-in capital associated with common and preferred stock. For additional paid-in capital associated with only common stock, use the element additional paid in capital, common stock. For additional paid-in capital associated with only preferred stock, use the element additional paid in capital, preferred stock.",
        "label": "Additional Paid in Capital",
        "verboseLabel": "Additional paid-in capital"
       }
      }
     },
     "localname": "AdditionalPaidInCapital",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AdditionalPaidInCapitalMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Excess of issue price over par or stated value of the entity's capital stock and amounts received from other transactions involving the entity's stock or stockholders.",
        "label": "Additional Paid-in Capital [Member]",
        "terseLabel": "Additional Paid-in Capital [Member]"
       }
      }
     },
     "localname": "AdditionalPaidInCapitalMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquity"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_AdjustmentsForNewAccountingPronouncementsAxis": {
     "auth_ref": [
      "r91"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by new accounting pronouncement.",
        "label": "Adjustments for New Accounting Pronouncements [Axis]",
        "terseLabel": "Adjustments for New Accounting Pronouncements [Axis]"
       }
      }
     },
     "localname": "AdjustmentsForNewAccountingPronouncementsAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BasisOfPresentationAndSummaryOfSignificantAccountingPoliciesTextualDetails",
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesAdditionalInformationDetails",
      "http://www.codexis.com/role/CommitmentsAndContingenciesReconciliationOfRightOfUseAssetsAndLeaseLiabilitiesDetails",
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails",
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquityParenthetical"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AdjustmentsRelatedToTaxWithholdingForShareBasedCompensation": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of decrease to equity for grantee's tax withholding obligation for award under share-based payment arrangement.",
        "label": "Share-based Payment Arrangement, Decrease for Tax Withholding Obligation",
        "negatedTerseLabel": "Taxes paid related to net share settlement of equity awards"
       }
      }
     },
     "localname": "AdjustmentsRelatedToTaxWithholdingForShareBasedCompensation",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquity"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationOtherLongtermIncentivePlansRequisiteServicePeriodRecognition": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of increase to additional paid-in capital (APIC) for recognition of cost for award under share-based payment arrangement, classified as other.",
        "label": "APIC, Share-based Payment Arrangement, Other, Increase for Cost Recognition",
        "terseLabel": "Non-employee stock-based compensation"
       }
      }
     },
     "localname": "AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationOtherLongtermIncentivePlansRequisiteServicePeriodRecognition",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquity"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue": {
     "auth_ref": [
      "r214",
      "r216",
      "r229",
      "r230"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of increase to additional paid-in capital (APIC) for recognition of cost for award under share-based payment arrangement.",
        "label": "APIC, Share-based Payment Arrangement, Increase for Cost Recognition",
        "verboseLabel": "Employee stock-based compensation"
       }
      }
     },
     "localname": "AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquity"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AdjustmentsToAdditionalPaidInCapitalStockIssuedIssuanceCosts": {
     "auth_ref": [
      "r188",
      "r189"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of decrease in additional paid in capital (APIC) resulting from direct costs associated with issuing stock. Includes, but is not limited to, legal and accounting fees and direct costs associated with stock issues under a shelf registration.",
        "label": "Adjustments to Additional Paid in Capital, Stock Issued, Issuance Costs",
        "negatedTerseLabel": "Issuance of common stock, issuance costs",
        "terseLabel": "Issuance costs"
       }
      }
     },
     "localname": "AdjustmentsToAdditionalPaidInCapitalStockIssuedIssuanceCosts",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquity",
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquityParenthetical"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Adjustments to Reconcile Net Income (Loss) to Cash Provided by (Used in) Operating Activities [Abstract]",
        "verboseLabel": "Adjustments to reconcile net loss to net cash used in operating activities:"
       }
      }
     },
     "localname": "AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AllowanceForDoubtfulAccountsReceivableCurrent": {
     "auth_ref": [
      "r21",
      "r139",
      "r147"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of allowance for credit loss on accounts receivable, classified as current.",
        "label": "Accounts Receivable, Allowance for Credit Loss, Current",
        "verboseLabel": "Accounts receivable, allowances"
       }
      }
     },
     "localname": "AllowanceForDoubtfulAccountsReceivableCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount": {
     "auth_ref": [
      "r100"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Securities (including those issuable pursuant to contingent stock agreements) that could potentially dilute basic earnings per share (EPS) or earnings per unit (EPU) in the future that were not included in the computation of diluted EPS or EPU because to do so would increase EPS or EPU amounts or decrease loss per share or unit amounts for the period presented.",
        "label": "Antidilutive Securities Excluded from Computation of Earnings Per Share, Amount",
        "terseLabel": "Total shares excluded as anti-dilutive (shares)"
       }
      }
     },
     "localname": "AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/NetIncomeLossPerShareAntiDilutiveSecuritiesDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis": {
     "auth_ref": [
      "r100"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by type of antidilutive security.",
        "label": "Antidilutive Securities [Axis]",
        "terseLabel": "Antidilutive Securities [Axis]"
       }
      }
     },
     "localname": "AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/NetIncomeLossPerShareAntiDilutiveSecuritiesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items]",
        "terseLabel": "Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items]"
       }
      }
     },
     "localname": "AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/NetIncomeLossPerShareAntiDilutiveSecuritiesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AntidilutiveSecuritiesNameDomain": {
     "auth_ref": [
      "r100"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Incremental common shares attributable to securities that were not included in diluted earnings per share (EPS) because to do so would increase EPS amounts or decrease loss per share amounts for the period presented.",
        "label": "Antidilutive Securities, Name [Domain]",
        "terseLabel": "Antidilutive Securities, Name [Domain]"
       }
      }
     },
     "localname": "AntidilutiveSecuritiesNameDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/NetIncomeLossPerShareAntiDilutiveSecuritiesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_AreaOfRealEstateProperty": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Area of a real estate property.",
        "label": "Area of Real Estate Property",
        "terseLabel": "Area of real estate property (in sq. ft.)"
       }
      }
     },
     "localname": "AreaOfRealEstateProperty",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "areaItemType"
    },
    "us-gaap_ArrangementsAndNonarrangementTransactionsMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Collaborative arrangement and arrangement other than collaborative applicable to revenue-generating activity or operations.",
        "label": "Collaborative Arrangement and Arrangement Other than Collaborative [Domain]",
        "terseLabel": "Collaborative Arrangement and Arrangement Other than Collaborative [Domain]"
       }
      }
     },
     "localname": "ArrangementsAndNonarrangementTransactionsMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails",
      "http://www.codexis.com/role/DescriptionOfBusinessTextualDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_AssetRetirementObligation": {
     "auth_ref": [
      "r170"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The carrying amount of a liability for an asset retirement obligation. An asset retirement obligation is a legal obligation associated with the disposal or retirement of a tangible long-lived asset that results from the acquisition, construction or development, or the normal operations of a long-lived asset, except for certain obligations of lessees.",
        "label": "Asset Retirement Obligation",
        "verboseLabel": "Asset retirement obligations"
       }
      }
     },
     "localname": "AssetRetirementObligation",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AssetRetirementObligationAccretionExpense": {
     "auth_ref": [
      "r169",
      "r171"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of accretion expense recognized during the period that is associated with an asset retirement obligation. Accretion expense measures and incorporates changes due to the passage of time into the carrying amount of the liability.",
        "label": "Asset Retirement Obligation, Accretion Expense",
        "terseLabel": "Accretion expense related to asset retirement obligation"
       }
      }
     },
     "localname": "AssetRetirementObligationAccretionExpense",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_Assets": {
     "auth_ref": [
      "r125",
      "r298",
      "r305"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Sum of the carrying amounts as of the balance sheet date of all assets that are recognized. Assets are probable future economic benefits obtained or controlled by an entity as a result of past transactions or events.",
        "label": "Assets",
        "totalLabel": "Total assets"
       }
      }
     },
     "localname": "Assets",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AssetsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Assets [Abstract]",
        "netLabel": "Assets",
        "verboseLabel": "Assets"
       }
      }
     },
     "localname": "AssetsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesReconciliationOfRightOfUseAssetsAndLeaseLiabilitiesDetails",
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AssetsCurrent": {
     "auth_ref": [
      "r4",
      "r5",
      "r47"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 1.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Sum of the carrying amounts as of the balance sheet date of all assets that are expected to be realized in cash, sold, or consumed within one year (or the normal operating cycle, if longer). Assets are probable future economic benefits obtained or controlled by an entity as a result of past transactions or events.",
        "label": "Assets, Current",
        "totalLabel": "Total current assets"
       }
      }
     },
     "localname": "AssetsCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AssetsCurrentAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Assets, Current [Abstract]",
        "verboseLabel": "Current assets:"
       }
      }
     },
     "localname": "AssetsCurrentAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AssetsFairValueDisclosure": {
     "auth_ref": [
      "r243"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value portion of probable future economic benefits obtained or controlled by an entity as a result of past transactions or events.",
        "label": "Assets, Fair Value Disclosure",
        "terseLabel": "Total"
       }
      }
     },
     "localname": "AssetsFairValueDisclosure",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/FairValueMeasurementsScheduleOfFinancialInstrumentsMeasuredAtFairValueOnRecurringBasisDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AvailableforsaleSecuritiesMember": {
     "auth_ref": [
      "r141"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Investment in debt security measured at fair value with change in fair value recognized in other comprehensive income (available-for-sale).",
        "label": "Available-for-sale Securities [Member]",
        "terseLabel": "Available-for-sale Securities [Member]"
       }
      }
     },
     "localname": "AvailableforsaleSecuritiesMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/FairValueMeasurementsScheduleOfFinancialInstrumentsMeasuredAtFairValueOnRecurringBasisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_AwardTypeAxis": {
     "auth_ref": [
      "r217",
      "r226"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by type of award under share-based payment arrangement.",
        "label": "Award Type [Axis]",
        "terseLabel": "Award Type [Axis]"
       }
      }
     },
     "localname": "AwardTypeAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationStockBasedCompensationExpenseDetails",
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_BasisOfAccountingPolicyPolicyTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of accounting policy for basis of accounting, or basis of presentation, used to prepare the financial statements (for example, US Generally Accepted Accounting Principles, Other Comprehensive Basis of Accounting, IFRS).",
        "label": "Basis of Accounting, Policy [Policy Text Block]",
        "verboseLabel": "Basis of Presentation and Principles of Consolidation"
       }
      }
     },
     "localname": "BasisOfAccountingPolicyPolicyTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BasisOfPresentationAndSummaryOfSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_CapitalExpendituresIncurredButNotYetPaid": {
     "auth_ref": [
      "r80",
      "r81",
      "r82"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Future cash outflow to pay for purchases of fixed assets that have occurred.",
        "label": "Capital Expenditures Incurred but Not yet Paid",
        "terseLabel": "Purchase of property and equipment recorded in accounts payable and accrued expenses"
       }
      }
     },
     "localname": "CapitalExpendituresIncurredButNotYetPaid",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CapitalLeaseObligationsCurrent": {
     "auth_ref": [
      "r10",
      "r263",
      "r264"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840DetailsCalc2": {
       "order": 1.0,
       "parentTag": "us-gaap_CapitalLeasesFutureMinimumPaymentsPresentValueOfNetMinimumPayments",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of capital lease obligation due within one year or the normal operating cycle, if longer.",
        "label": "Capital Lease Obligations, Current",
        "negatedTerseLabel": "Less: current portion"
       }
      }
     },
     "localname": "CapitalLeaseObligationsCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CapitalLeaseObligationsIncurred": {
     "auth_ref": [
      "r80",
      "r81"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of increase in lease obligation from new lease.",
        "label": "Lease Obligation Incurred",
        "terseLabel": "Capital lease obligations incurred"
       }
      }
     },
     "localname": "CapitalLeaseObligationsIncurred",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CapitalLeaseObligationsNoncurrent": {
     "auth_ref": [
      "r38",
      "r263",
      "r264"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840DetailsCalc2": {
       "order": 2.0,
       "parentTag": "us-gaap_CapitalLeasesFutureMinimumPaymentsPresentValueOfNetMinimumPayments",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount equal to the present value (the principal) at the beginning of the lease term of minimum lease payments during the lease term (excluding that portion of the payments representing executory costs such as insurance, maintenance, and taxes to be paid by the lessor, together with any profit thereon) net of payments or other amounts applied to the principal, through the balance sheet date and due to be paid more than one year (or one operating cycle, if longer) after the balance sheet date.",
        "label": "Capital Lease Obligations, Noncurrent",
        "terseLabel": "Long-term portion of capital leases"
       }
      }
     },
     "localname": "CapitalLeaseObligationsNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CapitalLeasesFutureMinimumPaymentsDue": {
     "auth_ref": [
      "r264"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details": {
       "order": 1.0,
       "parentTag": "us-gaap_CapitalLeasesFutureMinimumPaymentsPresentValueOfNetMinimumPayments",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of minimum lease payments for capital leases.",
        "label": "Capital Leases, Future Minimum Payments Due",
        "totalLabel": "Total minimum lease payments"
       }
      }
     },
     "localname": "CapitalLeasesFutureMinimumPaymentsDue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CapitalLeasesFutureMinimumPaymentsDueAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Capital Leases, Future Minimum Payments Due, Fiscal Year Maturity [Abstract]",
        "terseLabel": "Finance Leases",
        "verboseLabel": "Capital Leases"
       }
      }
     },
     "localname": "CapitalLeasesFutureMinimumPaymentsDueAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails",
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_CapitalLeasesFutureMinimumPaymentsDueInFiveYears": {
     "auth_ref": [
      "r264"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details": {
       "order": 5.0,
       "parentTag": "us-gaap_CapitalLeasesFutureMinimumPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of minimum lease payments for capital leases due in the fifth fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Capital Leases, Future Minimum Payments Due in Five Years",
        "terseLabel": "2023"
       }
      }
     },
     "localname": "CapitalLeasesFutureMinimumPaymentsDueInFiveYears",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CapitalLeasesFutureMinimumPaymentsDueInFourYears": {
     "auth_ref": [
      "r264"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details": {
       "order": 4.0,
       "parentTag": "us-gaap_CapitalLeasesFutureMinimumPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of minimum lease payments for capital leases due in the fourth fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Capital Leases, Future Minimum Payments Due in Four Years",
        "terseLabel": "2022"
       }
      }
     },
     "localname": "CapitalLeasesFutureMinimumPaymentsDueInFourYears",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CapitalLeasesFutureMinimumPaymentsDueInThreeYears": {
     "auth_ref": [
      "r264"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details": {
       "order": 3.0,
       "parentTag": "us-gaap_CapitalLeasesFutureMinimumPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of minimum lease payments for capital leases due in the third fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Capital Leases, Future Minimum Payments Due in Three Years",
        "terseLabel": "2021"
       }
      }
     },
     "localname": "CapitalLeasesFutureMinimumPaymentsDueInThreeYears",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CapitalLeasesFutureMinimumPaymentsDueInTwoYears": {
     "auth_ref": [
      "r264"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details": {
       "order": 2.0,
       "parentTag": "us-gaap_CapitalLeasesFutureMinimumPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of minimum lease payments for capital leases due in the second fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Capital Leases, Future Minimum Payments Due in Two Years",
        "terseLabel": "2020"
       }
      }
     },
     "localname": "CapitalLeasesFutureMinimumPaymentsDueInTwoYears",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CapitalLeasesFutureMinimumPaymentsInterestIncludedInPayments": {
     "auth_ref": [
      "r264"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details": {
       "order": 2.0,
       "parentTag": "us-gaap_CapitalLeasesFutureMinimumPaymentsPresentValueOfNetMinimumPayments",
       "weight": -1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount necessary to reduce net minimum lease payments to present value for capital leases.",
        "label": "Capital Leases, Future Minimum Payments, Interest Included in Payments",
        "negatedTerseLabel": "Less: amount representing interest"
       }
      }
     },
     "localname": "CapitalLeasesFutureMinimumPaymentsInterestIncludedInPayments",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CapitalLeasesFutureMinimumPaymentsPresentValueOfNetMinimumPayments": {
     "auth_ref": [
      "r264"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      },
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840DetailsCalc2": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Present value of minimum lease payments for capital leases net of executory costs, including amounts paid by the lessee to the lessor for insurance, maintenance and taxes.",
        "label": "Capital Leases, Future Minimum Payments, Present Value of Net Minimum Payments",
        "totalLabel": "Present value of capital lease obligations"
       }
      }
     },
     "localname": "CapitalLeasesFutureMinimumPaymentsPresentValueOfNetMinimumPayments",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CapitalLeasesFutureMinimumPaymentsRemainderOfFiscalYear": {
     "auth_ref": [],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details": {
       "order": 1.0,
       "parentTag": "us-gaap_CapitalLeasesFutureMinimumPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of minimum lease payments for capital leases due in the remainder of the fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Capital Leases, Future Minimum Payments, Remainder of Fiscal Year",
        "terseLabel": "2019"
       }
      }
     },
     "localname": "CapitalLeasesFutureMinimumPaymentsRemainderOfFiscalYear",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CapitalLeasesFutureMinimumSubleaseRentals": {
     "auth_ref": [
      "r265"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Minimum payments receivable in the future under noncancelable subleases.",
        "label": "Capital Leases, Future Minimum Sublease Rentals",
        "terseLabel": "Future minimum sublease rentals"
       }
      }
     },
     "localname": "CapitalLeasesFutureMinimumSubleaseRentals",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CapitalizedCostsOfUnprovedPropertiesExcludedFromAmortizationByPropertyOrProjectAxis": {
     "auth_ref": [
      "r293",
      "r294",
      "r295"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by project.",
        "label": "Project [Axis]",
        "terseLabel": "Project [Axis]"
       }
      }
     },
     "localname": "CapitalizedCostsOfUnprovedPropertiesExcludedFromAmortizationByPropertyOrProjectAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails",
      "http://www.codexis.com/role/DescriptionOfBusinessTextualDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationAdditionalInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_CashAndCashEquivalentsAtCarryingValue": {
     "auth_ref": [
      "r1",
      "r27",
      "r78"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 1.0,
       "parentTag": "us-gaap_AssetsCurrent",
       "weight": 1.0
      },
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 1.0,
       "parentTag": "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of currency on hand as well as demand deposits with banks or financial institutions. Includes other kinds of accounts that have the general characteristics of demand deposits. Also includes short-term, highly liquid investments that are both readily convertible to known amounts of cash and so near their maturity that they present insignificant risk of changes in value because of changes in interest rates. Excludes cash and cash equivalents within disposal group and discontinued operation.",
        "label": "Cash and Cash Equivalents, at Carrying Value",
        "periodEndLabel": "Cash and cash equivalents",
        "verboseLabel": "Cash and cash equivalents"
       }
      }
     },
     "localname": "CashAndCashEquivalentsAtCarryingValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesAdditionalInformationDetails",
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesComponentsOfCashEquivalentsAndMarketableSecuritiesDetails",
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets",
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CashAndCashEquivalentsAxis": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by type of cash and cash equivalent balance.",
        "label": "Cash and Cash Equivalents [Axis]",
        "terseLabel": "Cash and Cash Equivalents [Axis]"
       }
      }
     },
     "localname": "CashAndCashEquivalentsAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesAdditionalInformationDetails",
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesComponentsOfCashEquivalentsAndMarketableSecuritiesDetails",
      "http://www.codexis.com/role/FairValueMeasurementsScheduleOfFinancialInstrumentsMeasuredAtFairValueOnRecurringBasisDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_CashAndCashEquivalentsFairValueDisclosure": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value portion of currency on hand as well as demand deposits with banks or financial institutions. Includes other kinds of accounts that have the general characteristics of demand deposits. Also includes short-term, highly liquid investments that are both readily convertible to known amounts of cash and so near their maturity that they present insignificant risk of changes in value because of changes in interest rates.",
        "label": "Cash and Cash Equivalents, Fair Value Disclosure",
        "terseLabel": "Cash and cash equivalents, fair value",
        "verboseLabel": "Money market funds"
       }
      }
     },
     "localname": "CashAndCashEquivalentsFairValueDisclosure",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesComponentsOfCashEquivalentsAndMarketableSecuritiesDetails",
      "http://www.codexis.com/role/FairValueMeasurementsScheduleOfFinancialInstrumentsMeasuredAtFairValueOnRecurringBasisDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CashAndCashEquivalentsLineItems": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Cash and Cash Equivalents [Line Items]",
        "terseLabel": "Cash and Cash Equivalents [Line Items]"
       }
      }
     },
     "localname": "CashAndCashEquivalentsLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesAdditionalInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_CashCashEquivalentsAndShortTermInvestments": {
     "auth_ref": [
      "r27"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Cash includes currency on hand as well as demand deposits with banks or financial institutions. It also includes other kinds of accounts that have the general characteristics of demand deposits in that the customer may deposit additional funds at any time and effectively may withdraw funds at any time without prior notice or penalty. Cash equivalents, excluding items classified as marketable securities, include short-term, highly liquid Investments that are both readily convertible to known amounts of cash, and so near their maturity that they present minimal risk of changes in value because of changes in interest rates. Generally, only investments with original maturities of three months or less qualify under that definition. Original maturity means original maturity to the entity holding the investment. For example, both a three-month US Treasury bill and a three-year Treasury note purchased three months from maturity qualify as cash equivalents. However, a Treasury note purchased three years ago does not become a cash equivalent when its remaining maturity is three months. Short-term investments, exclusive of cash equivalents, generally consist of marketable securities intended to be sold within one year (or the normal operating cycle if longer) and may include trading securities, available-for-sale securities, or held-to-maturity securities (if maturing within one year), as applicable.",
        "label": "Cash, Cash Equivalents, and Short-term Investments",
        "terseLabel": "Estimated Fair Value",
        "verboseLabel": "Cash, cash equivalents, and short-term investments"
       }
      }
     },
     "localname": "CashCashEquivalentsAndShortTermInvestments",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesAdditionalInformationDetails",
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesComponentsOfCashEquivalentsAndMarketableSecuritiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents": {
     "auth_ref": [
      "r71",
      "r78",
      "r83"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash and cash equivalents, and cash and cash equivalents restricted to withdrawal or usage. Excludes amount for disposal group and discontinued operations. Cash includes, but is not limited to, currency on hand, demand deposits with banks or financial institutions, and other accounts with general characteristics of demand deposits. Cash equivalents include, but are not limited to, short-term, highly liquid investments that are both readily convertible to known amounts of cash and so near their maturity that they present insignificant risk of changes in value because of changes in interest rates.",
        "label": "Cash, Cash Equivalents, Restricted Cash and Restricted Cash Equivalents",
        "periodEndLabel": "Cash, cash equivalents and restricted cash at the end of the period",
        "periodStartLabel": "Cash, cash equivalents and restricted cash at the beginning of the period",
        "totalLabel": "Total cash, cash equivalents and restricted cash at the end of the period"
       }
      }
     },
     "localname": "CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect": {
     "auth_ref": [
      "r71",
      "r253"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of increase (decrease) in cash, cash equivalents, and cash and cash equivalents restricted to withdrawal or usage; including effect from exchange rate change. Cash includes, but is not limited to, currency on hand, demand deposits with banks or financial institutions, and other accounts with general characteristics of demand deposits. Cash equivalents include, but are not limited to, short-term, highly liquid investments that are both readily convertible to known amounts of cash and so near their maturity that they present insignificant risk of changes in value because of changes in interest rates.",
        "label": "Cash, Cash Equivalents, Restricted Cash and Restricted Cash Equivalents, Period Increase (Decrease), Including Exchange Rate Effect",
        "totalLabel": "Net increase in cash, cash equivalents and restricted cash"
       }
      }
     },
     "localname": "CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CashMember": {
     "auth_ref": [
      "r7"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Currency on hand as well as demand deposits with banks or financial institutions. Includes other kinds of accounts that have the general characteristics of demand deposits.",
        "label": "Cash [Member]",
        "terseLabel": "Cash [Member]"
       }
      }
     },
     "localname": "CashMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ChangeInContractWithCustomerLiabilityAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Change in Contract with Customer, Liability [Abstract]",
        "terseLabel": "Change in Contract with Customer, Liability [Abstract]"
       }
      }
     },
     "localname": "ChangeInContractWithCustomerLiabilityAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionContractsWithCustomerDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_CollaborativeArrangementDisclosureTextBlock": {
     "auth_ref": [
      "r237",
      "r238",
      "r240"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for collaborative arrangements in which the entity is a participant, including a) information about the nature and purpose of such arrangements; b) its rights and obligations thereunder; c) the accounting policy for collaborative arrangements; and d) the income statement classification and amounts attributable to transactions arising from the collaborative arrangement between participants.",
        "label": "Collaborative Arrangement Disclosure [Text Block]",
        "verboseLabel": "Collaborative Arrangements"
       }
      }
     },
     "localname": "CollaborativeArrangementDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangements"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_CollaborativeArrangementMember": {
     "auth_ref": [
      "r239"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Contractual arrangement that involves two or more parties that both: (i) actively participate in a joint operating activity and (ii) are exposed to significant risks and rewards that depend on the commercial success of the joint operating activity.",
        "label": "Collaborative Arrangement [Member]",
        "terseLabel": "Collaborative Arrangement [Member]"
       }
      }
     },
     "localname": "CollaborativeArrangementMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails",
      "http://www.codexis.com/role/DescriptionOfBusinessTextualDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_CollaborativeArrangementsAndNoncollaborativeArrangementTransactionsLineItems": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Collaborative Arrangement and Arrangement Other than Collaborative [Line Items]",
        "terseLabel": "Collaborative Arrangement and Arrangement Other than Collaborative [Line Items]"
       }
      }
     },
     "localname": "CollaborativeArrangementsAndNoncollaborativeArrangementTransactionsLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails",
      "http://www.codexis.com/role/DescriptionOfBusinessTextualDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_CommitmentsAndContingencies": {
     "auth_ref": [
      "r40",
      "r176",
      "r302",
      "r312"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 3.0,
       "parentTag": "us-gaap_LiabilitiesAndStockholdersEquity",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents the caption on the face of the balance sheet to indicate that the entity has entered into (1) purchase or supply arrangements that will require expending a portion of its resources to meet the terms thereof, and (2) is exposed to potential losses or, less frequently, gains, arising from (a) possible claims against a company's resources due to future performance under contract terms, and (b) possible losses or likely gains from uncertainties that will ultimately be resolved when one or more future events that are deemed likely to occur do occur or fail to occur.",
        "label": "Commitments and Contingencies",
        "verboseLabel": "Commitments and Contingencies (Note 11)"
       }
      }
     },
     "localname": "CommitmentsAndContingencies",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CommitmentsAndContingenciesDisclosureAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Commitments and Contingencies Disclosure [Abstract]"
       }
      }
     },
     "localname": "CommitmentsAndContingenciesDisclosureAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_CommitmentsAndContingenciesDisclosureTextBlock": {
     "auth_ref": [
      "r175",
      "r183"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for commitments and contingencies.",
        "label": "Commitments and Contingencies Disclosure [Text Block]",
        "verboseLabel": "Commitments and Contingencies"
       }
      }
     },
     "localname": "CommitmentsAndContingenciesDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingencies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_CommonStockCapitalSharesReservedForFutureIssuance": {
     "auth_ref": [
      "r41"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Aggregate number of common shares reserved for future issuance.",
        "label": "Common Stock, Capital Shares Reserved for Future Issuance",
        "terseLabel": "Maximum number of shares to be issued upon exercise of stock options (in shares)"
       }
      }
     },
     "localname": "CommonStockCapitalSharesReservedForFutureIssuance",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_CommonStockMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Stock that is subordinate to all other stock of the issuer.",
        "label": "Common Stock [Member]",
        "terseLabel": "Common Stock [Member]"
       }
      }
     },
     "localname": "CommonStockMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquity"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_CommonStockParOrStatedValuePerShare": {
     "auth_ref": [
      "r13"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Face amount or stated value per share of common stock.",
        "label": "Common Stock, Par or Stated Value Per Share",
        "verboseLabel": "Common stock, par value (usd per share)"
       }
      }
     },
     "localname": "CommonStockParOrStatedValuePerShare",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_CommonStockSharesAuthorized": {
     "auth_ref": [
      "r13"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The maximum number of common shares permitted to be issued by an entity's charter and bylaws.",
        "label": "Common Stock, Shares Authorized",
        "terseLabel": "Common stock, shares authorized (shares)"
       }
      }
     },
     "localname": "CommonStockSharesAuthorized",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_CommonStockSharesIssued": {
     "auth_ref": [
      "r13"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Total number of common shares of an entity that have been sold or granted to shareholders (includes common shares that were issued, repurchased and remain in the treasury). These shares represent capital invested by the firm's shareholders and owners, and may be all or only a portion of the number of shares authorized. Shares issued include shares outstanding and shares held in the treasury.",
        "label": "Common Stock, Shares, Issued",
        "terseLabel": "Common stock, shares, issued (shares)"
       }
      }
     },
     "localname": "CommonStockSharesIssued",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_CommonStockSharesOutstanding": {
     "auth_ref": [
      "r13",
      "r188"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Number of shares of common stock outstanding. Common stock represent the ownership interest in a corporation.",
        "label": "Common Stock, Shares, Outstanding",
        "terseLabel": "Common stock, shares outstanding (shares)"
       }
      }
     },
     "localname": "CommonStockSharesOutstanding",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_CommonStockValue": {
     "auth_ref": [
      "r13"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 2.0,
       "parentTag": "us-gaap_StockholdersEquity",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Aggregate par or stated value of issued nonredeemable common stock (or common stock redeemable solely at the option of the issuer). This item includes treasury stock repurchased by the entity. Note: elements for number of nonredeemable common shares, par value and other disclosure concepts are in another section within stockholders' equity.",
        "label": "Common Stock, Value, Issued",
        "verboseLabel": "Common stock, $0.0001 par value per share; 100,000 shares authorized; 58,386 shares and 54,065 shares issued and outstanding at September 30, 2019 and December 31, 2018, respectively"
       }
      }
     },
     "localname": "CommonStockValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ComputerEquipmentMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Long lived, depreciable assets that are used in the creation, maintenance and utilization of information systems.",
        "label": "Computer Equipment [Member]",
        "terseLabel": "Computer equipment and software [Member]"
       }
      }
     },
     "localname": "ComputerEquipmentMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetsDetailsPropertyAndEquipmentNetDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ConcentrationRiskBenchmarkDomain": {
     "auth_ref": [
      "r114",
      "r115",
      "r249",
      "r250"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The denominator in a calculation of a disclosed concentration risk percentage.",
        "label": "Concentration Risk Benchmark [Domain]",
        "terseLabel": "Concentration Risk Benchmark [Domain]"
       }
      }
     },
     "localname": "ConcentrationRiskBenchmarkDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ConcentrationRiskByBenchmarkAxis": {
     "auth_ref": [
      "r114",
      "r115",
      "r249",
      "r250",
      "r320"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by benchmark of concentration risk.",
        "label": "Concentration Risk Benchmark [Axis]",
        "terseLabel": "Concentration Risk Benchmark [Axis]"
       }
      }
     },
     "localname": "ConcentrationRiskByBenchmarkAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ConcentrationRiskByTypeAxis": {
     "auth_ref": [
      "r114",
      "r115",
      "r249",
      "r250",
      "r320"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by type of concentration risk, for example, but not limited to, asset, liability, net assets, geographic, customer, employees, supplier, lender.",
        "label": "Concentration Risk Type [Axis]",
        "terseLabel": "Concentration Risk Type [Axis]"
       }
      }
     },
     "localname": "ConcentrationRiskByTypeAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ConcentrationRiskLineItems": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Concentration Risk [Line Items]",
        "terseLabel": "Concentration Risk [Line Items]"
       }
      }
     },
     "localname": "ConcentrationRiskLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ConcentrationRiskPercentage1": {
     "auth_ref": [
      "r114",
      "r115",
      "r249",
      "r250"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "For an entity that discloses a concentration risk in relation to quantitative amount, which serves as the \"benchmark\" (or denominator) in the equation, this concept represents the concentration percentage derived from the division.",
        "label": "Concentration Risk, Percentage",
        "terseLabel": "Concentration risk, percentage"
       }
      }
     },
     "localname": "ConcentrationRiskPercentage1",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_ConcentrationRiskTable": {
     "auth_ref": [
      "r112",
      "r114",
      "r115",
      "r116",
      "r249",
      "r251"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Describes the nature of a concentration, a benchmark to which it is compared, and the percentage that the risk is to the benchmark.",
        "label": "Concentration Risk [Table]",
        "terseLabel": "Concentration Risk [Table]"
       }
      }
     },
     "localname": "ConcentrationRiskTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ConcentrationRiskTypeDomain": {
     "auth_ref": [
      "r114",
      "r115",
      "r249",
      "r250"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "For an entity that discloses a concentration risk as a percentage of some financial balance or benchmark, identifies the type (for example, asset, liability, net assets, geographic, customer, employees, supplier, lender) of the concentration.",
        "label": "Concentration Risk Type [Domain]",
        "terseLabel": "Concentration Risk Type [Domain]"
       }
      }
     },
     "localname": "ConcentrationRiskTypeDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ConstructionInProgressMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Structure or a modification to a structure under construction. Includes recently completed structures or modifications to structures that have not been placed into service.",
        "label": "Construction in Progress [Member]",
        "terseLabel": "Construction in progress [Member]"
       }
      }
     },
     "localname": "ConstructionInProgressMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetsDetailsPropertyAndEquipmentNetDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ContractWithCustomerAssetAndLiabilityTableTextBlock": {
     "auth_ref": [
      "r198"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of contract balances and changes in contract balances.",
        "label": "Contract with Customer, Asset and Liability [Table Text Block]",
        "terseLabel": "Contract with customer"
       }
      }
     },
     "localname": "ContractWithCustomerAssetAndLiabilityTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ContractWithCustomerAssetCreditLossExpense": {
     "auth_ref": [
      "r149",
      "r195",
      "r202"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of expense (reversal of expense) for expected credit loss on right to consideration in exchange for good or service transferred to customer when right is conditioned on something other than passage of time.",
        "label": "Contract with Customer, Asset, Credit Loss Expense (Reversal)",
        "terseLabel": "Impairment charges related to contract assets"
       }
      }
     },
     "localname": "ContractWithCustomerAssetCreditLossExpense",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionAdditionalInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ContractWithCustomerAssetCumulativeCatchUpAdjustmentToRevenueChangeInMeasureOfProgress": {
     "auth_ref": [
      "r194"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of increase (decrease) in revenue recognized for cumulative catch-up adjustment from change in measure of progress which increases (decreases) right to consideration in exchange for good or service transferred to customer when right is conditioned on something other than passage of time.",
        "label": "Contract with Customer, Asset, Cumulative Catch-up Adjustment to Revenue, Change in Measure of Progress",
        "terseLabel": "License revenue, contingent receivables"
       }
      }
     },
     "localname": "ContractWithCustomerAssetCumulativeCatchUpAdjustmentToRevenueChangeInMeasureOfProgress",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ContractWithCustomerAssetNet": {
     "auth_ref": [
      "r191",
      "r193",
      "r204"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 6.0,
       "parentTag": "us-gaap_AssetsCurrent",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount, after allowance for credit loss, of right to consideration in exchange for good or service transferred to customer when right is conditioned on something other than passage of time.",
        "label": "Contract with Customer, Asset, after Allowance for Credit Loss",
        "periodEndLabel": "September 30, 2019 balance",
        "periodStartLabel": "January 1, 2019 balance",
        "terseLabel": "Contract assets"
       }
      }
     },
     "localname": "ContractWithCustomerAssetNet",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets",
      "http://www.codexis.com/role/RevenueRecognitionContractsWithCustomerDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ContractWithCustomerAssetNetCurrent": {
     "auth_ref": [
      "r191",
      "r193",
      "r204"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount, after allowance for credit loss, of right to consideration in exchange for good or service transferred to customer when right is conditioned on something other than passage of time, classified as current.",
        "label": "Contract with Customer, Asset, Net, Current",
        "periodEndLabel": "September 30, 2019 balance",
        "periodStartLabel": "January 1, 2019 balance"
       }
      }
     },
     "localname": "ContractWithCustomerAssetNetCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionContractsWithCustomerDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ContractWithCustomerAssetReclassifiedToReceivable": {
     "auth_ref": [
      "r196"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of decrease in right to consideration in exchange for good or service transferred to customer when right is conditioned on something other than passage of time from transfer to receivable due to right to consideration becoming unconditional.",
        "label": "Contract with Customer, Asset, Reclassified to Receivable",
        "negatedLabel": "Deductions"
       }
      }
     },
     "localname": "ContractWithCustomerAssetReclassifiedToReceivable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionContractsWithCustomerDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ContractWithCustomerLiability": {
     "auth_ref": [
      "r191",
      "r192",
      "r204"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of obligation to transfer good or service to customer for which consideration has been received or is receivable.",
        "label": "Contract with Customer, Liability",
        "periodEndLabel": "September 30, 2019 balance",
        "periodStartLabel": "January 1, 2019 balance",
        "terseLabel": "Contract with customer, liability"
       }
      }
     },
     "localname": "ContractWithCustomerLiability",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails",
      "http://www.codexis.com/role/RevenueRecognitionContractsWithCustomerDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ContractWithCustomerLiabilityChangeInTimeframePerformanceObligationSatisfiedRevenueRecognized": {
     "auth_ref": [
      "r197"
     ],
     "calculation": {
      "http://www.codexis.com/role/RevenueRecognitionContractsWithCustomerDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_ContractWithCustomerLiabilityRevenueRecognized",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of revenue recognized arising from contract liability from change in timeframe for performance obligation to be satisfied.",
        "label": "Contract with Customer, Liability, Change in Timeframe, Performance Obligation Satisfied, Revenue Recognized",
        "terseLabel": "Performance obligations satisfied"
       }
      }
     },
     "localname": "ContractWithCustomerLiabilityChangeInTimeframePerformanceObligationSatisfiedRevenueRecognized",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionContractsWithCustomerDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ContractWithCustomerLiabilityCumulativeCatchUpAdjustmentToRevenueChangeInEstimateOfTransactionPrice": {
     "auth_ref": [
      "r194"
     ],
     "calculation": {
      "http://www.codexis.com/role/RevenueRecognitionContractsWithCustomerDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_ContractWithCustomerLiabilityRevenueRecognized",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of increase (decrease) in revenue recognized for cumulative catch-up adjustment from change in estimate of transaction price which (increases) decreases obligation to transfer good or service to customer for which consideration from customer has been received or is due. Includes, but is not limited to, change in assessment of whether estimate of variable consideration is constrained.",
        "label": "Contract with Customer, Liability, Cumulative Catch-up Adjustment to Revenue, Change in Estimate of Transaction Price",
        "terseLabel": "Changes in the estimated transaction price allocated to performance obligations satisfied in prior periods"
       }
      }
     },
     "localname": "ContractWithCustomerLiabilityCumulativeCatchUpAdjustmentToRevenueChangeInEstimateOfTransactionPrice",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionContractsWithCustomerDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ContractWithCustomerLiabilityCumulativeCatchUpAdjustmentToRevenueChangeInMeasureOfProgress": {
     "auth_ref": [
      "r194"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of increase (decrease) in revenue recognized for cumulative catch-up adjustment from change in measure of progress which (increases) decreases obligation to transfer good or service to customer for which consideration from customer has been received or is due.",
        "label": "Contract with Customer, Liability, Cumulative Catch-up Adjustment to Revenue, Change in Measure of Progress",
        "terseLabel": "Cumulative catch-up adjustment to revenue, change in measure of progress"
       }
      }
     },
     "localname": "ContractWithCustomerLiabilityCumulativeCatchUpAdjustmentToRevenueChangeInMeasureOfProgress",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ContractWithCustomerLiabilityCurrent": {
     "auth_ref": [
      "r191",
      "r192",
      "r204"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 6.0,
       "parentTag": "us-gaap_LiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of obligation to transfer good or service to customer for which consideration has been received or is receivable, classified as current.",
        "label": "Contract with Customer, Liability, Current",
        "terseLabel": "Deferred revenue"
       }
      }
     },
     "localname": "ContractWithCustomerLiabilityCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails",
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ContractWithCustomerLiabilityNoncurrent": {
     "auth_ref": [
      "r191",
      "r192",
      "r204"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 2.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of obligation to transfer good or service to customer for which consideration has been received or is receivable, classified as noncurrent.",
        "label": "Contract with Customer, Liability, Noncurrent",
        "verboseLabel": "Deferred revenue, net of current portion"
       }
      }
     },
     "localname": "ContractWithCustomerLiabilityNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ContractWithCustomerLiabilityRevenueRecognized": {
     "auth_ref": [
      "r205"
     ],
     "calculation": {
      "http://www.codexis.com/role/RevenueRecognitionContractsWithCustomerDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of revenue recognized that was previously included in balance of obligation to transfer good or service to customer for which consideration from customer has been received or is due.",
        "label": "Contract with Customer, Liability, Revenue Recognized",
        "totalLabel": "Total revenue"
       }
      }
     },
     "localname": "ContractWithCustomerLiabilityRevenueRecognized",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionContractsWithCustomerDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CorporateNonSegmentMember": {
     "auth_ref": [
      "r131"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Corporate headquarters or functional department that may not earn revenues or may earn revenues that are only incidental to the activities of the entity and is not considered an operating segment.",
        "label": "Corporate, Non-Segment [Member]",
        "terseLabel": "Corporate [Member]"
       }
      }
     },
     "localname": "CorporateNonSegmentMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_CostOfGoodsAndServicesSold": {
     "auth_ref": [
      "r57"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations": {
       "order": 1.0,
       "parentTag": "us-gaap_OperatingExpenses",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The aggregate costs related to goods produced and sold and services rendered by an entity during the reporting period. This excludes costs incurred during the reporting period related to financial services rendered and other revenue generating activities.",
        "label": "Cost of Goods and Services Sold",
        "terseLabel": "Cost of product revenue"
       }
      }
     },
     "localname": "CostOfGoodsAndServicesSold",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CreditConcentrationRiskMember": {
     "auth_ref": [
      "r251"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Reflects the percentage that a specified receivable or amount at risk from a counterparty under a contractual arrangement is to a specified benchmark, such as total receivables, net revenues, pretax results. Risk is the materially adverse effects of loss attributable to (a) the failure to collect a significant receivable from a major customer or group of homogeneous accounts, or (b) a failure by a counterparty to perform under terms of a contractual arrangement.",
        "label": "Credit Concentration Risk [Member]",
        "terseLabel": "Credit Concentration Risk [Member]"
       }
      }
     },
     "localname": "CreditConcentrationRiskMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_CreditFacilityAxis": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by type of credit facility. Credit facilities provide capital to borrowers without the need to structure a loan for each borrowing.",
        "label": "Credit Facility [Axis]",
        "terseLabel": "Credit Facility [Axis]"
       }
      }
     },
     "localname": "CreditFacilityAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_CreditFacilityDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Type of credit facility. Credit facilities provide capital to borrowers without the need to structure a loan for each borrowing.",
        "label": "Credit Facility [Domain]",
        "terseLabel": "Credit Facility [Domain]"
       }
      }
     },
     "localname": "CreditFacilityDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_CumulativeEffectOfNewAccountingPrincipleInPeriodOfAdoption": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount after tax of increase (decrease) to equity or (increase) decrease to net assets, resulting from the cumulative effect adjustment of a new accounting principle applied in the period of adoption.",
        "label": "Cumulative Effect of New Accounting Principle in Period of Adoption",
        "verboseLabel": "Cumulative effect of change in accounting principles"
       }
      }
     },
     "localname": "CumulativeEffectOfNewAccountingPrincipleInPeriodOfAdoption",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquity"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CustomerConcentrationRiskMember": {
     "auth_ref": [
      "r113"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Reflects the percentage that revenues in the period from one or more significant customers is to net revenues, as defined by the entity, such as total net revenues, product line revenues, segment revenues. The risk is the materially adverse effects of loss of a significant customer.",
        "label": "Customer Concentration Risk [Member]",
        "terseLabel": "Customer Concentration Risk [Member]"
       }
      }
     },
     "localname": "CustomerConcentrationRiskMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_DebtInstrumentBasisSpreadOnVariableRate1": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Percentage points added to the reference rate to compute the variable rate on the debt instrument.",
        "label": "Debt Instrument, Basis Spread on Variable Rate",
        "terseLabel": "Basis spread on variable rate"
       }
      }
     },
     "localname": "DebtInstrumentBasisSpreadOnVariableRate1",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_DebtInstrumentInterestRateStatedPercentage": {
     "auth_ref": [
      "r37"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Contractual interest rate for funds borrowed, under the debt agreement.",
        "label": "Debt Instrument, Interest Rate, Stated Percentage",
        "terseLabel": "Stated interest rate"
       }
      }
     },
     "localname": "DebtInstrumentInterestRateStatedPercentage",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_DeferredRentCreditCurrent": {
     "auth_ref": [
      "r35",
      "r256"
     ],
     "calculation": {
      "http://www.codexis.com/role/BalanceSheetsDetailsAccruedLiabilitiesDetails": {
       "order": 3.0,
       "parentTag": "us-gaap_AccruedLiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "For a classified balance sheet, the cumulative difference as of the balance sheet date between the payments required by a lease agreement and the rental income or expense recognized on a straight-line basis, or other systematic and rational basis more representative of the time pattern in which use or benefit is granted or derived from the leased property, expected to be recognized in income or expense, by the lessor or lessee, respectively, within one year of the balance sheet date.",
        "label": "Deferred Rent Credit, Current",
        "terseLabel": "Deferred rent"
       }
      }
     },
     "localname": "DeferredRentCreditCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetsDetailsAccruedLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DemandDepositsMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Accounts that may or may not bear interest and that depositor is entitled to withdraw at anytime without prior notice. Checking and negotiable order of withdrawal (NOW) accounts are the most common forms of demand deposits.",
        "label": "Demand Deposits [Member]",
        "terseLabel": "Demand Deposits [Member]"
       }
      }
     },
     "localname": "DemandDepositsMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_Depreciation": {
     "auth_ref": [
      "r76",
      "r163"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 2.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The amount of expense recognized in the current period that reflects the allocation of the cost of tangible assets over the assets' useful lives. Includes production and non-production related depreciation.",
        "label": "Depreciation",
        "negatedTerseLabel": "Depreciation and amortization",
        "verboseLabel": "Depreciation"
       }
      }
     },
     "localname": "Depreciation",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DisaggregationOfRevenueLineItems": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Disaggregation of Revenue [Line Items]",
        "terseLabel": "Disaggregation of Revenue [Line Items]"
       }
      }
     },
     "localname": "DisaggregationOfRevenueLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionDisaggregationOfRevenueDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DisaggregationOfRevenueTable": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of information about disaggregation of revenue into categories depicting how nature, amount, timing, and uncertainty of revenue and cash flows are affected by economic factor.",
        "label": "Disaggregation of Revenue [Table]",
        "terseLabel": "Disaggregation of Revenue [Table]"
       }
      }
     },
     "localname": "DisaggregationOfRevenueTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionDisaggregationOfRevenueDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DisaggregationOfRevenueTableTextBlock": {
     "auth_ref": [
      "r203"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of disaggregation of revenue into categories depicting how nature, amount, timing, and uncertainty of revenue and cash flows are affected by economic factor.",
        "label": "Disaggregation of Revenue [Table Text Block]",
        "terseLabel": "Disaggregation of revenue"
       }
      }
     },
     "localname": "DisaggregationOfRevenueTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_DisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock": {
     "auth_ref": [
      "r231"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for share-based payment arrangement.",
        "label": "Share-based Payment Arrangement [Text Block]",
        "verboseLabel": "Stock-Based Compensation"
       }
      }
     },
     "localname": "DisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensation"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_DisclosureOfCompensationRelatedCostsSharebasedPaymentsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Share-based Payment Arrangement [Abstract]"
       }
      }
     },
     "localname": "DisclosureOfCompensationRelatedCostsSharebasedPaymentsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_EMEAMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Regions of Europe, Middle East and Africa.",
        "label": "EMEA [Member]",
        "terseLabel": "EMEA [Member]"
       }
      }
     },
     "localname": "EMEAMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionDisaggregationOfRevenueDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationRevenuesByGeographicAreaDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_EarningsPerShareAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Earnings Per Share [Abstract]"
       }
      }
     },
     "localname": "EarningsPerShareAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_EarningsPerShareBasic": {
     "auth_ref": [
      "r55",
      "r92",
      "r96",
      "r97",
      "r98",
      "r99",
      "r102",
      "r304",
      "r315"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The amount of net income (loss) for the period per each share of common stock or unit outstanding during the reporting period.",
        "label": "Earnings Per Share, Basic",
        "terseLabel": "Net income (loss) per share, basic (usd per share)"
       }
      }
     },
     "localname": "EarningsPerShareBasic",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations",
      "http://www.codexis.com/role/NetIncomeLossPerShareEarningsPerShareDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_EarningsPerShareDiluted": {
     "auth_ref": [
      "r55",
      "r92",
      "r96",
      "r97",
      "r98",
      "r99",
      "r102",
      "r304",
      "r315"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The amount of net income (loss) for the period available to each share of common stock or common unit outstanding during the reporting period and to each share or unit that would have been outstanding assuming the issuance of common shares or units for all dilutive potential common shares or units outstanding during the reporting period.",
        "label": "Earnings Per Share, Diluted",
        "terseLabel": "Net income (loss) per share, diluted (usd per share)"
       }
      }
     },
     "localname": "EarningsPerShareDiluted",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations",
      "http://www.codexis.com/role/NetIncomeLossPerShareEarningsPerShareDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_EarningsPerShareTextBlock": {
     "auth_ref": [
      "r103"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for earnings per share.",
        "label": "Earnings Per Share [Text Block]",
        "terseLabel": "Net Income (loss) per Share"
       }
      }
     },
     "localname": "EarningsPerShareTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/NetIncomeLossPerShare"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_EmployeeRelatedLiabilitiesCurrent": {
     "auth_ref": [
      "r35"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 2.0,
       "parentTag": "us-gaap_LiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Total of the carrying values as of the balance sheet date of obligations incurred through that date and payable for obligations related to services received from employees, such as accrued salaries and bonuses, payroll taxes and fringe benefits. Used to reflect the current portion of the liabilities (due within one year or within the normal operating cycle if longer).",
        "label": "Employee-related Liabilities, Current",
        "verboseLabel": "Accrued compensation"
       }
      }
     },
     "localname": "EmployeeRelatedLiabilitiesCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedShareBasedAwardsOtherThanOptions": {
     "auth_ref": [
      "r225"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cost to be recognized for nonvested award under share-based payment arrangement. Excludes share and unit options.",
        "label": "Share-based Payment Arrangement, Nonvested Award, Excluding Option, Cost Not yet Recognized, Amount",
        "terseLabel": "Compensation not yet recognized, share-based awards other than options"
       }
      }
     },
     "localname": "EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedShareBasedAwardsOtherThanOptions",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedStockOptions": {
     "auth_ref": [
      "r225"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cost to be recognized for option under share-based payment arrangement.",
        "label": "Share-based Payment Arrangement, Nonvested Award, Option, Cost Not yet Recognized, Amount",
        "terseLabel": "Compensation not yet recognized, stock options"
       }
      }
     },
     "localname": "EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedStockOptions",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_EmployeeStockOptionMember": {
     "auth_ref": [
      "r223"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Share-based payment arrangement granting right, subject to vesting and other restrictions, to purchase or sell certain number of shares at predetermined price for specified period of time.",
        "label": "Share-based Payment Arrangement, Option [Member]",
        "terseLabel": "Stock options [Member]"
       }
      }
     },
     "localname": "EmployeeStockOptionMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationStockBasedCompensationExpenseDetails",
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_EquityAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Equity [Abstract]"
       }
      }
     },
     "localname": "EquityAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_EquityComponentDomain": {
     "auth_ref": [
      "r188"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Components of equity are the parts of the total Equity balance including that which is allocated to common, preferred, treasury stock, retained earnings, etc.",
        "label": "Equity Component [Domain]",
        "terseLabel": "Equity Component [Domain]"
       }
      }
     },
     "localname": "EquityComponentDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquity"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_EquitySecuritiesFvNi": {
     "auth_ref": [
      "r248"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of investment in equity security measured at fair value with change in fair value recognized in net income (FV-NI).",
        "label": "Equity Securities, FV-NI",
        "terseLabel": "Equity securities, estimated fair value",
        "verboseLabel": "Common shares of CO2 Solutions"
       }
      }
     },
     "localname": "EquitySecuritiesFvNi",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesAdditionalInformationDetails",
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesComponentsOfCashEquivalentsAndMarketableSecuritiesDetails",
      "http://www.codexis.com/role/FairValueMeasurementsScheduleOfFinancialInstrumentsMeasuredAtFairValueOnRecurringBasisDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_EquitySecuritiesFvNiCost": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Cost of investment in equity security measured at fair value with change in fair value recognized in net income (FV-NI). Excludes equity method investment and investment in equity security without readily determinable fair value.",
        "label": "Equity Securities, FV-NI, Cost",
        "terseLabel": "Equity securities"
       }
      }
     },
     "localname": "EquitySecuritiesFvNiCost",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesComponentsOfCashEquivalentsAndMarketableSecuritiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_EquitySecuritiesFvNiGainLoss": {
     "auth_ref": [
      "r143"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of unrealized and realized gain (loss) on investment in equity security measured at fair value with change in fair value recognized in net income (FV-NI).",
        "label": "Equity Securities, FV-NI, Gain (Loss)",
        "terseLabel": "Gain (loss) on equity securities"
       }
      }
     },
     "localname": "EquitySecuritiesFvNiGainLoss",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesAdditionalInformationDetails",
      "http://www.codexis.com/role/FairValueMeasurementsScheduleOfFinancialInstrumentsMeasuredAtFairValueOnRecurringBasisDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_EquitySecuritiesFvNiUnrealizedGain": {
     "auth_ref": [
      "r143"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of unrealized gain on investment in equity security measured at fair value with change in fair value recognized in net income (FV-NI).",
        "label": "Equity Securities, FV-NI, Unrealized Gain",
        "terseLabel": "Equity securities, gross unrealized gains"
       }
      }
     },
     "localname": "EquitySecuritiesFvNiUnrealizedGain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesComponentsOfCashEquivalentsAndMarketableSecuritiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_EquitySecuritiesFvNiUnrealizedLoss": {
     "auth_ref": [
      "r143"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of unrealized loss on investment in equity security measured at fair value with change in fair value recognized in net income (FV-NI).",
        "label": "Equity Securities, FV-NI, Unrealized Loss",
        "negatedLabel": "Equity securities, gross unrealized losses"
       }
      }
     },
     "localname": "EquitySecuritiesFvNiUnrealizedLoss",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesComponentsOfCashEquivalentsAndMarketableSecuritiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items]",
        "terseLabel": "Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items]"
       }
      }
     },
     "localname": "FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/FairValueMeasurementsScheduleOfFinancialInstrumentsMeasuredAtFairValueOnRecurringBasisDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable": {
     "auth_ref": [
      "r243",
      "r244",
      "r245",
      "r246"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of information about asset and liability measured at fair value on recurring and nonrecurring basis.",
        "label": "Fair Value, Recurring and Nonrecurring [Table]",
        "terseLabel": "Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Table]"
       }
      }
     },
     "localname": "FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/FairValueMeasurementsScheduleOfFinancialInstrumentsMeasuredAtFairValueOnRecurringBasisDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueAssetsMeasuredOnRecurringBasisTextBlock": {
     "auth_ref": [
      "r243",
      "r244"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of assets, including [financial] instruments measured at fair value that are classified in stockholders' equity, if any, by class that are measured at fair value on a recurring basis. The disclosures contemplated herein include the fair value measurements at the reporting date by the level within the fair value hierarchy in which the fair value measurements in their entirety fall, segregating fair value measurements using quoted prices in active markets for identical assets (Level 1), significant other observable inputs (Level 2), and significant unobservable inputs (Level 3).",
        "label": "Fair Value, Assets Measured on Recurring Basis [Table Text Block]",
        "verboseLabel": "Summary of financial instruments measured at fair value on a recurring basis"
       }
      }
     },
     "localname": "FairValueAssetsMeasuredOnRecurringBasisTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/FairValueMeasurementsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_FairValueByFairValueHierarchyLevelAxis": {
     "auth_ref": [
      "r211",
      "r212",
      "r213",
      "r244",
      "r290"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by level within fair value hierarchy and fair value measured at net asset value per share as practical expedient.",
        "label": "Fair Value Hierarchy and NAV [Axis]",
        "terseLabel": "Fair Value Hierarchy and NAV [Axis]"
       }
      }
     },
     "localname": "FairValueByFairValueHierarchyLevelAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/FairValueMeasurementsScheduleOfFinancialInstrumentsMeasuredAtFairValueOnRecurringBasisDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueDisclosuresAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Fair Value Disclosures [Abstract]"
       }
      }
     },
     "localname": "FairValueDisclosuresAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueInputsLevel1Member": {
     "auth_ref": [
      "r211",
      "r212",
      "r213",
      "r244",
      "r291"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Quoted prices in active markets for identical assets or liabilities that the reporting entity can access at the measurement date.",
        "label": "Fair Value, Inputs, Level 1 [Member]",
        "terseLabel": "Fair Value, Inputs, Level 1 [Member]"
       }
      }
     },
     "localname": "FairValueInputsLevel1Member",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/FairValueMeasurementsScheduleOfFinancialInstrumentsMeasuredAtFairValueOnRecurringBasisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FairValueMeasurementInputsDisclosureTextBlock": {
     "auth_ref": [
      "r247"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure of the fair value measurement of assets and liabilities, which includes financial instruments measured at fair value that are classified in shareholders' equity, which may be measured on a recurring or nonrecurring basis.",
        "label": "Fair Value Measurement and Measurement Inputs, Recurring and Nonrecurring [Text Block]",
        "verboseLabel": "Fair Value Measurements"
       }
      }
     },
     "localname": "FairValueMeasurementInputsDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/FairValueMeasurements"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_FairValueMeasurementsFairValueHierarchyDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Categories used to prioritize the inputs to valuation techniques to measure fair value.",
        "label": "Fair Value Hierarchy and NAV [Domain]",
        "terseLabel": "Fair Value, Measurements, Fair Value Hierarchy [Domain]"
       }
      }
     },
     "localname": "FairValueMeasurementsFairValueHierarchyDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/FairValueMeasurementsScheduleOfFinancialInstrumentsMeasuredAtFairValueOnRecurringBasisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FinanceLeaseInterestExpense": {
     "auth_ref": [
      "r269",
      "r276",
      "r284"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesLeaseCostDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_LeaseCost",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of interest expense on finance lease liability.",
        "label": "Finance Lease, Interest Expense",
        "terseLabel": "Interest on lease obligations"
       }
      }
     },
     "localname": "FinanceLeaseInterestExpense",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesLeaseCostDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FinanceLeaseInterestPaymentOnLiability": {
     "auth_ref": [
      "r271",
      "r279"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of interest paid on finance lease liability.",
        "label": "Finance Lease, Interest Payment on Liability",
        "negatedTerseLabel": "Operating cash flows from finance leases"
       }
      }
     },
     "localname": "FinanceLeaseInterestPaymentOnLiability",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesLeaseCostDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FinanceLeaseLiability": {
     "auth_ref": [
      "r268",
      "r283"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetailsCalc2": {
       "order": 2.0,
       "parentTag": "us-gaap_FinanceLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Present value of lessee's discounted obligation for lease payments from finance lease.",
        "label": "Finance Lease, Liability",
        "terseLabel": "Finance lease, liability",
        "verboseLabel": "Lease Obligations"
       }
      }
     },
     "localname": "FinanceLeaseLiability",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BasisOfPresentationAndSummaryOfSignificantAccountingPoliciesTextualDetails",
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails",
      "http://www.codexis.com/role/CommitmentsAndContingenciesReconciliationOfRightOfUseAssetsAndLeaseLiabilitiesDetails",
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FinanceLeaseLiabilityCurrent": {
     "auth_ref": [
      "r268"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 5.0,
       "parentTag": "us-gaap_LiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Present value of lessee's discounted obligation for lease payments from finance lease, classified as current.",
        "label": "Finance Lease, Liability, Current",
        "terseLabel": "Current portion of lease obligations - Finance leases"
       }
      }
     },
     "localname": "FinanceLeaseLiabilityCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FinanceLeaseLiabilityMaturityTableTextBlock": {
     "auth_ref": [
      "r283"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of undiscounted cash flows of finance lease liability. Includes, but is not limited to, reconciliation of undiscounted cash flows to finance lease liability recognized in statement of financial position.",
        "label": "Finance Lease, Liability, Maturity [Table Text Block]",
        "terseLabel": "Finance lease liability"
       }
      }
     },
     "localname": "FinanceLeaseLiabilityMaturityTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_FinanceLeaseLiabilityNoncurrent": {
     "auth_ref": [
      "r268"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 4.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Present value of lessee's discounted obligation for lease payments from finance lease, classified as noncurrent.",
        "label": "Finance Lease, Liability, Noncurrent",
        "terseLabel": "Long-term lease obligations - Finance leases"
       }
      }
     },
     "localname": "FinanceLeaseLiabilityNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FinanceLeaseLiabilityPaymentsDue": {
     "auth_ref": [
      "r283"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      },
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetailsCalc2": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payments for finance lease.",
        "label": "Finance Lease, Liability, Payment, Due",
        "totalLabel": "Total minimum lease payments"
       }
      }
     },
     "localname": "FinanceLeaseLiabilityPaymentsDue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FinanceLeaseLiabilityPaymentsDueAfterYearFive": {
     "auth_ref": [
      "r283"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails": {
       "order": 6.0,
       "parentTag": "us-gaap_FinanceLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payments for finance lease, due after fifth fiscal year following latest fiscal year.",
        "label": "Finance Lease, Liability, Payments, Due after Year Five",
        "terseLabel": "2024 and thereafter"
       }
      }
     },
     "localname": "FinanceLeaseLiabilityPaymentsDueAfterYearFive",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FinanceLeaseLiabilityPaymentsDueYearFive": {
     "auth_ref": [
      "r283"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails": {
       "order": 5.0,
       "parentTag": "us-gaap_FinanceLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payments for finance lease, due in fifth fiscal year following latest fiscal year.",
        "label": "Finance Lease, Liability, Payments, Due Year Five",
        "terseLabel": "2023"
       }
      }
     },
     "localname": "FinanceLeaseLiabilityPaymentsDueYearFive",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FinanceLeaseLiabilityPaymentsDueYearFour": {
     "auth_ref": [
      "r283"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails": {
       "order": 4.0,
       "parentTag": "us-gaap_FinanceLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payments for finance lease, due in fourth fiscal year following latest fiscal year.",
        "label": "Finance Lease, Liability, Payments, Due Year Four",
        "terseLabel": "2022"
       }
      }
     },
     "localname": "FinanceLeaseLiabilityPaymentsDueYearFour",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FinanceLeaseLiabilityPaymentsDueYearThree": {
     "auth_ref": [
      "r283"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails": {
       "order": 3.0,
       "parentTag": "us-gaap_FinanceLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payments for finance lease, due in third fiscal year following latest fiscal year.",
        "label": "Finance Lease, Liability, Payments, Due Year Three",
        "terseLabel": "2021"
       }
      }
     },
     "localname": "FinanceLeaseLiabilityPaymentsDueYearThree",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FinanceLeaseLiabilityPaymentsDueYearTwo": {
     "auth_ref": [
      "r283"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_FinanceLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payments for finance lease, due in second fiscal year following latest fiscal year.",
        "label": "Finance Lease, Liability, Payments, Due Year Two",
        "terseLabel": "2020"
       }
      }
     },
     "localname": "FinanceLeaseLiabilityPaymentsDueYearTwo",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FinanceLeaseLiabilityPaymentsRemainderOfFiscalYear": {
     "auth_ref": [
      "r283"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_FinanceLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payments for finance lease, due in remainder of fiscal year following latest fiscal year ended.",
        "label": "Finance Lease, Liability, Payments, Remainder of Fiscal Year",
        "terseLabel": "2019 (remaining 3 months)"
       }
      }
     },
     "localname": "FinanceLeaseLiabilityPaymentsRemainderOfFiscalYear",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FinanceLeaseLiabilityUndiscountedExcessAmount": {
     "auth_ref": [
      "r283"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetailsCalc2": {
       "order": 1.0,
       "parentTag": "us-gaap_FinanceLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payments in excess of discounted obligation for lease payments for finance lease.",
        "label": "Finance Lease, Liability, Undiscounted Excess Amount",
        "negatedTerseLabel": "Less: imputed interest"
       }
      }
     },
     "localname": "FinanceLeaseLiabilityUndiscountedExcessAmount",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FinanceLeasePrincipalPayments": {
     "auth_ref": [
      "r270",
      "r279"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash outflow for principal payment on finance lease.",
        "label": "Finance Lease, Principal Payments",
        "negatedTerseLabel": "Financing cash flows from finance leases"
       }
      }
     },
     "localname": "FinanceLeasePrincipalPayments",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesLeaseCostDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FinanceLeaseRightOfUseAsset": {
     "auth_ref": [
      "r267"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 5.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of lessee's right to use underlying asset under finance lease.",
        "label": "Finance Lease, Right-of-Use Asset",
        "terseLabel": "Right-of-use assets - Finance leases, net",
        "verboseLabel": "Right-of-use assets - finance leases, net"
       }
      }
     },
     "localname": "FinanceLeaseRightOfUseAsset",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BasisOfPresentationAndSummaryOfSignificantAccountingPoliciesTextualDetails",
      "http://www.codexis.com/role/CommitmentsAndContingenciesReconciliationOfRightOfUseAssetsAndLeaseLiabilitiesDetails",
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails",
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FinanceLeaseRightOfUseAssetAmortization": {
     "auth_ref": [
      "r269",
      "r276",
      "r284"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesLeaseCostDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_LeaseCost",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of amortization expense attributable to right-of-use asset from finance lease.",
        "label": "Finance Lease, Right-of-Use Asset, Amortization",
        "terseLabel": "Amortization of right-of-use assets"
       }
      }
     },
     "localname": "FinanceLeaseRightOfUseAssetAmortization",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesLeaseCostDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FinanceLeaseWeightedAverageDiscountRatePercent": {
     "auth_ref": [
      "r281",
      "r284"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average discount rate for finance lease calculated at point in time.",
        "label": "Finance Lease, Weighted Average Discount Rate, Percent",
        "terseLabel": "Finance leases",
        "verboseLabel": "Weighted-average discount rate, finance leases"
       }
      }
     },
     "localname": "FinanceLeaseWeightedAverageDiscountRatePercent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BasisOfPresentationAndSummaryOfSignificantAccountingPoliciesTextualDetails",
      "http://www.codexis.com/role/CommitmentsAndContingenciesLeaseCostDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_FinanceLeaseWeightedAverageRemainingLeaseTerm1": {
     "auth_ref": [
      "r280",
      "r284"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average remaining lease term for finance lease, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents reported fact of one year, five months, and thirteen days.",
        "label": "Finance Lease, Weighted Average Remaining Lease Term",
        "terseLabel": "Finance leases"
       }
      }
     },
     "localname": "FinanceLeaseWeightedAverageRemainingLeaseTerm1",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesLeaseCostDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "us-gaap_FinancialInstrumentAxis": {
     "auth_ref": [
      "r148",
      "r150",
      "r151",
      "r152",
      "r153",
      "r154",
      "r155",
      "r156",
      "r157"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by type of financial instrument.",
        "label": "Financial Instrument [Axis]",
        "terseLabel": "Financial Instrument [Axis]"
       }
      }
     },
     "localname": "FinancialInstrumentAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/FairValueMeasurementsScheduleOfFinancialInstrumentsMeasuredAtFairValueOnRecurringBasisDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FinancialInstrumentsFinancialAssetsBalanceSheetGroupingsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Financial Instruments, Financial Assets, Balance Sheet Groupings [Abstract]",
        "verboseLabel": "Summary of financial instruments measured at fair value on a recurring basis"
       }
      }
     },
     "localname": "FinancialInstrumentsFinancialAssetsBalanceSheetGroupingsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/FairValueMeasurementsScheduleOfFinancialInstrumentsMeasuredAtFairValueOnRecurringBasisDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_GainLossOnSaleOfPropertyPlantEquipment": {
     "auth_ref": [
      "r76"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 4.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of gain (loss) on sale or disposal of property, plant and equipment assets, including oil and gas property and timber property.",
        "label": "Gain (Loss) on Disposition of Property Plant Equipment",
        "negatedLabel": "Gain on disposal of property and equipment"
       }
      }
     },
     "localname": "GainLossOnSaleOfPropertyPlantEquipment",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_GeographicAreasLongLivedAssetsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Geographic Areas, Long-Lived Assets [Abstract]",
        "verboseLabel": "Schedule of long-lived assets by geographical area"
       }
      }
     },
     "localname": "GeographicAreasLongLivedAssetsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationLongLivedAssetsByGeographicAreaDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_Goodwill": {
     "auth_ref": [
      "r160",
      "r161"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 7.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount after accumulated impairment loss of an asset representing future economic benefits arising from other assets acquired in a business combination that are not individually identified and separately recognized.",
        "label": "Goodwill",
        "terseLabel": "Goodwill",
        "verboseLabel": "Goodwill"
       }
      }
     },
     "localname": "Goodwill",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetsDetailsGoodwillDetails",
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationGoodwillDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncentiveFromLessor": {
     "auth_ref": [
      "r255",
      "r257",
      "r262"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "This item represents the deferred credit for an incentive or inducement received by a lessee from a lessor, in order to motivate the lessee to enter the lease agreement, which incentive or inducement is to be recognized as a reduction of rental expense over the lease term.",
        "label": "Incentive from Lessor",
        "terseLabel": "Incentive from lessor"
       }
      }
     },
     "localname": "IncentiveFromLessor",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments": {
     "auth_ref": [
      "r88"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations": {
       "order": 1.0,
       "parentTag": "us-gaap_NetIncomeLoss",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of income (loss) from continuing operations before deduction of income tax expense (benefit) and income (loss) attributable to noncontrolling interest, and addition of income (loss) from equity method investments.",
        "label": "Income (Loss) from Continuing Operations before Equity Method Investments, Income Taxes, Noncontrolling Interest",
        "totalLabel": "Income (loss) before income taxes",
        "verboseLabel": "Income (loss) before income taxes"
       }
      }
     },
     "localname": "IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncomeStatementAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Income Statement [Abstract]"
       }
      }
     },
     "localname": "IncomeStatementAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_IncomeStatementLocationAxis": {
     "auth_ref": [
      "r167"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by location in the income statement.",
        "label": "Income Statement Location [Axis]",
        "terseLabel": "Income Statement Location [Axis]"
       }
      }
     },
     "localname": "IncomeStatementLocationAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesAdditionalInformationDetails",
      "http://www.codexis.com/role/FairValueMeasurementsScheduleOfFinancialInstrumentsMeasuredAtFairValueOnRecurringBasisDetails",
      "http://www.codexis.com/role/StockBasedCompensationStockBasedCompensationExpenseDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_IncomeStatementLocationDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Location in the income statement.",
        "label": "Income Statement Location [Domain]",
        "terseLabel": "Income Statement Location [Domain]"
       }
      }
     },
     "localname": "IncomeStatementLocationDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesAdditionalInformationDetails",
      "http://www.codexis.com/role/FairValueMeasurementsScheduleOfFinancialInstrumentsMeasuredAtFairValueOnRecurringBasisDetails",
      "http://www.codexis.com/role/StockBasedCompensationStockBasedCompensationExpenseDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_IncomeTaxExpenseBenefit": {
     "auth_ref": [
      "r85",
      "r124",
      "r236"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations": {
       "order": 2.0,
       "parentTag": "us-gaap_NetIncomeLoss",
       "weight": -1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of current income tax expense (benefit) and deferred income tax expense (benefit) pertaining to continuing operations.",
        "label": "Income Tax Expense (Benefit)",
        "verboseLabel": "Provision for (benefit from) income taxes"
       }
      }
     },
     "localname": "IncomeTaxExpenseBenefit",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncomeTaxesPaid": {
     "auth_ref": [
      "r73",
      "r79"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The amount of cash paid during the current period to foreign, federal, state, and local authorities as taxes on income.",
        "label": "Income Taxes Paid",
        "terseLabel": "Income taxes paid"
       }
      }
     },
     "localname": "IncomeTaxesPaid",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInAccountsPayable": {
     "auth_ref": [
      "r75"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 13.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The increase (decrease) during the reporting period in the aggregate amount of liabilities incurred (and for which invoices have typically been received) and payable to vendors for goods and services received that are used in an entity's business.",
        "label": "Increase (Decrease) in Accounts Payable",
        "verboseLabel": "Accounts payable"
       }
      }
     },
     "localname": "IncreaseDecreaseInAccountsPayable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInAccountsReceivable": {
     "auth_ref": [
      "r75"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 7.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The increase (decrease) during the reporting period in amount due within one year (or one business cycle) from customers for the credit sale of goods and services.",
        "label": "Increase (Decrease) in Accounts Receivable",
        "negatedLabel": "Accounts receivable, net"
       }
      }
     },
     "localname": "IncreaseDecreaseInAccountsReceivable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInContractWithCustomerAsset": {
     "auth_ref": [
      "r75"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 11.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of increase (decrease) in right to consideration in exchange for good or service transferred to customer when right is conditioned on something other than passage of time.",
        "label": "Increase (Decrease) in Contract with Customer, Asset",
        "negatedTerseLabel": "Contract assets"
       }
      }
     },
     "localname": "IncreaseDecreaseInContractWithCustomerAsset",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInContractWithCustomerLiability": {
     "auth_ref": [
      "r75"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 17.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of increase (decrease) in obligation to transfer good or service to customer for which consideration has been received or is receivable.",
        "label": "Increase (Decrease) in Contract with Customer, Liability",
        "verboseLabel": "Deferred revenue"
       }
      }
     },
     "localname": "IncreaseDecreaseInContractWithCustomerLiability",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInEmployeeRelatedLiabilities": {
     "auth_ref": [
      "r75"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 14.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The increase (decrease) during the reporting period in the aggregate amount of obligations related to services received from employees, such as accrued salaries and bonuses, payroll taxes and fringe benefits.",
        "label": "Increase (Decrease) in Employee Related Liabilities",
        "verboseLabel": "Accrued compensation"
       }
      }
     },
     "localname": "IncreaseDecreaseInEmployeeRelatedLiabilities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInInventories": {
     "auth_ref": [
      "r75"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 9.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The increase (decrease) during the reporting period in the aggregate value of all inventory held by the reporting entity, associated with underlying transactions that are classified as operating activities.",
        "label": "Increase (Decrease) in Inventories",
        "negatedLabel": "Inventories"
       }
      }
     },
     "localname": "IncreaseDecreaseInInventories",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInOperatingCapitalAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Increase (Decrease) in Operating Capital [Abstract]",
        "verboseLabel": "Changes in operating assets and liabilities:"
       }
      }
     },
     "localname": "IncreaseDecreaseInOperatingCapitalAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_IncreaseDecreaseInOtherAccruedLiabilities": {
     "auth_ref": [
      "r75"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 15.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The increase (decrease) during the reporting period in other expenses incurred but not yet paid.",
        "label": "Increase (Decrease) in Other Accrued Liabilities",
        "verboseLabel": "Other accrued liabilities"
       }
      }
     },
     "localname": "IncreaseDecreaseInOtherAccruedLiabilities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInOtherNoncurrentLiabilities": {
     "auth_ref": [],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 16.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of increase (decrease) in noncurrent operating liabilities classified as other.",
        "label": "Increase (Decrease) in Other Noncurrent Liabilities",
        "terseLabel": "Other long-term liabilities"
       }
      }
     },
     "localname": "IncreaseDecreaseInOtherNoncurrentLiabilities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInOtherOperatingAssets": {
     "auth_ref": [
      "r75"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 12.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of increase (decrease) in operating assets classified as other.",
        "label": "Increase (Decrease) in Other Operating Assets",
        "negatedTerseLabel": "Other non-current assets"
       }
      }
     },
     "localname": "IncreaseDecreaseInOtherOperatingAssets",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets": {
     "auth_ref": [
      "r75"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 10.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of increase (decrease) in prepaid expenses, and assets classified as other.",
        "label": "Increase (Decrease) in Prepaid Expense and Other Assets",
        "negatedLabel": "Prepaid expenses and other current assets"
       }
      }
     },
     "localname": "IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInStockholdersEquityRollForward": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "A roll forward is a reconciliation of a concept from the beginning of a period to the end of a period.",
        "label": "Increase (Decrease) in Stockholders' Equity [Roll Forward]",
        "terseLabel": "Increase (Decrease) in Stockholders' Equity [Roll Forward]"
       }
      }
     },
     "localname": "IncreaseDecreaseInStockholdersEquityRollForward",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquity"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_IndemnificationGuaranteeMember": {
     "auth_ref": [
      "r184",
      "r187"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "An agreement (contract) that contingently requires the guarantor to make payments to the guaranteed party in compensation for that party's or parties' loss or injury attributable to specified events or actions, such as a patent infringement action against an entity that relied on certain representations as to ownership rights made by a software vendor.",
        "label": "Indemnification Agreement [Member]",
        "terseLabel": "Indemnification Agreement [Member]"
       }
      }
     },
     "localname": "IndemnificationGuaranteeMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_InterestPaidNet": {
     "auth_ref": [
      "r70",
      "r72",
      "r79"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash paid for interest, excluding capitalized interest, classified as operating activity. Includes, but is not limited to, payment to settle zero-coupon bond for accreted interest of debt discount and debt instrument with insignificant coupon interest rate in relation to effective interest rate of borrowing attributable to accreted interest of debt discount.",
        "label": "Interest Paid, Excluding Capitalized Interest, Operating Activities",
        "terseLabel": "Interest paid"
       }
      }
     },
     "localname": "InterestPaidNet",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InventoryFinishedGoods": {
     "auth_ref": [
      "r43"
     ],
     "calculation": {
      "http://www.codexis.com/role/BalanceSheetsDetailsInventoriesDetails": {
       "order": 3.0,
       "parentTag": "us-gaap_InventoryNet",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount before valuation and LIFO reserves of completed merchandise or goods expected to be sold within one year or operating cycle, if longer.",
        "label": "Inventory, Finished Goods, Gross",
        "terseLabel": "Finished goods"
       }
      }
     },
     "localname": "InventoryFinishedGoods",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetsDetailsInventoriesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InventoryNet": {
     "auth_ref": [
      "r2",
      "r46",
      "r159"
     ],
     "calculation": {
      "http://www.codexis.com/role/BalanceSheetsDetailsInventoriesDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      },
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 4.0,
       "parentTag": "us-gaap_AssetsCurrent",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount after valuation and LIFO reserves of inventory expected to be sold, or consumed within one year or operating cycle, if longer.",
        "label": "Inventory, Net",
        "totalLabel": "Inventories",
        "verboseLabel": "Inventories"
       }
      }
     },
     "localname": "InventoryNet",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetsDetailsInventoriesDetails",
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InventoryNetAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Inventory, Net [Abstract]",
        "verboseLabel": "Schedule of Inventory Components"
       }
      }
     },
     "localname": "InventoryNetAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetsDetailsInventoriesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_InventoryRawMaterials": {
     "auth_ref": [
      "r45"
     ],
     "calculation": {
      "http://www.codexis.com/role/BalanceSheetsDetailsInventoriesDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_InventoryNet",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount before valuation and LIFO reserves of raw materials expected to be sold, or consumed within one year or operating cycle, if longer.",
        "label": "Inventory, Raw Materials, Gross",
        "terseLabel": "Raw materials"
       }
      }
     },
     "localname": "InventoryRawMaterials",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetsDetailsInventoriesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InventoryWorkInProcess": {
     "auth_ref": [
      "r44"
     ],
     "calculation": {
      "http://www.codexis.com/role/BalanceSheetsDetailsInventoriesDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_InventoryNet",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount before valuation and LIFO reserves of merchandise or goods in the production process expected to be completed within one year or operating cycle, if longer.",
        "label": "Inventory, Work in Process, Gross",
        "terseLabel": "Work-in-process"
       }
      }
     },
     "localname": "InventoryWorkInProcess",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetsDetailsInventoriesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InvestmentIncomeInterest": {
     "auth_ref": [
      "r59",
      "r123"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations": {
       "order": 2.0,
       "parentTag": "us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount before accretion (amortization) of purchase discount (premium) of interest income on nonoperating securities.",
        "label": "Investment Income, Interest",
        "verboseLabel": "Interest income"
       }
      }
     },
     "localname": "InvestmentIncomeInterest",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InvestmentOwnedBalanceShares": {
     "auth_ref": [
      "r321",
      "r324",
      "r326",
      "r328"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Balance held at close of period in number of shares.",
        "label": "Investment Owned, Balance, Shares",
        "terseLabel": "Investment owned, balance (in shares)"
       }
      }
     },
     "localname": "InvestmentOwnedBalanceShares",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/FairValueMeasurementsScheduleOfFinancialInstrumentsMeasuredAtFairValueOnRecurringBasisDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_InvestmentTableTextBlock": {
     "auth_ref": [
      "r142",
      "r144",
      "r145",
      "r146"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of investment.",
        "label": "Investment [Table Text Block]",
        "terseLabel": "Schedule of cash equivalents and marketable securities"
       }
      }
     },
     "localname": "InvestmentTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_InvestmentTypeAxis": {
     "auth_ref": [
      "r323",
      "r325",
      "r327",
      "r329"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by type of investments.",
        "label": "Investment Type [Axis]",
        "terseLabel": "Investment Type [Axis]"
       }
      }
     },
     "localname": "InvestmentTypeAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesAdditionalInformationDetails",
      "http://www.codexis.com/role/FairValueMeasurementsScheduleOfFinancialInstrumentsMeasuredAtFairValueOnRecurringBasisDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_InvestmentTypeCategorizationMember": {
     "auth_ref": [
      "r323",
      "r325",
      "r327",
      "r329"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Asset obtained to generate income or appreciate in value.",
        "label": "Investments [Domain]",
        "terseLabel": "Investments [Domain]"
       }
      }
     },
     "localname": "InvestmentTypeCategorizationMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesAdditionalInformationDetails",
      "http://www.codexis.com/role/FairValueMeasurementsScheduleOfFinancialInstrumentsMeasuredAtFairValueOnRecurringBasisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_LeaseAndRentalExpense": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of rent expense incurred for leased assets, including but not limited to, furniture and equipment, that is not directly or indirectly associated with the manufacture, sale or creation of a product or product line.",
        "label": "Operating Leases, Rent Expense",
        "terseLabel": "Rent expense"
       }
      }
     },
     "localname": "LeaseAndRentalExpense",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LeaseArrangementTypeAxis": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by group of related lease arrangements. For example, but not limited to, leases grouped by facility or contractual terms.",
        "label": "Lease Arrangement, Type [Axis]",
        "terseLabel": "Lease Arrangement, Type [Axis]"
       }
      }
     },
     "localname": "LeaseArrangementTypeAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LeaseArrangementTypeDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Group of related lease arrangements. For example, but not limited to, leases grouped by facility or contractual terms.",
        "label": "Lease Arrangement, Type [Domain]",
        "terseLabel": "Lease Arrangement, Type [Domain]"
       }
      }
     },
     "localname": "LeaseArrangementTypeDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_LeaseCost": {
     "auth_ref": [
      "r282",
      "r284"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesLeaseCostDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of lease cost recognized by lessee for lease contract.",
        "label": "Lease, Cost",
        "totalLabel": "Total lease cost"
       }
      }
     },
     "localname": "LeaseCost",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesLeaseCostDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LeaseCostAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Lease, Cost [Abstract]",
        "terseLabel": "Finance lease cost:"
       }
      }
     },
     "localname": "LeaseCostAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesLeaseCostDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LeaseCostTableTextBlock": {
     "auth_ref": [
      "r282"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of lessee's lease cost. Includes, but is not limited to, interest expense for finance lease, amortization of right-of-use asset for finance lease, operating lease cost, short-term lease cost, variable lease cost and sublease income.",
        "label": "Lease, Cost [Table Text Block]",
        "terseLabel": "Lease cost"
       }
      }
     },
     "localname": "LeaseCostTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_LeaseIncentivePayableCurrent": {
     "auth_ref": [
      "r35",
      "r257",
      "r258",
      "r261"
     ],
     "calculation": {
      "http://www.codexis.com/role/BalanceSheetsDetailsAccruedLiabilitiesDetails": {
       "order": 4.0,
       "parentTag": "us-gaap_AccruedLiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "This item represents an incentive or inducement contractually stipulated between parties to a lease whereby the lessor has committed to provide the entity (lessee) with a cash payment as inducement to enter the lease. Used to reflect the current portion of the liabilities (due within one year or within the normal operating cycle if longer).",
        "label": "Lease Incentive, Payable, Current",
        "terseLabel": "Lease incentive obligation"
       }
      }
     },
     "localname": "LeaseIncentivePayableCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetsDetailsAccruedLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LeaseholdImprovementsMember": {
     "auth_ref": [
      "r164"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Additions or improvements to assets held under a lease arrangement.",
        "label": "Leasehold Improvements [Member]",
        "terseLabel": "Leasehold improvements [Member]"
       }
      }
     },
     "localname": "LeaseholdImprovementsMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetsDetailsPropertyAndEquipmentNetDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_LesseeFinanceLeaseTermOfContract1": {
     "auth_ref": [
      "r274"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Term of lessee's finance lease, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents reported fact of one year, five months, and thirteen days.",
        "label": "Lessee, Finance Lease, Term of Contract",
        "terseLabel": "Term of contract"
       }
      }
     },
     "localname": "LesseeFinanceLeaseTermOfContract1",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "us-gaap_LesseeLeaseDescriptionLineItems": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Lessee, Lease, Description [Line Items]",
        "terseLabel": "Lessee, Lease, Description [Line Items]"
       }
      }
     },
     "localname": "LesseeLeaseDescriptionLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesReconciliationOfRightOfUseAssetsAndLeaseLiabilitiesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LesseeLeaseDescriptionTable": {
     "auth_ref": [
      "r275"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of information about lessee's leases.",
        "label": "Lessee, Lease, Description [Table]",
        "terseLabel": "Lessee, Lease, Description [Table]"
       }
      }
     },
     "localname": "LesseeLeaseDescriptionTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesReconciliationOfRightOfUseAssetsAndLeaseLiabilitiesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LesseeLeasesPolicyTextBlock": {
     "auth_ref": [
      "r273"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of accounting policy for leasing arrangement entered into by lessee.",
        "label": "Lessee, Leases [Policy Text Block]",
        "terseLabel": "Leases"
       }
      }
     },
     "localname": "LesseeLeasesPolicyTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BasisOfPresentationAndSummaryOfSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityMaturityTableTextBlock": {
     "auth_ref": [
      "r283"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of undiscounted cash flows of lessee's operating lease liability. Includes, but is not limited to, reconciliation of undiscounted cash flows to operating lease liability recognized in statement of financial position.",
        "label": "Lessee, Operating Lease, Liability, Maturity [Table Text Block]",
        "verboseLabel": "Operating lease maturity"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityMaturityTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue": {
     "auth_ref": [
      "r283"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      },
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetailsCalc2": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payments for operating lease.",
        "label": "Lessee, Operating Lease, Liability, Payments, Due",
        "totalLabel": "Total minimum lease payments"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityPaymentsDue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive": {
     "auth_ref": [
      "r283"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails": {
       "order": 6.0,
       "parentTag": "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payments for operating lease, due after fifth fiscal year following latest fiscal year.",
        "label": "Lessee, Operating Lease, Liability, Payments, Due after Year Five",
        "terseLabel": "2024 and thereafter"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive": {
     "auth_ref": [
      "r283"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails": {
       "order": 5.0,
       "parentTag": "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payments for operating lease, due in fifth fiscal year following latest fiscal year.",
        "label": "Lessee, Operating Lease, Liability, Payments, Due Year Five",
        "terseLabel": "2023"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityPaymentsDueYearFive",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour": {
     "auth_ref": [
      "r283"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails": {
       "order": 4.0,
       "parentTag": "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payments for operating lease, due in fourth fiscal year following latest fiscal year.",
        "label": "Lessee, Operating Lease, Liability, Payments, Due Year Four",
        "terseLabel": "2022"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityPaymentsDueYearFour",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree": {
     "auth_ref": [
      "r283"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails": {
       "order": 3.0,
       "parentTag": "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payments for operating lease, due in third fiscal year following latest fiscal year.",
        "label": "Lessee, Operating Lease, Liability, Payments, Due Year Three",
        "terseLabel": "2021"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityPaymentsDueYearThree",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo": {
     "auth_ref": [
      "r283"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payments for operating lease, due in second fiscal year following latest fiscal year.",
        "label": "Lessee, Operating Lease, Liability, Payments, Due Year Two",
        "terseLabel": "2020"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityPaymentsDueYearTwo",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear": {
     "auth_ref": [
      "r283"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payments for operating lease having an initial or remaining lease term in excess of one year due in remainder of fiscal year following latest fiscal year.",
        "label": "Lessee, Operating Lease, Liability, Payments, Remainder of Fiscal Year",
        "terseLabel": "2019 (remaining 3 months)"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityUndiscountedExcessAmount": {
     "auth_ref": [
      "r283"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetailsCalc2": {
       "order": 1.0,
       "parentTag": "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payments in excess of discounted obligation for lease payments for operating lease.",
        "label": "Lessee, Operating Lease, Liability, Undiscounted Excess Amount",
        "negatedTerseLabel": "Less: imputed interest"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityUndiscountedExcessAmount",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LesseeOperatingLeaseRenewalTerm": {
     "auth_ref": [
      "r274"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Term of lessee's operating lease renewal, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents reported fact of one year, five months, and thirteen days.",
        "label": "Lessee, Operating Lease, Renewal Term",
        "terseLabel": "Renewal term"
       }
      }
     },
     "localname": "LesseeOperatingLeaseRenewalTerm",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "us-gaap_LessorOperatingLeasePaymentsToBeReceived": {
     "auth_ref": [
      "r285"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of lease payments to be received by lessor for operating lease.",
        "label": "Lessor, Operating Lease, Payments to be Received",
        "terseLabel": "Sublease, payments to be received"
       }
      }
     },
     "localname": "LessorOperatingLeasePaymentsToBeReceived",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LetterOfCreditMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "A document typically issued by a financial institution which acts as a guarantee of payment to a beneficiary, or as the source of payment for a specific transaction (for example, wiring funds to a foreign exporter if and when specified merchandise is accepted pursuant to the terms of the letter of credit).",
        "label": "Letter of Credit [Member]",
        "terseLabel": "Letter of Credit [Member]"
       }
      }
     },
     "localname": "LetterOfCreditMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_Liabilities": {
     "auth_ref": [
      "r34"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 2.0,
       "parentTag": "us-gaap_LiabilitiesAndStockholdersEquity",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Sum of the carrying amounts as of the balance sheet date of all liabilities that are recognized. Liabilities are probable future sacrifices of economic benefits arising from present obligations of an entity to transfer assets or provide services to other entities in the future.",
        "label": "Liabilities",
        "totalLabel": "Total liabilities"
       }
      }
     },
     "localname": "Liabilities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LiabilitiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Liabilities [Abstract]",
        "terseLabel": "Liabilities"
       }
      }
     },
     "localname": "LiabilitiesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesReconciliationOfRightOfUseAssetsAndLeaseLiabilitiesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LiabilitiesAndStockholdersEquity": {
     "auth_ref": [
      "r20",
      "r300",
      "r309"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of liabilities and equity items, including the portion of equity attributable to noncontrolling interests, if any.",
        "label": "Liabilities and Equity",
        "totalLabel": "Total liabilities and stockholders' equity"
       }
      }
     },
     "localname": "LiabilitiesAndStockholdersEquity",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LiabilitiesAndStockholdersEquityAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Liabilities and Equity [Abstract]",
        "verboseLabel": "Liabilities and Stockholders' Equity"
       }
      }
     },
     "localname": "LiabilitiesAndStockholdersEquityAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LiabilitiesCurrent": {
     "auth_ref": [
      "r36"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 1.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Total obligations incurred as part of normal operations that are expected to be paid during the following twelve months or within one business cycle, if longer.",
        "label": "Liabilities, Current",
        "totalLabel": "Total current liabilities"
       }
      }
     },
     "localname": "LiabilitiesCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LiabilitiesCurrentAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Liabilities, Current [Abstract]",
        "verboseLabel": "Current liabilities:"
       }
      }
     },
     "localname": "LiabilitiesCurrentAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LineOfCreditFacilityCurrentBorrowingCapacity": {
     "auth_ref": [
      "r33"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of current borrowing capacity under the credit facility considering any current restrictions on the amount that could be borrowed (for example, borrowings may be limited by the amount of current assets), but without considering any amounts currently outstanding under the facility.",
        "label": "Line of Credit Facility, Current Borrowing Capacity",
        "terseLabel": "Borrowing capacity"
       }
      }
     },
     "localname": "LineOfCreditFacilityCurrentBorrowingCapacity",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity": {
     "auth_ref": [
      "r33"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Maximum borrowing capacity under the credit facility without consideration of any current restrictions on the amount that could be borrowed or the amounts currently outstanding under the facility.",
        "label": "Line of Credit Facility, Maximum Borrowing Capacity",
        "terseLabel": "Maximum borrowing capacity"
       }
      }
     },
     "localname": "LineOfCreditFacilityMaximumBorrowingCapacity",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LondonInterbankOfferedRateLIBORMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Interest rate at which a bank borrows funds from other banks in the London interbank market.",
        "label": "London Interbank Offered Rate (LIBOR) [Member]",
        "terseLabel": "LIBOR [Member]"
       }
      }
     },
     "localname": "LondonInterbankOfferedRateLIBORMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_LossContingenciesByNatureOfContingencyAxis": {
     "auth_ref": [
      "r176",
      "r177",
      "r178",
      "r179",
      "r180",
      "r181",
      "r182",
      "r185",
      "r186"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by type of existing condition, situation, or set of circumstances involving uncertainty as to possible loss to an enterprise that will ultimately be resolved when one or more future events occur or fail to occur.",
        "label": "Loss Contingency Nature [Axis]",
        "terseLabel": "Loss Contingency Nature [Axis]"
       }
      }
     },
     "localname": "LossContingenciesByNatureOfContingencyAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LossContingencyAccrualCarryingValueCurrent": {
     "auth_ref": [
      "r176"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of loss contingency liability expected to be resolved within one year or the normal operating cycle, if longer.",
        "label": "Loss Contingency, Accrual, Current",
        "terseLabel": "Loss contingency accrual"
       }
      }
     },
     "localname": "LossContingencyAccrualCarryingValueCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LossContingencyNatureDomain": {
     "auth_ref": [
      "r176",
      "r177",
      "r178",
      "r179",
      "r180",
      "r181",
      "r182",
      "r185",
      "r186"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "An existing condition, situation, or set of circumstances involving uncertainty as to possible loss to an enterprise that will ultimately be resolved when one or more future events occur or fail to occur. Resolution of the uncertainty may confirm the incurrence of a loss or impairment of an asset or the incurrence of a liability.",
        "label": "Loss Contingency, Nature [Domain]",
        "terseLabel": "Loss Contingency, Nature [Domain]"
       }
      }
     },
     "localname": "LossContingencyNatureDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_MarketableSecuritiesNoncurrent": {
     "auth_ref": [
      "r28"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 3.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of investment in marketable security, classified as noncurrent.",
        "label": "Marketable Securities, Noncurrent",
        "terseLabel": "Marketable Securities, Noncurrent"
       }
      }
     },
     "localname": "MarketableSecuritiesNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_MoneyMarketFundsMember": {
     "auth_ref": [
      "r211"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fund that invests in short-term money-market instruments, for example, but not limited to, commercial paper, banker's acceptances, repurchase agreements, government securities, certificates of deposit, and other highly liquid securities.",
        "label": "Money Market Funds [Member]",
        "terseLabel": "Money Market Funds [Member]"
       }
      }
     },
     "localname": "MoneyMarketFundsMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesAdditionalInformationDetails",
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesComponentsOfCashEquivalentsAndMarketableSecuritiesDetails",
      "http://www.codexis.com/role/FairValueMeasurementsScheduleOfFinancialInstrumentsMeasuredAtFairValueOnRecurringBasisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_NatureOfOperations": {
     "auth_ref": [
      "r107",
      "r120"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for the nature of an entity's business, major products or services, principal markets including location, and the relative importance of its operations in each business and the basis for the determination, including but not limited to, assets, revenues, or earnings. For an entity that has not commenced principal operations, disclosures about the risks and uncertainties related to the activities in which the entity is currently engaged and an understanding of what those activities are being directed toward.",
        "label": "Nature of Operations [Text Block]",
        "verboseLabel": "Description of Business"
       }
      }
     },
     "localname": "NatureOfOperations",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/DescriptionOfBusiness"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_NetCashProvidedByUsedInFinancingActivities": {
     "auth_ref": [
      "r71"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 3.0,
       "parentTag": "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash inflow (outflow) from financing activities, including discontinued operations. Financing activity cash flows include obtaining resources from owners and providing them with a return on, and a return of, their investment; borrowing money and repaying amounts borrowed, or settling the obligation; and obtaining and paying for other resources obtained from creditors on long-term credit.",
        "label": "Net Cash Provided by (Used in) Financing Activities",
        "totalLabel": "Net cash provided by financing activities"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInFinancingActivities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NetCashProvidedByUsedInFinancingActivitiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Net Cash Provided by (Used in) Financing Activities [Abstract]",
        "verboseLabel": "Financing activities:"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInFinancingActivitiesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_NetCashProvidedByUsedInInvestingActivities": {
     "auth_ref": [
      "r71"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 2.0,
       "parentTag": "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash inflow (outflow) from investing activities, including discontinued operations. Investing activity cash flows include making and collecting loans and acquiring and disposing of debt or equity instruments and property, plant, and equipment and other productive assets.",
        "label": "Net Cash Provided by (Used in) Investing Activities",
        "totalLabel": "Net cash used in investing activities"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInInvestingActivities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NetCashProvidedByUsedInInvestingActivitiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Net Cash Provided by (Used in) Investing Activities [Abstract]",
        "verboseLabel": "Investing activities:"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInInvestingActivitiesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_NetCashProvidedByUsedInOperatingActivities": {
     "auth_ref": [
      "r71",
      "r74",
      "r77"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 1.0,
       "parentTag": "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect",
       "weight": 1.0
      }
     },
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash inflow (outflow) from operating activities, including discontinued operations. Operating activity cash flows include transactions, adjustments, and changes in value not defined as investing or financing activities.",
        "label": "Net Cash Provided by (Used in) Operating Activities",
        "totalLabel": "Net cash used in operating activities"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInOperatingActivities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NetCashProvidedByUsedInOperatingActivitiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Net Cash Provided by (Used in) Operating Activities [Abstract]",
        "verboseLabel": "Operating activities:"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInOperatingActivitiesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_NetIncomeLoss": {
     "auth_ref": [
      "r52",
      "r53",
      "r54",
      "r77",
      "r101",
      "r303",
      "r314"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 1.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      },
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The portion of profit or loss for the period, net of income taxes, which is attributable to the parent.",
        "label": "Net Income (Loss) Attributable to Parent",
        "terseLabel": "Net loss",
        "totalLabel": "Net Income (loss)",
        "verboseLabel": "Net income (loss)"
       }
      }
     },
     "localname": "NetIncomeLoss",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows",
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations",
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquity",
      "http://www.codexis.com/role/NetIncomeLossPerShareEarningsPerShareDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NewAccountingPronouncementOrChangeInAccountingPrincipleCumulativeEffectOfChangeOnEquityOrNetAssets1": {
     "auth_ref": [
      "r90",
      "r93"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cumulative effect of the change in accounting principle or new accounting pronouncement on retained earnings or other components of equity or net assets in the statement of financial position as of the beginning of the earliest period presented.",
        "label": "New Accounting Pronouncement or Change in Accounting Principle, Cumulative Effect of Change on Equity or Net Assets",
        "terseLabel": "Cumulative effect of change on equity or net assets"
       }
      }
     },
     "localname": "NewAccountingPronouncementOrChangeInAccountingPrincipleCumulativeEffectOfChangeOnEquityOrNetAssets1",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesAdditionalInformationDetails",
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquityParenthetical"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleLineItems": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "New Accounting Pronouncements or Change in Accounting Principle [Line Items]",
        "terseLabel": "New Accounting Pronouncements or Change in Accounting Principle [Line Items]"
       }
      }
     },
     "localname": "NewAccountingPronouncementsOrChangeInAccountingPrincipleLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BasisOfPresentationAndSummaryOfSignificantAccountingPoliciesTextualDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleTable": {
     "auth_ref": [
      "r91",
      "r93"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Summarization of the changes in an accounting principle or a new accounting pronouncement, including the line items affected by the change and the financial effects of the change on those particular line items.",
        "label": "New Accounting Pronouncements or Change in Accounting Principle [Table]",
        "terseLabel": "New Accounting Pronouncements or Change in Accounting Principle [Table]"
       }
      }
     },
     "localname": "NewAccountingPronouncementsOrChangeInAccountingPrincipleTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BasisOfPresentationAndSummaryOfSignificantAccountingPoliciesTextualDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_NewAccountingPronouncementsPolicyPolicyTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of accounting policy pertaining to new accounting pronouncements that may impact the entity's financial reporting. Includes, but is not limited to, quantification of the expected or actual impact.",
        "label": "New Accounting Pronouncements, Policy [Policy Text Block]",
        "verboseLabel": "Recently Adopted and Issued Accounting Pronouncements"
       }
      }
     },
     "localname": "NewAccountingPronouncementsPolicyPolicyTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BasisOfPresentationAndSummaryOfSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_NoncurrentAssets": {
     "auth_ref": [
      "r133"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Long-lived assets other than financial instruments, long-term customer relationships of a financial institution, mortgage and other servicing rights, deferred policy acquisition costs, and deferred tax assets.",
        "label": "Long-Lived Assets",
        "terseLabel": "Long-Lived Assets"
       }
      }
     },
     "localname": "NoncurrentAssets",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationLongLivedAssetsByGeographicAreaDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NumberOfOperatingSegments": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Number of operating segments. An operating segment is a component of an enterprise: (a) that engages in business activities from which it may earn revenues and incur expenses (including revenues and expenses relating to transactions with other components of the same enterprise), (b) whose operating results are regularly reviewed by the enterprise's chief operating decision maker to make decisions about resources to be allocated to the segment and assess its performance, and (c) for which discrete financial information is available. An operating segment may engage in business activities for which it has yet to earn revenues, for example, start-up operations may be operating segments before earning revenues.",
        "label": "Number of Operating Segments",
        "terseLabel": "Number of operating segments"
       }
      }
     },
     "localname": "NumberOfOperatingSegments",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BasisOfPresentationAndSummaryOfSignificantAccountingPoliciesTextualDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationAdditionalInformationDetails"
     ],
     "xbrltype": "integerItemType"
    },
    "us-gaap_NumberOfPropertiesSubjectToGroundLeases": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Number of separate real estate development properties located on land subject to ground leases.",
        "label": "Number of Properties Subject to Ground Leases",
        "terseLabel": "Number of buildings leased"
       }
      }
     },
     "localname": "NumberOfPropertiesSubjectToGroundLeases",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "integerItemType"
    },
    "us-gaap_OperatingCostsAndExpensesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Operating Costs and Expenses [Abstract]",
        "verboseLabel": "Costs and operating expenses:"
       }
      }
     },
     "localname": "OperatingCostsAndExpensesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_OperatingExpenses": {
     "auth_ref": [],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations": {
       "order": 1.0,
       "parentTag": "us-gaap_OperatingIncomeLoss",
       "weight": -1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Generally recurring costs associated with normal operations except for the portion of these expenses which can be clearly related to production and included in cost of sales or services. Includes selling, general and administrative expense.",
        "label": "Operating Expenses",
        "totalLabel": "Total costs and operating expenses",
        "verboseLabel": "Total costs and operating expenses"
       }
      }
     },
     "localname": "OperatingExpenses",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingIncomeLoss": {
     "auth_ref": [],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations": {
       "order": 1.0,
       "parentTag": "us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The net result for the period of deducting operating expenses from operating revenues.",
        "label": "Operating Income (Loss)",
        "totalLabel": "Income (loss) from operations",
        "verboseLabel": "Income (loss) from operations"
       }
      }
     },
     "localname": "OperatingIncomeLoss",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeaseCost": {
     "auth_ref": [
      "r277",
      "r284"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesLeaseCostDetails": {
       "order": 3.0,
       "parentTag": "us-gaap_LeaseCost",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of single lease cost, calculated by allocation of remaining cost of lease over remaining lease term. Includes, but is not limited to, single lease cost, after impairment of right-of-use asset, calculated by amortization of remaining right-of-use asset and accretion of lease liability.",
        "label": "Operating Lease, Cost",
        "terseLabel": "Operating lease cost"
       }
      }
     },
     "localname": "OperatingLeaseCost",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesLeaseCostDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeaseLiability": {
     "auth_ref": [
      "r268"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetailsCalc2": {
       "order": 2.0,
       "parentTag": "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Present value of lessee's discounted obligation for lease payments from operating lease.",
        "label": "Operating Lease, Liability",
        "terseLabel": "Lease Obligations",
        "verboseLabel": "Operating lease, liability"
       }
      }
     },
     "localname": "OperatingLeaseLiability",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BasisOfPresentationAndSummaryOfSignificantAccountingPoliciesTextualDetails",
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails",
      "http://www.codexis.com/role/CommitmentsAndContingenciesReconciliationOfRightOfUseAssetsAndLeaseLiabilitiesDetails",
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeaseLiabilityCurrent": {
     "auth_ref": [
      "r268"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 4.0,
       "parentTag": "us-gaap_LiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Present value of lessee's discounted obligation for lease payments from operating lease, classified as current.",
        "label": "Operating Lease, Liability, Current",
        "terseLabel": "Current portion of lease obligations - Operating leases"
       }
      }
     },
     "localname": "OperatingLeaseLiabilityCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeaseLiabilityNoncurrent": {
     "auth_ref": [
      "r268"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 3.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Present value of lessee's discounted obligation for lease payments from operating lease, classified as noncurrent.",
        "label": "Operating Lease, Liability, Noncurrent",
        "terseLabel": "Long-term lease obligations - Operating leases"
       }
      }
     },
     "localname": "OperatingLeaseLiabilityNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeasePayments": {
     "auth_ref": [
      "r272",
      "r279"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash outflow from operating lease, excluding payments to bring another asset to condition and location necessary for its intended use.",
        "label": "Operating Lease, Payments",
        "negatedTerseLabel": "Operating cash flows from operating leases"
       }
      }
     },
     "localname": "OperatingLeasePayments",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesLeaseCostDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeaseRightOfUseAsset": {
     "auth_ref": [
      "r267"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 4.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of lessee's right to use underlying asset under operating lease.",
        "label": "Operating Lease, Right-of-Use Asset",
        "terseLabel": "Right-of-use assets - Operating leases, net",
        "verboseLabel": "Right-of-use assets, operating leases, net"
       }
      }
     },
     "localname": "OperatingLeaseRightOfUseAsset",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BasisOfPresentationAndSummaryOfSignificantAccountingPoliciesTextualDetails",
      "http://www.codexis.com/role/CommitmentsAndContingenciesReconciliationOfRightOfUseAssetsAndLeaseLiabilitiesDetails",
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails",
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeaseWeightedAverageDiscountRatePercent": {
     "auth_ref": [
      "r281",
      "r284"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average discount rate for operating lease calculated at point in time.",
        "label": "Operating Lease, Weighted Average Discount Rate, Percent",
        "terseLabel": "Operating leases",
        "verboseLabel": "Weighted-average discount rate, operating leases"
       }
      }
     },
     "localname": "OperatingLeaseWeightedAverageDiscountRatePercent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BasisOfPresentationAndSummaryOfSignificantAccountingPoliciesTextualDetails",
      "http://www.codexis.com/role/CommitmentsAndContingenciesLeaseCostDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_OperatingLeaseWeightedAverageRemainingLeaseTerm1": {
     "auth_ref": [
      "r280",
      "r284"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average remaining lease term for operating lease, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents reported fact of one year, five months, and thirteen days.",
        "label": "Operating Lease, Weighted Average Remaining Lease Term",
        "terseLabel": "Operating leases"
       }
      }
     },
     "localname": "OperatingLeaseWeightedAverageRemainingLeaseTerm1",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesLeaseCostDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "us-gaap_OperatingLeasesFutureMinimumPaymentsDue": {
     "auth_ref": [
      "r254",
      "r259"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of required minimum rental payments for leases having an initial or remaining non-cancelable letter-terms in excess of one year.",
        "label": "Operating Leases, Future Minimum Payments Due",
        "totalLabel": "Total minimum lease payments"
       }
      }
     },
     "localname": "OperatingLeasesFutureMinimumPaymentsDue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeasesFutureMinimumPaymentsDueAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Operating Leases, Future Minimum Payments Due, Fiscal Year Maturity [Abstract]",
        "terseLabel": "Operating Leases"
       }
      }
     },
     "localname": "OperatingLeasesFutureMinimumPaymentsDueAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails",
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_OperatingLeasesFutureMinimumPaymentsDueInFiveYears": {
     "auth_ref": [
      "r254",
      "r259"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details": {
       "order": 5.0,
       "parentTag": "us-gaap_OperatingLeasesFutureMinimumPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of required minimum rental payments for operating leases having an initial or remaining non-cancelable lease term in excess of one year due in the fifth fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Operating Leases, Future Minimum Payments, Due in Five Years",
        "terseLabel": "2023"
       }
      }
     },
     "localname": "OperatingLeasesFutureMinimumPaymentsDueInFiveYears",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeasesFutureMinimumPaymentsDueInFourYears": {
     "auth_ref": [
      "r254",
      "r259"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details": {
       "order": 4.0,
       "parentTag": "us-gaap_OperatingLeasesFutureMinimumPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of required minimum rental payments for operating leases having an initial or remaining non-cancelable lease term in excess of one year due in the fourth fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Operating Leases, Future Minimum Payments, Due in Four Years",
        "terseLabel": "2022"
       }
      }
     },
     "localname": "OperatingLeasesFutureMinimumPaymentsDueInFourYears",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeasesFutureMinimumPaymentsDueInThreeYears": {
     "auth_ref": [
      "r254",
      "r259"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details": {
       "order": 3.0,
       "parentTag": "us-gaap_OperatingLeasesFutureMinimumPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of required minimum rental payments for operating leases having an initial or remaining non-cancelable lease term in excess of one year due in the third fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Operating Leases, Future Minimum Payments, Due in Three Years",
        "terseLabel": "2021"
       }
      }
     },
     "localname": "OperatingLeasesFutureMinimumPaymentsDueInThreeYears",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeasesFutureMinimumPaymentsDueInTwoYears": {
     "auth_ref": [
      "r254",
      "r259"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details": {
       "order": 2.0,
       "parentTag": "us-gaap_OperatingLeasesFutureMinimumPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of required minimum rental payments for operating leases having an initial or remaining non-cancelable lease term in excess of one year due in the second fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Operating Leases, Future Minimum Payments, Due in Two Years",
        "terseLabel": "2020"
       }
      }
     },
     "localname": "OperatingLeasesFutureMinimumPaymentsDueInTwoYears",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeasesFutureMinimumPaymentsRemainderOfFiscalYear": {
     "auth_ref": [],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details": {
       "order": 1.0,
       "parentTag": "us-gaap_OperatingLeasesFutureMinimumPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of required minimum rental payments for operating leases having an initial or remaining non-cancelable lease term in excess of one year due in the remainder of the fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Operating Leases, Future Minimum Payments, Remainder of Fiscal Year",
        "terseLabel": "2019"
       }
      }
     },
     "localname": "OperatingLeasesFutureMinimumPaymentsRemainderOfFiscalYear",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsUnderTopic840Details"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeasesRentExpenseSubleaseRentals1": {
     "auth_ref": [
      "r254"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The total amount of sublease rental income recognized during the period that reduces the entity's rent expense incurred under operating leases.",
        "label": "Operating Leases, Rent Expense, Sublease Rentals",
        "terseLabel": "Operating lease, sublease rentals"
       }
      }
     },
     "localname": "OperatingLeasesRentExpenseSubleaseRentals1",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingSegmentsMember": {
     "auth_ref": [
      "r122",
      "r130"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Identifies components of an entity that engage in business activities from which they may earn revenue and incur expenses, including transactions with other components of the same entity.",
        "label": "Operating Segments [Member]",
        "terseLabel": "Operating Segments [Member]"
       }
      }
     },
     "localname": "OperatingSegmentsMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationGoodwillDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_OrganizationConsolidationAndPresentationOfFinancialStatementsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Organization, Consolidation and Presentation of Financial Statements [Abstract]"
       }
      }
     },
     "localname": "OrganizationConsolidationAndPresentationOfFinancialStatementsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_OtherAccruedLiabilitiesCurrentAndNoncurrent": {
     "auth_ref": [
      "r301",
      "r313"
     ],
     "calculation": {
      "http://www.codexis.com/role/BalanceSheetsDetailsAccruedLiabilitiesDetails": {
       "order": 5.0,
       "parentTag": "us-gaap_AccruedLiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of expenses incurred but not yet paid classified as other.",
        "label": "Other Accrued Liabilities",
        "terseLabel": "Other"
       }
      }
     },
     "localname": "OtherAccruedLiabilitiesCurrentAndNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetsDetailsAccruedLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherAssetsNoncurrent": {
     "auth_ref": [
      "r31"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 8.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of noncurrent assets classified as other.",
        "label": "Other Assets, Noncurrent",
        "verboseLabel": "Other non-current assets"
       }
      }
     },
     "localname": "OtherAssetsNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherCommitmentsLineItems": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Other Commitments [Line Items]",
        "terseLabel": "Other Commitments [Line Items]"
       }
      }
     },
     "localname": "OtherCommitmentsLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesOtherCommitmentsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_OtherCommitmentsTable": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of information about obligations resulting from other commitments.",
        "label": "Other Commitments [Table]",
        "terseLabel": "Other Commitments [Table]"
       }
      }
     },
     "localname": "OtherCommitmentsTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesOtherCommitmentsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_OtherExpenseMember": {
     "auth_ref": [
      "r242"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Primary financial statement caption encompassing other expense.",
        "label": "Other Expense [Member]",
        "terseLabel": "Other Expense [Member]"
       }
      }
     },
     "localname": "OtherExpenseMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesAdditionalInformationDetails",
      "http://www.codexis.com/role/FairValueMeasurementsScheduleOfFinancialInstrumentsMeasuredAtFairValueOnRecurringBasisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_OtherLiabilitiesNoncurrent": {
     "auth_ref": [
      "r39"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 6.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of liabilities classified as other, due after one year or the normal operating cycle, if longer.",
        "label": "Other Liabilities, Noncurrent",
        "verboseLabel": "Other long-term liabilities"
       }
      }
     },
     "localname": "OtherLiabilitiesNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherNonoperatingIncomeExpense": {
     "auth_ref": [
      "r60"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations": {
       "order": 3.0,
       "parentTag": "us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of income (expense) related to nonoperating activities, classified as other.",
        "label": "Other Nonoperating Income (Expense)",
        "terseLabel": "Other expenses, net"
       }
      }
     },
     "localname": "OtherNonoperatingIncomeExpense",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentOfFinancingAndStockIssuanceCosts": {
     "auth_ref": [
      "r69"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 5.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The total of the cash outflow during the period which has been paid to third parties in connection with debt origination, which will be amortized over the remaining maturity period of the associated long-term debt and the cost incurred directly for the issuance of equity securities.",
        "label": "Payment of Financing and Stock Issuance Costs",
        "negatedTerseLabel": "Costs incurred in connection with private placement"
       }
      }
     },
     "localname": "PaymentOfFinancingAndStockIssuanceCosts",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsForCapitalImprovements": {
     "auth_ref": [
      "r64"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cash outflow for acquisition of or capital improvements to properties held for investment (operating, managed, leased) or for use.",
        "label": "Payments for Capital Improvements",
        "terseLabel": "Payments for capital improvements"
       }
      }
     },
     "localname": "PaymentsForCapitalImprovements",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsForProceedsFromTenantAllowance": {
     "auth_ref": [
      "r63",
      "r65"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Net cash outflow or inflow from monetary allowance granted by the landlord to a tenant to entice tenant to move into landlords building which will enable the tenant to prepare the leased premises for tenants occupancy.",
        "label": "Payments for (Proceeds from) Tenant Allowance",
        "negatedTerseLabel": "Tenant reimbursements"
       }
      }
     },
     "localname": "PaymentsForProceedsFromTenantAllowance",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsOfStockIssuanceCosts": {
     "auth_ref": [
      "r69"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 3.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cash outflow for cost incurred directly with the issuance of an equity security.",
        "label": "Payments of Stock Issuance Costs",
        "negatedLabel": "Costs incurred in connection with public offering",
        "terseLabel": "Issuance costs"
       }
      }
     },
     "localname": "PaymentsOfStockIssuanceCosts",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockTextualDetails",
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows",
      "http://www.codexis.com/role/DescriptionOfBusinessTextualDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation": {
     "auth_ref": [
      "r67"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 8.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash outflow to satisfy grantee's tax withholding obligation for award under share-based payment arrangement.",
        "label": "Payment, Tax Withholding, Share-based Payment Arrangement",
        "negatedTerseLabel": "Taxes paid related to net share settlement of equity awards"
       }
      }
     },
     "localname": "PaymentsRelatedToTaxWithholdingForShareBasedCompensation",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsToAcquirePropertyPlantAndEquipment": {
     "auth_ref": [
      "r64"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 1.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInInvestingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cash outflow associated with the acquisition of long-lived, physical assets that are used in the normal conduct of business to produce goods and services and not intended for resale; includes cash outflows to pay for construction of self-constructed assets.",
        "label": "Payments to Acquire Property, Plant, and Equipment",
        "negatedLabel": "Purchase of property and equipment"
       }
      }
     },
     "localname": "PaymentsToAcquirePropertyPlantAndEquipment",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PerformanceSharesMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Share-based payment arrangement awarded for meeting performance target.",
        "label": "Performance Shares [Member]",
        "terseLabel": "Performance Shares [Member]"
       }
      }
     },
     "localname": "PerformanceSharesMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_PlanNameAxis": {
     "auth_ref": [
      "r217",
      "r226"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by plan name for share-based payment arrangement.",
        "label": "Plan Name [Axis]",
        "terseLabel": "Plan Name [Axis]"
       }
      }
     },
     "localname": "PlanNameAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_PlanNameDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Plan name for share-based payment arrangement.",
        "label": "Plan Name [Domain]",
        "terseLabel": "Plan Name [Domain]"
       }
      }
     },
     "localname": "PlanNameDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_PreferredStockParOrStatedValuePerShare": {
     "auth_ref": [
      "r12"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Face amount or stated value per share of preferred stock nonredeemable or redeemable solely at the option of the issuer.",
        "label": "Preferred Stock, Par or Stated Value Per Share",
        "terseLabel": "Preferred stock, par value (usd per share)"
       }
      }
     },
     "localname": "PreferredStockParOrStatedValuePerShare",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_PreferredStockSharesAuthorized": {
     "auth_ref": [
      "r12"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The maximum number of nonredeemable preferred shares (or preferred stock redeemable solely at the option of the issuer) permitted to be issued by an entity's charter and bylaws.",
        "label": "Preferred Stock, Shares Authorized",
        "terseLabel": "Preferred stock, shares authorized (shares)"
       }
      }
     },
     "localname": "PreferredStockSharesAuthorized",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_PreferredStockSharesIssued": {
     "auth_ref": [
      "r12"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Total number of nonredeemable preferred shares (or preferred stock redeemable solely at the option of the issuer) issued to shareholders (includes related preferred shares that were issued, repurchased, and remain in the treasury). May be all or portion of the number of preferred shares authorized. Excludes preferred shares that are classified as debt.",
        "label": "Preferred Stock, Shares Issued",
        "terseLabel": "Preferred stock, shares issued (shares)"
       }
      }
     },
     "localname": "PreferredStockSharesIssued",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_PreferredStockSharesOutstanding": {
     "auth_ref": [
      "r12"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Aggregate share number for all nonredeemable preferred stock (or preferred stock redeemable solely at the option of the issuer) held by stockholders. Does not include preferred shares that have been repurchased.",
        "label": "Preferred Stock, Shares Outstanding",
        "terseLabel": "Preferred stock, shares outstanding (shares)"
       }
      }
     },
     "localname": "PreferredStockSharesOutstanding",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_PreferredStockValue": {
     "auth_ref": [
      "r12"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 1.0,
       "parentTag": "us-gaap_StockholdersEquity",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Aggregate par or stated value of issued nonredeemable preferred stock (or preferred stock redeemable solely at the option of the issuer). This item includes treasury stock repurchased by the entity. Note: elements for number of nonredeemable preferred shares, par value and other disclosure concepts are in another section within stockholders' equity.",
        "label": "Preferred Stock, Value, Issued",
        "terseLabel": "Preferred stock, $0.0001 par value per share; 5,000 shares authorized; none issued and outstanding"
       }
      }
     },
     "localname": "PreferredStockValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PrepaidExpenseAndOtherAssetsCurrent": {
     "auth_ref": [
      "r4",
      "r25",
      "r26"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 5.0,
       "parentTag": "us-gaap_AssetsCurrent",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of asset related to consideration paid in advance for costs that provide economic benefits in future periods, and amount of other assets that are expected to be realized or consumed within one year or the normal operating cycle, if longer.",
        "label": "Prepaid Expense and Other Assets, Current",
        "verboseLabel": "Prepaid expenses and other current assets"
       }
      }
     },
     "localname": "PrepaidExpenseAndOtherAssetsCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PrimeRateMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Interest rate charged by financial institutions to their most creditworthy borrowers.",
        "label": "Prime Rate [Member]",
        "terseLabel": "Prime Rate [Member]"
       }
      }
     },
     "localname": "PrimeRateMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_PrivatePlacementMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "A private placement is a direct offering of securities to a limited number of sophisticated investors such as insurance companies, pension funds, mezzanine funds, stock funds and trusts.",
        "label": "Private Placement [Member]",
        "terseLabel": "Private Placement [Member]"
       }
      }
     },
     "localname": "PrivatePlacementMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockTextualDetails",
      "http://www.codexis.com/role/DescriptionOfBusinessTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ProceedsFromIssuanceInitialPublicOffering": {
     "auth_ref": [
      "r66"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 2.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cash inflow associated with the amount received from entity's first offering of stock to the public.",
        "label": "Proceeds from Issuance Initial Public Offering",
        "terseLabel": "Proceeds from issuance of common stock in connection with public offering, net of underwriting discounts and commission"
       }
      }
     },
     "localname": "ProceedsFromIssuanceInitialPublicOffering",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProceedsFromIssuanceOfCommonStock": {
     "auth_ref": [
      "r66"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 4.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cash inflow from the additional capital contribution to the entity.",
        "label": "Proceeds from Issuance of Common Stock",
        "terseLabel": "Proceeds from issuance of common stock in connection with private placement"
       }
      }
     },
     "localname": "ProceedsFromIssuanceOfCommonStock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockTextualDetails",
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows",
      "http://www.codexis.com/role/DescriptionOfBusinessTextualDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProceedsFromOtherEquity": {
     "auth_ref": [
      "r66"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 7.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash inflow from the issuance of equity classified as other.",
        "label": "Proceeds from Other Equity",
        "terseLabel": "Recovery of short swing profit"
       }
      }
     },
     "localname": "ProceedsFromOtherEquity",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows",
      "http://www.codexis.com/role/RelatedPartyTransactionsTextualDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProceedsFromSaleMaturityAndCollectionsOfInvestments": {
     "auth_ref": [
      "r63"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 3.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInInvestingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cash inflow associated with the sale, maturity and collection of all investments such as debt, security and so forth during the period.",
        "label": "Proceeds from Sale, Maturity and Collection of Investments",
        "terseLabel": "Proceeds from the sale of investment securities"
       }
      }
     },
     "localname": "ProceedsFromSaleMaturityAndCollectionsOfInvestments",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesAdditionalInformationDetails",
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProceedsFromSaleOfPropertyPlantAndEquipment": {
     "auth_ref": [
      "r62"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 2.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInInvestingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cash inflow from the sale of long-lived, physical assets that are used in the normal conduct of business to produce goods and services and not intended for resale.",
        "label": "Proceeds from Sale of Property, Plant, and Equipment",
        "terseLabel": "Proceeds from disposal of property and equipment"
       }
      }
     },
     "localname": "ProceedsFromSaleOfPropertyPlantAndEquipment",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProceedsFromStockOptionsExercised": {
     "auth_ref": [
      "r66",
      "r227"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 1.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash inflow from exercise of option under share-based payment arrangement.",
        "label": "Proceeds from Stock Options Exercised",
        "terseLabel": "Proceeds from exercises of stock options",
        "verboseLabel": "Proceeds from exercises of stock options"
       }
      }
     },
     "localname": "ProceedsFromStockOptionsExercised",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockTextualDetails",
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProductMember": {
     "auth_ref": [
      "r206"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Article or substance produced by nature, labor or machinery.",
        "label": "Product [Member]",
        "terseLabel": "Product [Member]"
       }
      }
     },
     "localname": "ProductMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ProjectMember": {
     "auth_ref": [
      "r296"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Planned program of work.",
        "label": "Project [Domain]",
        "terseLabel": "Project [Domain]"
       }
      }
     },
     "localname": "ProjectMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails",
      "http://www.codexis.com/role/DescriptionOfBusinessTextualDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationAdditionalInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_PropertyPlantAndEquipmentByTypeAxis": {
     "auth_ref": [
      "r30",
      "r166"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by type of long-lived, physical assets used to produce goods and services and not intended for resale.",
        "label": "Property, Plant and Equipment, Type [Axis]",
        "terseLabel": "Property, Plant and Equipment, Type [Axis]"
       }
      }
     },
     "localname": "PropertyPlantAndEquipmentByTypeAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetsDetailsPropertyAndEquipmentNetDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_PropertyPlantAndEquipmentGross": {
     "auth_ref": [
      "r29",
      "r164"
     ],
     "calculation": {
      "http://www.codexis.com/role/BalanceSheetsDetailsPropertyAndEquipmentNetDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_PropertyPlantAndEquipmentNet",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount before accumulated depreciation, depletion and amortization of physical assets used in the normal conduct of business and not intended for resale. Examples include, but are not limited to, land, buildings, machinery and equipment, office equipment, and furniture and fixtures.",
        "label": "Property, Plant and Equipment, Gross",
        "terseLabel": "Property and equipment"
       }
      }
     },
     "localname": "PropertyPlantAndEquipmentGross",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetsDetailsPropertyAndEquipmentNetDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PropertyPlantAndEquipmentLineItems": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Property, Plant and Equipment [Line Items]",
        "terseLabel": "Property, Plant and Equipment [Line Items]"
       }
      }
     },
     "localname": "PropertyPlantAndEquipmentLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetsDetailsPropertyAndEquipmentNetDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_PropertyPlantAndEquipmentNet": {
     "auth_ref": [
      "r8",
      "r9",
      "r166",
      "r311"
     ],
     "calculation": {
      "http://www.codexis.com/role/BalanceSheetsDetailsPropertyAndEquipmentNetDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      },
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 6.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount after accumulated depreciation, depletion and amortization of physical assets used in the normal conduct of business to produce goods and services and not intended for resale. Examples include, but are not limited to, land, buildings, machinery and equipment, office equipment, and furniture and fixtures.",
        "label": "Property, Plant and Equipment, Net",
        "totalLabel": "Property and equipment, net",
        "verboseLabel": "Property and equipment, net"
       }
      }
     },
     "localname": "PropertyPlantAndEquipmentNet",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetsDetailsPropertyAndEquipmentNetDetails",
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PropertyPlantAndEquipmentTextBlock": {
     "auth_ref": [
      "r8",
      "r166"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of physical assets used in the normal conduct of business and not intended for resale. Includes, but is not limited to, balances by class of assets, depreciation and depletion expense and method used, including composite depreciation, and accumulated deprecation.",
        "label": "Property, Plant and Equipment [Table Text Block]",
        "terseLabel": "Schedule of property and equipment, net"
       }
      }
     },
     "localname": "PropertyPlantAndEquipmentTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetsDetailsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_PropertyPlantAndEquipmentTypeDomain": {
     "auth_ref": [
      "r8",
      "r164"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Listing of long-lived, physical assets that are used in the normal conduct of business to produce goods and services and not intended for resale. Examples include land, buildings, machinery and equipment, and other types of furniture and equipment including, but not limited to, office equipment, furniture and fixtures, and computer equipment and software.",
        "label": "Property, Plant and Equipment, Type [Domain]",
        "terseLabel": "Property, Plant and Equipment, Type [Domain]"
       }
      }
     },
     "localname": "PropertyPlantAndEquipmentTypeDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetsDetailsPropertyAndEquipmentNetDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ReconciliationOfRevenueFromSegmentsToConsolidatedTextBlock": {
     "auth_ref": [
      "r127",
      "r129"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of all significant reconciling items in the reconciliation of total revenues from reportable segments to the entity's consolidated revenues.",
        "label": "Reconciliation of Revenue from Segments to Consolidated [Table Text Block]",
        "verboseLabel": "Schedule of revenues by geographical area"
       }
      }
     },
     "localname": "ReconciliationOfRevenueFromSegmentsToConsolidatedTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_RelatedPartyTransactionDueFromToRelatedPartyAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Related Party Transaction, Due from (to) Related Party [Abstract]"
       }
      }
     },
     "localname": "RelatedPartyTransactionDueFromToRelatedPartyAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_RelatedPartyTransactionsDisclosureTextBlock": {
     "auth_ref": [
      "r289"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for related party transactions. Examples of related party transactions include transactions between (a) a parent company and its subsidiary; (b) subsidiaries of a common parent; (c) and entity and its principal owners; and (d) affiliates.",
        "label": "Related Party Transactions Disclosure [Text Block]",
        "verboseLabel": "Related Party Transactions"
       }
      }
     },
     "localname": "RelatedPartyTransactionsDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/RelatedPartyTransactions"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_RepaymentsOfLongTermCapitalLeaseObligations": {
     "auth_ref": [
      "r68"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 6.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cash outflow for the obligation for a lease meeting the criteria for capitalization (with maturities exceeding one year or beyond the operating cycle of the entity, if longer).",
        "label": "Repayments of Long-term Capital Lease Obligations",
        "negatedTerseLabel": "Payments of lease obligations - Finance leases"
       }
      }
     },
     "localname": "RepaymentsOfLongTermCapitalLeaseObligations",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ResearchAndDevelopmentAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Research and Development [Abstract]"
       }
      }
     },
     "localname": "ResearchAndDevelopmentAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_ResearchAndDevelopmentArrangementContractToPerformForOthersByTypeAxis": {
     "auth_ref": [
      "r234",
      "r235"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by form of arrangement related to research and development.",
        "label": "Research and Development Arrangement, Contract to Perform for Others, Type [Axis]",
        "terseLabel": "Research and Development Arrangement, Contract to Perform for Others, Type [Axis]"
       }
      }
     },
     "localname": "ResearchAndDevelopmentArrangementContractToPerformForOthersByTypeAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ResearchAndDevelopmentArrangementContractToPerformForOthersCompensationEarned": {
     "auth_ref": [
      "r233",
      "r235"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The amount of compensation earned (contract income) under a research and development arrangement accounted for as a contract to perform research and development for others.",
        "label": "Research and Development Arrangement, Contract to Perform for Others, Compensation Earned",
        "terseLabel": "Research and development revenue"
       }
      }
     },
     "localname": "ResearchAndDevelopmentArrangementContractToPerformForOthersCompensationEarned",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ResearchAndDevelopmentArrangementContractToPerformForOthersTypeDomain": {
     "auth_ref": [
      "r234",
      "r235"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Listing of significant agreements under research and development arrangements accounted for as a contract to perform research and development for others.",
        "label": "Research and Development Arrangement, Contract to Perform for Others, Type [Domain]",
        "terseLabel": "Research and Development Arrangement, Contract to Perform for Others, Type [Domain]"
       }
      }
     },
     "localname": "ResearchAndDevelopmentArrangementContractToPerformForOthersTypeDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ResearchAndDevelopmentExpense": {
     "auth_ref": [
      "r232",
      "r333"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations": {
       "order": 2.0,
       "parentTag": "us-gaap_OperatingExpenses",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The aggregate costs incurred (1) in a planned search or critical investigation aimed at discovery of new knowledge with the hope that such knowledge will be useful in developing a new product or service, a new process or technique, or in bringing about a significant improvement to an existing product or process; or (2) to translate research findings or other knowledge into a plan or design for a new product or process or for a significant improvement to an existing product or process whether intended for sale or the entity's use, during the reporting period charged to research and development projects, including the costs of developing computer software up to the point in time of achieving technological feasibility, and costs allocated in accounting for a business combination to in-process projects deemed to have no alternative future use.",
        "label": "Research and Development Expense",
        "verboseLabel": "Research and development"
       }
      }
     },
     "localname": "ResearchAndDevelopmentExpense",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ResearchAndDevelopmentExpenseMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Primary financial statement caption in which the reported facts about research and development expense have been included.",
        "label": "Research and Development Expense [Member]",
        "verboseLabel": "Research and development [Member]"
       }
      }
     },
     "localname": "ResearchAndDevelopmentExpenseMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationStockBasedCompensationExpenseDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_RestrictedCashAndCashEquivalents": {
     "auth_ref": [
      "r7",
      "r78",
      "r83",
      "r297",
      "r307"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 2.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      },
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 2.0,
       "parentTag": "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash and cash equivalents restricted as to withdrawal or usage. Cash includes, but is not limited to, currency on hand, demand deposits with banks or financial institutions, and other accounts with general characteristics of demand deposits. Cash equivalents include, but are not limited to, short-term, highly liquid investments that are both readily convertible to known amounts of cash and so near their maturity that they present insignificant risk of changes in value because of changes in interest rates.",
        "label": "Restricted Cash and Cash Equivalents",
        "terseLabel": "Restricted cash included in non-current assets",
        "verboseLabel": "Restricted cash"
       }
      }
     },
     "localname": "RestrictedCashAndCashEquivalents",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets",
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RestrictedCashAndCashEquivalentsCashAndCashEquivalentsAxis": {
     "auth_ref": [
      "r27"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by category of cash or cash equivalent items which are restricted as to withdrawal or usage.",
        "label": "Restricted Cash and Cash Equivalents [Axis]",
        "terseLabel": "Restricted Cash and Cash Equivalents [Axis]"
       }
      }
     },
     "localname": "RestrictedCashAndCashEquivalentsCashAndCashEquivalentsAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_RestrictedCashAndCashEquivalentsCashAndCashEquivalentsMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Type of cash and cash equivalent. Cash is currency on hand as well as demand deposits with banks or financial institutions. Includes other kinds of accounts that have the general characteristics of demand deposits. Also includes short-term, highly liquid investments that are both readily convertible to known amounts of cash and so near their maturity that they present insignificant risk of changes in value because of changes in interest rates.",
        "label": "Cash and Cash Equivalents [Domain]",
        "terseLabel": "Cash and Cash Equivalents [Domain]"
       }
      }
     },
     "localname": "RestrictedCashAndCashEquivalentsCashAndCashEquivalentsMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesAdditionalInformationDetails",
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesComponentsOfCashEquivalentsAndMarketableSecuritiesDetails",
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails",
      "http://www.codexis.com/role/FairValueMeasurementsScheduleOfFinancialInstrumentsMeasuredAtFairValueOnRecurringBasisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_RestrictedCashAndInvestmentsNoncurrent": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The noncurrent cash, cash equivalents and investments that is restricted as to withdrawal or usage. Restrictions may include legally restricted deposits held as compensating balances against borrowing arrangements, contracts entered into with others, or entity statements of intention with regard to particular deposits classified as long-term; that is not expected to be released from such existing restrictions within one year of the balance sheet date or operating cycle, whichever is longer. Excludes compensating balance arrangements that are not agreements which legally restrict the use of cash amounts shown on the balance sheet. Includes noncurrent cash equivalents and investments that are similarly restricted as to withdrawal, usage or disposal.",
        "label": "Restricted Cash and Investments, Noncurrent",
        "terseLabel": "Non-current restricted cash"
       }
      }
     },
     "localname": "RestrictedCashAndInvestmentsNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RestrictedStockUnitsRSUMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Share instrument which is convertible to stock or an equivalent amount of cash, after a specified period of time or when specified performance conditions are met.",
        "label": "Restricted Stock Units (RSUs) [Member]",
        "terseLabel": "Restricted Stock Units (RSUs) [Member]"
       }
      }
     },
     "localname": "RestrictedStockUnitsRSUMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_RetainedEarningsAccumulatedDeficit": {
     "auth_ref": [
      "r17",
      "r189",
      "r308"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 4.0,
       "parentTag": "us-gaap_StockholdersEquity",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cumulative amount of the reporting entity's undistributed earnings or deficit.",
        "label": "Retained Earnings (Accumulated Deficit)",
        "verboseLabel": "Accumulated deficit"
       }
      }
     },
     "localname": "RetainedEarningsAccumulatedDeficit",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RetainedEarningsMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cumulative amount of the reporting entity's undistributed earnings or deficit.",
        "label": "Retained Earnings [Member]",
        "terseLabel": "Accumulated Deficit [Member]"
       }
      }
     },
     "localname": "RetainedEarningsMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquity"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_RevenueFromContractWithCustomerAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Revenue from Contract with Customer [Abstract]"
       }
      }
     },
     "localname": "RevenueFromContractWithCustomerAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax": {
     "auth_ref": [
      "r201",
      "r203"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations": {
       "order": 2.0,
       "parentTag": "us-gaap_OperatingIncomeLoss",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount, excluding tax collected from customer, of revenue from satisfaction of performance obligation by transferring promised good or service to customer. Tax collected from customer is tax assessed by governmental authority that is both imposed on and concurrent with specific revenue-producing transaction, including, but not limited to, sales, use, value added and excise.",
        "label": "Revenue from Contract with Customer, Excluding Assessed Tax",
        "terseLabel": "Total revenues",
        "verboseLabel": "Total revenues"
       }
      }
     },
     "localname": "RevenueFromContractWithCustomerExcludingAssessedTax",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails",
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations",
      "http://www.codexis.com/role/RevenueRecognitionDisaggregationOfRevenueDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationRevenuesByGeographicAreaDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RevenueFromContractWithCustomerTextBlock": {
     "auth_ref": [
      "r210"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure of revenue from contract with customer to transfer good or service and to transfer nonfinancial asset. Includes, but is not limited to, disaggregation of revenue, credit loss recognized from contract with customer, judgment and change in judgment related to contract with customer, and asset recognized from cost incurred to obtain or fulfill contract with customer. Excludes insurance and lease contracts.",
        "label": "Revenue from Contract with Customer [Text Block]",
        "terseLabel": "Revenue Recognition"
       }
      }
     },
     "localname": "RevenueFromContractWithCustomerTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognition"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_RevenueFromRelatedParties": {
     "auth_ref": [
      "r56",
      "r322"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of revenue, fees and commissions earned from transactions between (a) a parent company and its subsidiaries; (b) subsidiaries of a common parent; (c) an entity and trusts for the benefit of employees, for example, but not limited to, pension and profit-sharing trusts that are managed by or under the trusteeship of the entity's management; (d) an entity and its principal, owners, management, or members of their immediate families; and (e) affiliates.",
        "label": "Revenue from Related Parties",
        "terseLabel": "Revenue from related parties"
       }
      }
     },
     "localname": "RevenueFromRelatedParties",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/RelatedPartyTransactionsTextualDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RevenueInitialApplicationPeriodCumulativeEffectTransitionLineItems": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Revenue, Initial Application Period Cumulative Effect Transition [Line Items]",
        "terseLabel": "Revenue, Initial Application Period Cumulative Effect Transition [Line Items]"
       }
      }
     },
     "localname": "RevenueInitialApplicationPeriodCumulativeEffectTransitionLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionPerformanceObligationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_RevenueInitialApplicationPeriodCumulativeEffectTransitionTable": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of information when using transition method for cumulative effect in initial period of application for revenue from contract with customer.",
        "label": "Revenue, Initial Application Period Cumulative Effect Transition [Table]",
        "terseLabel": "Revenue, Initial Application Period Cumulative Effect Transition [Table]"
       }
      }
     },
     "localname": "RevenueInitialApplicationPeriodCumulativeEffectTransitionTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionPerformanceObligationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_RevenueRemainingPerformanceObligation": {
     "auth_ref": [
      "r199"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of transaction price allocated to performance obligation that has not been recognized as revenue.",
        "label": "Revenue, Remaining Performance Obligation, Amount",
        "terseLabel": "Performance obligation"
       }
      }
     },
     "localname": "RevenueRemainingPerformanceObligation",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionPerformanceObligationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionPeriod1": {
     "auth_ref": [
      "r200"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Period in which remaining performance obligation is expected to be recognized as revenue, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents reported fact of one year, five months, and thirteen days.",
        "label": "Revenue, Remaining Performance Obligation, Expected Timing of Satisfaction, Period",
        "terseLabel": "Expected timing of satisfaction, period"
       }
      }
     },
     "localname": "RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionPeriod1",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionPerformanceObligationDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionStartDateAxis": {
     "auth_ref": [
      "r200"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Start date of time band for expected timing of satisfaction of remaining performance obligation, in CCYY-MM-DD format.",
        "label": "Revenue, Remaining Performance Obligation, Expected Timing of Satisfaction, Start Date [Axis]",
        "terseLabel": "Revenue, Remaining Performance Obligation, Expected Timing of Satisfaction, Start Date [Axis]"
       }
      }
     },
     "localname": "RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionStartDateAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionPerformanceObligationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionTableTextBlock": {
     "auth_ref": [
      "r200"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of expected timing for satisfying remaining performance obligation.",
        "label": "Revenue, Remaining Performance Obligation, Expected Timing of Satisfaction [Table Text Block]",
        "terseLabel": "Performance obligation, expected timing of satisfaction"
       }
      }
     },
     "localname": "RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_RevenuesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Revenues [Abstract]",
        "verboseLabel": "Revenues:"
       }
      }
     },
     "localname": "RevenuesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_RevolvingCreditFacilityMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Arrangement in which loan proceeds can continuously be obtained following repayments, but the total amount borrowed cannot exceed a specified maximum amount.",
        "label": "Revolving Credit Facility [Member]",
        "terseLabel": "Revolving Credit Facility [Member]"
       }
      }
     },
     "localname": "RevolvingCreditFacilityMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_RoyaltyMember": {
     "auth_ref": [
      "r206"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Money for usage-based right to asset.",
        "label": "Royalty [Member]",
        "terseLabel": "Royalty [Member]"
       }
      }
     },
     "localname": "RoyaltyMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_SaleOfStockNameOfTransactionDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Sale of the entity's stock, including, but not limited to, initial public offering (IPO) and private placement.",
        "label": "Sale of Stock [Domain]",
        "terseLabel": "Sale of Stock [Domain]"
       }
      }
     },
     "localname": "SaleOfStockNameOfTransactionDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockTextualDetails",
      "http://www.codexis.com/role/DescriptionOfBusinessTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_SaleOfStockNumberOfSharesIssuedInTransaction": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The number of shares issued or sold by the subsidiary or equity method investee per stock transaction.",
        "label": "Sale of Stock, Number of Shares Issued in Transaction",
        "verboseLabel": "Shares issued (in shares)"
       }
      }
     },
     "localname": "SaleOfStockNumberOfSharesIssuedInTransaction",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockTextualDetails",
      "http://www.codexis.com/role/DescriptionOfBusinessTextualDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_SaleOfStockPricePerShare": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Per share amount received by subsidiary or equity investee for each share of common stock issued or sold in the stock transaction.",
        "label": "Sale of Stock, Price Per Share",
        "terseLabel": "Price per share (in dollars per share)"
       }
      }
     },
     "localname": "SaleOfStockPricePerShare",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockTextualDetails",
      "http://www.codexis.com/role/DescriptionOfBusinessTextualDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_SalesMember": {
     "auth_ref": [
      "r242"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Primary financial statement caption encompassing revenue from sale of goods and services rendered in the normal course of business.",
        "label": "Sales [Member]",
        "terseLabel": "Sales [Member]"
       }
      }
     },
     "localname": "SalesMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ScheduleOfAccruedLiabilitiesTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of the components of accrued liabilities.",
        "label": "Schedule of Accrued Liabilities [Table Text Block]",
        "terseLabel": "Schedule of accrued liabilities"
       }
      }
     },
     "localname": "ScheduleOfAccruedLiabilitiesTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetsDetailsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable": {
     "auth_ref": [
      "r100"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Schedule for securities (including those issuable pursuant to contingent stock agreements) that could potentially dilute basic earnings per share (EPS) in the future that were not included in the computation of diluted EPS because to do so would increase EPS amounts or decrease loss per share amounts for the period presented, by Antidilutive Securities.",
        "label": "Schedule of Antidilutive Securities Excluded from Computation of Earnings Per Share [Table]",
        "terseLabel": "Schedule of Antidilutive Securities Excluded from Computation of Earnings Per Share [Table]"
       }
      }
     },
     "localname": "ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/NetIncomeLossPerShareAntiDilutiveSecuritiesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTextBlock": {
     "auth_ref": [
      "r100"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of securities (including those issuable pursuant to contingent stock agreements) that could potentially dilute basic earnings per share (EPS) in the future that were not included in the computation of diluted EPS because to do so would increase EPS amounts or decrease loss per share amounts for the period presented, by antidilutive securities.",
        "label": "Schedule of Antidilutive Securities Excluded from Computation of Earnings Per Share [Table Text Block]",
        "verboseLabel": "Securities not included in the net loss per common share calculations"
       }
      }
     },
     "localname": "ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/NetIncomeLossPerShareTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfCashAndCashEquivalentsTable": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Schedule of cash and cash equivalent balances. This table excludes restricted cash balances.",
        "label": "Schedule of Cash and Cash Equivalents [Table]",
        "terseLabel": "Schedule of Cash and Cash Equivalents [Table]"
       }
      }
     },
     "localname": "ScheduleOfCashAndCashEquivalentsTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesAdditionalInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfCollaborativeArrangementsAndNoncollaborativeArrangementTransactionsTable": {
     "auth_ref": [
      "r239"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of information about collaborative arrangement and arrangement other than collaborative applicable to revenue-generating activity or operations.",
        "label": "Collaborative Arrangement and Arrangement Other than Collaborative [Table]",
        "terseLabel": "Collaborative Arrangement and Arrangement Other than Collaborative [Table]"
       }
      }
     },
     "localname": "ScheduleOfCollaborativeArrangementsAndNoncollaborativeArrangementTransactionsTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails",
      "http://www.codexis.com/role/DescriptionOfBusinessTextualDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfEarningsPerShareBasicAndDilutedTableTextBlock": {
     "auth_ref": [
      "r101"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of an entity's basic and diluted earnings per share calculations, including a reconciliation of numerators and denominators of the basic and diluted per-share computations for income from continuing operations.",
        "label": "Schedule of Earnings Per Share, Basic and Diluted [Table Text Block]",
        "terseLabel": "Schedule of earnings (loss) per share, basic and diluted"
       }
      }
     },
     "localname": "ScheduleOfEarningsPerShareBasicAndDilutedTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/NetIncomeLossPerShareTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTable": {
     "auth_ref": [
      "r216",
      "r224",
      "r228"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of information about amount recognized for award under share-based payment arrangement. Includes, but is not limited to, amount expensed in statement of income or comprehensive income, amount capitalized in statement of financial position, and corresponding reporting line item in financial statements.",
        "label": "Share-based Payment Arrangement, Expensed and Capitalized, Amount [Table]",
        "terseLabel": "Share-based Payment Arrangement, Expensed and Capitalized, Amount [Table]"
       }
      }
     },
     "localname": "ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationStockBasedCompensationExpenseDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTextBlock": {
     "auth_ref": [
      "r216",
      "r224",
      "r228"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of allocation of amount expensed and capitalized for award under share-based payment arrangement to statement of income or comprehensive income and statement of financial position. Includes, but is not limited to, corresponding line item in financial statement.",
        "label": "Share-based Payment Arrangement, Expensed and Capitalized, Amount [Table Text Block]",
        "verboseLabel": "Schedule of stock-based compensation expense"
       }
      }
     },
     "localname": "ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfEntityWideDisclosureOnGeographicAreasLongLivedAssetsInIndividualForeignCountriesByCountryTextBlock": {
     "auth_ref": [
      "r133"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of the names of foreign countries in which material long-lived assets other than financial instruments, long-term customer relationships of a financial institution, mortgage and other servicing rights, deferred policy acquisition costs, and deferred tax assets are located, and amount of such long-lived assets located in that country or foreign geographic area.",
        "label": "Schedule of Disclosure on Geographic Areas, Long-Lived Assets in Individual Foreign Countries by Country [Table Text Block]",
        "verboseLabel": "Schedule of long-lived assets by geographical area"
       }
      }
     },
     "localname": "ScheduleOfEntityWideDisclosureOnGeographicAreasLongLivedAssetsInIndividualForeignCountriesByCountryTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfFutureMinimumLeasePaymentsForCapitalLeasesTableTextBlock": {
     "auth_ref": [
      "r264"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of future minimum lease payments as of the date of the latest balance sheet presented, in aggregate and for each of the five years succeeding fiscal years, with separate deductions from the total for the amount representing executor costs, including any profit thereon, included in the minimum lease payments and for the amount of the imputed interest necessary to reduce the net minimum lease payments to present value.",
        "label": "Schedule of Future Minimum Lease Payments for Capital Leases [Table Text Block]",
        "terseLabel": "Schedule of future capital lease payments"
       }
      }
     },
     "localname": "ScheduleOfFutureMinimumLeasePaymentsForCapitalLeasesTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfFutureMinimumRentalPaymentsForOperatingLeasesTableTextBlock": {
     "auth_ref": [
      "r260"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of future minimum payments required in the aggregate and for each of the five succeeding fiscal years for operating leases having initial or remaining noncancelable lease terms in excess of one year and the total minimum rentals to be received in the future under noncancelable subleases as of the balance sheet date.",
        "label": "Schedule of Future Minimum Rental Payments for Operating Leases [Table Text Block]",
        "terseLabel": "Schedule of future operating lease payments"
       }
      }
     },
     "localname": "ScheduleOfFutureMinimumRentalPaymentsForOperatingLeasesTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfIntangibleAssetsAndGoodwillTableTextBlock": {
     "auth_ref": [
      "r162"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of goodwill and intangible assets, which may be broken down by segment or major class.",
        "label": "Schedule of Intangible Assets and Goodwill [Table Text Block]",
        "terseLabel": "Schedule of intangible assets and goodwill"
       }
      }
     },
     "localname": "ScheduleOfIntangibleAssetsAndGoodwillTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfInventoryCurrentTableTextBlock": {
     "auth_ref": [
      "r6",
      "r22",
      "r23",
      "r24"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of the carrying amount as of the balance sheet date of merchandise, goods, commodities, or supplies held for future sale or to be used in manufacturing, servicing or production process.",
        "label": "Schedule of Inventory, Current [Table Text Block]",
        "verboseLabel": "Schedule of inventory components"
       }
      }
     },
     "localname": "ScheduleOfInventoryCurrentTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetsDetailsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfNewAccountingPronouncementsAndChangesInAccountingPrinciplesTextBlock": {
     "auth_ref": [
      "r91",
      "r93",
      "r104",
      "r105",
      "r106"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of changes in accounting principles, including adoption of new accounting pronouncements, that describes the new methods, amount and effects on financial statement line items.",
        "label": "Schedule of New Accounting Pronouncements and Changes in Accounting Principles [Table Text Block]",
        "terseLabel": "Schedule of new accounting pronouncements"
       }
      }
     },
     "localname": "ScheduleOfNewAccountingPronouncementsAndChangesInAccountingPrinciplesTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfPropertyPlantAndEquipmentTable": {
     "auth_ref": [
      "r30",
      "r166"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of information about physical assets used in the normal conduct of business and not intended for resale. Includes, but is not limited to, balances by class of assets, depreciation and depletion expense and method used, including composite depreciation, and accumulated deprecation.",
        "label": "Property, Plant and Equipment [Table]",
        "terseLabel": "Schedule of Property, Plant and Equipment [Table]"
       }
      }
     },
     "localname": "ScheduleOfPropertyPlantAndEquipmentTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetsDetailsPropertyAndEquipmentNetDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable": {
     "auth_ref": [
      "r121",
      "r125",
      "r126",
      "r128",
      "r162"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "A table disclosing the profit or loss and total assets for each reportable segment of the entity. An entity discloses certain information on each reportable segment if the amounts (a) are included in the measure of segment profit or loss reviewed by the chief operating decision maker or (b) are otherwise regularly provided to the chief operating decision maker, even if not included in that measure of segment profit or loss.",
        "label": "Schedule of Segment Reporting Information, by Segment [Table]",
        "terseLabel": "Schedule of Segment Reporting Information, by Segment [Table]"
       }
      }
     },
     "localname": "ScheduleOfSegmentReportingInformationBySegmentTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationAdditionalInformationDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationGoodwillDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationLongLivedAssetsByGeographicAreaDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationRevenuesByGeographicAreaDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfSegmentReportingInformationBySegmentTextBlock": {
     "auth_ref": [
      "r121",
      "r125",
      "r126",
      "r128",
      "r162"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of the profit or loss and total assets for each reportable segment. An entity discloses certain information on each reportable segment if the amounts (a) are included in the measure of segment profit or loss reviewed by the chief operating decision maker or (b) are otherwise regularly provided to the chief operating decision maker, even if not included in that measure of segment profit or loss.",
        "label": "Schedule of Segment Reporting Information, by Segment [Table Text Block]",
        "terseLabel": "Schedule of segment reporting"
       }
      }
     },
     "localname": "ScheduleOfSegmentReportingInformationBySegmentTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable": {
     "auth_ref": [
      "r217",
      "r226"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of information about share-based payment arrangement.",
        "label": "Schedule of Share-based Compensation Arrangements by Share-based Payment Award [Table]",
        "terseLabel": "Schedule of Share-based Compensation Arrangements by Share-based Payment Award [Table]"
       }
      }
     },
     "localname": "ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfSharebasedCompensationRestrictedStockAndRestrictedStockUnitsActivityTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of the number and weighted-average grant date fair value for restricted stock and restricted stock units that were outstanding at the beginning and end of the year, and the number of restricted stock and restricted stock units that were granted, vested, or forfeited during the year.",
        "label": "Share-based Payment Arrangement, Restricted Stock and Restricted Stock Unit, Activity [Table Text Block]",
        "terseLabel": "Schedule of stock-based compensation expense by security types"
       }
      }
     },
     "localname": "ScheduleOfSharebasedCompensationRestrictedStockAndRestrictedStockUnitsActivityTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_SchedulesOfConcentrationOfRiskByRiskFactorTextBlock": {
     "auth_ref": [
      "r112",
      "r114",
      "r115",
      "r116",
      "r249",
      "r251"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of the nature of a concentration, a benchmark to which it is compared, and the percentage that the risk is to the benchmark.",
        "label": "Schedules of Concentration of Risk, by Risk Factor [Table Text Block]",
        "terseLabel": "Schedule of customers that contributed 10% or more of total accounts receivable"
       }
      }
     },
     "localname": "SchedulesOfConcentrationOfRiskByRiskFactorTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_SegmentDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Components of an entity that engage in business activities from which they may earn revenue and incur expenses, including transactions with other components of the same entity.",
        "label": "Segments [Domain]",
        "terseLabel": "Segments [Domain]"
       }
      }
     },
     "localname": "SegmentDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionDisaggregationOfRevenueDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationGoodwillDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_SegmentReportingAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Segment Reporting [Abstract]"
       }
      }
     },
     "localname": "SegmentReportingAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_SegmentReportingDisclosureTextBlock": {
     "auth_ref": [
      "r136"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for reporting segments including data and tables. Reportable segments include those that meet any of the following quantitative thresholds a) it's reported revenue, including sales to external customers and intersegment sales or transfers is 10 percent or more of the combined revenue, internal and external, of all operating segments b) the absolute amount of its reported profit or loss is 10 percent or more of the greater, in absolute amount of 1) the combined reported profit of all operating segments that did not report a loss or 2) the combined reported loss of all operating segments that did report a loss c) its assets are 10 percent or more of the combined assets of all operating segments.",
        "label": "Segment Reporting Disclosure [Text Block]",
        "verboseLabel": "Segment, Geographical and Other Revenue Information"
       }
      }
     },
     "localname": "SegmentReportingDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformation"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_SegmentReportingInformationLineItems": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Segment Reporting Information [Line Items]",
        "terseLabel": "Segment Reporting Information [Line Items]"
       }
      }
     },
     "localname": "SegmentReportingInformationLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationAdditionalInformationDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationGoodwillDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationLongLivedAssetsByGeographicAreaDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationRevenuesByGeographicAreaDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_SegmentReportingPolicyPolicyTextBlock": {
     "auth_ref": [
      "r84"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of accounting policy for segment reporting.",
        "label": "Segment Reporting, Policy [Policy Text Block]",
        "terseLabel": "Segment Reporting"
       }
      }
     },
     "localname": "SegmentReportingPolicyPolicyTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BasisOfPresentationAndSummaryOfSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_SellingGeneralAndAdministrativeExpense": {
     "auth_ref": [
      "r58",
      "r158"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations": {
       "order": 3.0,
       "parentTag": "us-gaap_OperatingExpenses",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The aggregate total costs related to selling a firm's product and services, as well as all other general and administrative expenses. Direct selling expenses (for example, credit, warranty, and advertising) are expenses that can be directly linked to the sale of specific products. Indirect selling expenses are expenses that cannot be directly linked to the sale of specific products, for example telephone expenses, Internet, and postal charges. General and administrative expenses include salaries of non-sales personnel, rent, utilities, communication, etc.",
        "label": "Selling, General and Administrative Expense",
        "terseLabel": "Selling, general and administrative"
       }
      }
     },
     "localname": "SellingGeneralAndAdministrativeExpense",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_SellingGeneralAndAdministrativeExpensesMember": {
     "auth_ref": [
      "r61"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Primary financial statement caption encompassing selling, general and administrative expense.",
        "label": "Selling, General and Administrative Expenses [Member]",
        "terseLabel": "Selling, General and Administrative Expenses [Member]"
       }
      }
     },
     "localname": "SellingGeneralAndAdministrativeExpensesMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationStockBasedCompensationExpenseDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ShareBasedCompensation": {
     "auth_ref": [
      "r75"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 5.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of noncash expense for share-based payment arrangement.",
        "label": "Share-based Payment Arrangement, Noncash Expense",
        "verboseLabel": "Stock-based compensation"
       }
      }
     },
     "localname": "ShareBasedCompensation",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationSegmentReportingDetails",
      "http://www.codexis.com/role/StockBasedCompensationStockBasedCompensationExpenseDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1": {
     "auth_ref": [
      "r218"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Period over which grantee's right to exercise award under share-based payment arrangement is no longer contingent on satisfaction of service or performance condition, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents reported fact of one year, five months, and thirteen days. Includes, but is not limited to, combination of market, performance or service condition.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Award Vesting Period",
        "terseLabel": "Award vesting period"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award [Line Items]",
        "terseLabel": "Share-based Compensation Arrangement by Share-based Payment Award [Line Items]",
        "verboseLabel": "Schedule of stock-based compensation expense"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationStockBasedCompensationExpenseDetails",
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAuthorized": {
     "auth_ref": [
      "r220"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Number of shares authorized for issuance under share-based payment arrangement.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Number of Shares Authorized",
        "terseLabel": "Number of shares authorized (in shares)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAuthorized",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant": {
     "auth_ref": [
      "r226"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The difference between the maximum number of shares (or other type of equity) authorized for issuance under the plan (including the effects of amendments and adjustments), and the sum of: 1) the number of shares (or other type of equity) already issued upon exercise of options or other equity-based awards under the plan; and 2) shares (or other type of equity) reserved for issuance on granting of outstanding awards, net of cancellations and forfeitures, if applicable.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Number of Shares Available for Grant",
        "terseLabel": "Number of shares available for grant (in shares)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain": {
     "auth_ref": [
      "r215",
      "r221"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Award under share-based payment arrangement.",
        "label": "Award Type [Domain]",
        "terseLabel": "Award Type [Domain]"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationStockBasedCompensationExpenseDetails",
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsExercisesInPeriodWeightedAverageExercisePrice": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average price at which option holders acquired shares when converting their stock options into shares.",
        "label": "Share-based Compensation Arrangements by Share-based Payment Award, Options, Exercises in Period, Weighted Average Exercise Price",
        "terseLabel": "Weighted average exercise price of stock options exercised (usd per share)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsExercisesInPeriodWeightedAverageExercisePrice",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockTextualDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_ShareBasedCompensationAwardTrancheOneMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "First portion of award under share-based payment arrangement differentiated by vesting feature, including, but not limited to, performance measure or service period.",
        "label": "Share-based Payment Arrangement, Tranche One [Member]",
        "terseLabel": "Tranche One [Member]"
       }
      }
     },
     "localname": "ShareBasedCompensationAwardTrancheOneMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ShareBasedCompensationAwardTrancheTwoMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Second portion of award under share-based payment arrangement differentiated by vesting feature, including, but not limited to, performance measure or service period.",
        "label": "Share-based Payment Arrangement, Tranche Two [Member]",
        "terseLabel": "Tranche Two [Member]"
       }
      }
     },
     "localname": "ShareBasedCompensationAwardTrancheTwoMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardAwardVestingRightsPercentage": {
     "auth_ref": [
      "r218"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Percentage of vesting of award under share-based payment arrangement.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Award Vesting Rights, Percentage",
        "terseLabel": "Award vesting rights"
       }
      }
     },
     "localname": "SharebasedCompensationArrangementBySharebasedPaymentAwardAwardVestingRightsPercentage",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod": {
     "auth_ref": [
      "r219"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Period from grant date that an equity-based award expires, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents the reported fact of one year, five months, and thirteen days.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Expiration Period",
        "terseLabel": "Expiration period"
       }
      }
     },
     "localname": "SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardPurchasePriceOfCommonStockPercent": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Purchase price of common stock expressed as a percentage of its fair value.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Purchase Price of Common Stock, Percent",
        "terseLabel": "Purchase price of common stock"
       }
      }
     },
     "localname": "SharebasedCompensationArrangementBySharebasedPaymentAwardPurchasePriceOfCommonStockPercent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_SharesOutstanding": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Number of shares issued which are neither cancelled nor held in the treasury.",
        "label": "Shares, Outstanding",
        "periodEndLabel": "Ending balance (shares)",
        "periodStartLabel": "Beginning balance (shares)"
       }
      }
     },
     "localname": "SharesOutstanding",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquity"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_SharesPaidForTaxWithholdingForShareBasedCompensation": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Number of shares used to settle grantee's tax withholding obligation for award under share-based payment arrangement.",
        "label": "Share-based Payment Arrangement, Shares Withheld for Tax Withholding Obligation",
        "negatedTerseLabel": "Taxes paid related to net share settlement of equity awards (in shares)"
       }
      }
     },
     "localname": "SharesPaidForTaxWithholdingForShareBasedCompensation",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquity"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_SignificantAccountingPoliciesTextBlock": {
     "auth_ref": [
      "r89"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for all significant accounting policies of the reporting entity.",
        "label": "Significant Accounting Policies [Text Block]",
        "verboseLabel": "Basis of Presentation and Summary of Significant Accounting Policies"
       }
      }
     },
     "localname": "SignificantAccountingPoliciesTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BasisOfPresentationAndSummaryOfSignificantAccountingPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_StatementBusinessSegmentsAxis": {
     "auth_ref": [
      "r0",
      "r125",
      "r162",
      "r168",
      "r172",
      "r173",
      "r316"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by business segments.",
        "label": "Segments [Axis]",
        "terseLabel": "Segments [Axis]"
       }
      }
     },
     "localname": "StatementBusinessSegmentsAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionDisaggregationOfRevenueDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationGoodwillDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementEquityComponentsAxis": {
     "auth_ref": [
      "r42",
      "r188"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by component of equity.",
        "label": "Equity Components [Axis]",
        "terseLabel": "Equity Components [Axis]"
       }
      }
     },
     "localname": "StatementEquityComponentsAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquity"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementLineItems": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Statement [Line Items]",
        "terseLabel": "Statement [Line Items]"
       }
      }
     },
     "localname": "StatementLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations",
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquity",
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquityParenthetical"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementOfCashFlowsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Statement of Cash Flows [Abstract]"
       }
      }
     },
     "localname": "StatementOfCashFlowsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementOfFinancialPositionAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Statement of Financial Position [Abstract]"
       }
      }
     },
     "localname": "StatementOfFinancialPositionAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementOfStockholdersEquityAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Statement of Stockholders' Equity [Abstract]"
       }
      }
     },
     "localname": "StatementOfStockholdersEquityAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementTable": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Schedule reflecting a Statement of Income, Statement of Cash Flows, Statement of Financial Position, Statement of Shareholders' Equity and Other Comprehensive Income, or other statement as needed.",
        "label": "Statement [Table]",
        "terseLabel": "Statement [Table]"
       }
      }
     },
     "localname": "StatementTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations",
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquity",
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquityParenthetical"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_StockCompensationPlanMember": {
     "auth_ref": [
      "r100"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Share-based payment arrangement in which award of equity shares are granted. Arrangement includes, but is not limited to, grantor incurring liability for product and service based on price of its shares.",
        "label": "Share-based Payment Arrangement [Member]",
        "terseLabel": "Shares of common stock issuable pursuant to equity awards outstanding under the Equity Incentive Plan [Member]"
       }
      }
     },
     "localname": "StockCompensationPlanMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/NetIncomeLossPerShareAntiDilutiveSecuritiesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_StockIssuedDuringPeriodSharesNewIssues": {
     "auth_ref": [
      "r12",
      "r13",
      "r188",
      "r189"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Number of new stock issued during the period.",
        "label": "Stock Issued During Period, Shares, New Issues",
        "terseLabel": "Issuance of common stock, net of issuance costs (in shares)"
       }
      }
     },
     "localname": "StockIssuedDuringPeriodSharesNewIssues",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquity"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_StockIssuedDuringPeriodSharesOther": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Number of shares of stock issued attributable to transactions classified as other.",
        "label": "Stock Issued During Period, Shares, Other",
        "terseLabel": "Release of stock awards (shares)"
       }
      }
     },
     "localname": "StockIssuedDuringPeriodSharesOther",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquity"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_StockIssuedDuringPeriodSharesStockOptionsExercised": {
     "auth_ref": [
      "r12",
      "r13",
      "r188",
      "r189",
      "r222"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Number of share options (or share units) exercised during the current period.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Options, Exercises in Period",
        "terseLabel": "Stock options exercised (shares)",
        "verboseLabel": "Exercise of stock options (shares)"
       }
      }
     },
     "localname": "StockIssuedDuringPeriodSharesStockOptionsExercised",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockTextualDetails",
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquity"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_StockIssuedDuringPeriodValueNewIssues": {
     "auth_ref": [
      "r12",
      "r13",
      "r188",
      "r189"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Equity impact of the value of new stock issued during the period. Includes shares issued in an initial public offering or a secondary public offering.",
        "label": "Stock Issued During Period, Value, New Issues",
        "terseLabel": "Issuance of common stock, net of issuance costs"
       }
      }
     },
     "localname": "StockIssuedDuringPeriodValueNewIssues",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquity"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_StockIssuedDuringPeriodValueStockOptionsExercised": {
     "auth_ref": [
      "r42",
      "r188",
      "r189"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Value of stock issued as a result of the exercise of stock options.",
        "label": "Stock Issued During Period, Value, Stock Options Exercised",
        "verboseLabel": "Exercise of stock options"
       }
      }
     },
     "localname": "StockIssuedDuringPeriodValueStockOptionsExercised",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquity"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_StockTransactionsParentheticalDisclosuresAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Stock Transactions, Parenthetical Disclosures [Abstract]",
        "terseLabel": "Increase (Decrease) in Stockholders' Equity Common Shares"
       }
      }
     },
     "localname": "StockTransactionsParentheticalDisclosuresAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquity"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_StockholdersEquity": {
     "auth_ref": [
      "r13",
      "r18",
      "r19",
      "r140"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 1.0,
       "parentTag": "us-gaap_LiabilitiesAndStockholdersEquity",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Total of all stockholders' equity (deficit) items, net of receivables from officers, directors, owners, and affiliates of the entity which are attributable to the parent. The amount of the economic entity's stockholders' equity attributable to the parent excludes the amount of stockholders' equity which is allocable to that ownership interest in subsidiary equity which is not attributable to the parent (noncontrolling interest, minority interest). This excludes temporary equity and is sometimes called permanent equity.",
        "label": "Stockholders' Equity Attributable to Parent",
        "periodEndLabel": "Ending balance",
        "periodStartLabel": "Beginning balance",
        "totalLabel": "Total stockholders' equity"
       }
      }
     },
     "localname": "StockholdersEquity",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets",
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquity"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_StockholdersEquityAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Stockholders' Equity Attributable to Parent [Abstract]",
        "verboseLabel": "Stockholders' equity:"
       }
      }
     },
     "localname": "StockholdersEquityAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_StockholdersEquityNoteDisclosureTextBlock": {
     "auth_ref": [
      "r190"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for shareholders' equity comprised of portions attributable to the parent entity and noncontrolling interest, including other comprehensive income. Includes, but is not limited to, balances of common stock, preferred stock, additional paid-in capital, other capital and retained earnings, accumulated balance for each classification of other comprehensive income and amount of comprehensive income.",
        "label": "Stockholders' Equity Note Disclosure [Text Block]",
        "terseLabel": "Capital Stock"
       }
      }
     },
     "localname": "StockholdersEquityNoteDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CapitalStock"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_SubleaseIncome": {
     "auth_ref": [
      "r278",
      "r284"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsAndContingenciesLeaseCostDetails": {
       "order": 4.0,
       "parentTag": "us-gaap_LeaseCost",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of sublease income excluding finance and operating lease expense.",
        "label": "Sublease Income",
        "negatedTerseLabel": "Sublease income"
       }
      }
     },
     "localname": "SubleaseIncome",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesLeaseCostDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_SubsidiaryOrEquityMethodInvesteeSaleOfStockBySubsidiaryOrEquityInvesteeTable": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Different names of stock transactions and the different attributes of each transaction.",
        "label": "Subsidiary or Equity Method Investee, Sale of Stock by Subsidiary or Equity Investee [Table]",
        "terseLabel": "Private Placement Common Stock"
       }
      }
     },
     "localname": "SubsidiaryOrEquityMethodInvesteeSaleOfStockBySubsidiaryOrEquityInvesteeTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockTextualDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_SubsidiarySaleOfStockAxis": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by type of sale of the entity's stock.",
        "label": "Sale of Stock [Axis]",
        "terseLabel": "Sale of Stock [Axis]"
       }
      }
     },
     "localname": "SubsidiarySaleOfStockAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockTextualDetails",
      "http://www.codexis.com/role/DescriptionOfBusinessTextualDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_SubsidiarySaleOfStockLineItems": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Subsidiary, Sale of Stock [Line Items]",
        "terseLabel": "Private Placement Common Stock"
       }
      }
     },
     "localname": "SubsidiarySaleOfStockLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockTextualDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_SupplementalCashFlowInformationAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Supplemental Cash Flow Information [Abstract]",
        "terseLabel": "Supplemental disclosure of cash flow information"
       }
      }
     },
     "localname": "SupplementalCashFlowInformationAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_SupplyCommitmentArrangementMember": {
     "auth_ref": [
      "r11",
      "r299",
      "r306"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "This item is intended to be populated, by the entity, with Members identifying each supply commitment about which information required or determined to be disclosed is being provided. If only one such commitment exists, this item may be used to capture such information; if multiple commitments exist, this item is the dimensional default, which will aggregate such information, as appropriate.",
        "label": "Supply Commitment Arrangement [Domain]",
        "terseLabel": "Supply Commitment Arrangement [Domain]"
       }
      }
     },
     "localname": "SupplyCommitmentArrangementMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesOtherCommitmentsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_SupplyCommitmentAxis": {
     "auth_ref": [
      "r11",
      "r299",
      "r306"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by arrangements in which the entity has committed resources to supply goods or services to a customer.",
        "label": "Supply Commitment [Axis]",
        "terseLabel": "Supply Commitment [Axis]"
       }
      }
     },
     "localname": "SupplyCommitmentAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesOtherCommitmentsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_SupplyCommitmentMember": {
     "auth_ref": [
      "r11",
      "r299",
      "r306"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Supply arrangement in which the entity has agreed to commit resources to supply goods or services to a customer. Excludes long-term commitments.",
        "label": "Supply Commitment [Member]",
        "terseLabel": "Supply Commitment [Member]"
       }
      }
     },
     "localname": "SupplyCommitmentMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesOtherCommitmentsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_SupplyCommitmentTableTextBlock": {
     "auth_ref": [
      "r11"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of arrangements in which the entity has committed resources to supply goods or services to a customer. May include identification of the goods or services to be furnished, identity of the purchasing party, pricing, effects on pricing for failing to deliver the [minimum] quantities required to be furnished, cancellation rights, and termination provisions.",
        "label": "Supply Commitment [Table Text Block]",
        "terseLabel": "Schedule of supply and service commitments"
       }
      }
     },
     "localname": "SupplyCommitmentTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain": {
     "auth_ref": [
      "r292"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Instrument or contract that imposes a contractual obligation to deliver cash or another financial instrument or to exchange other financial instruments on potentially unfavorable terms and conveys a contractual right to receive cash or another financial instrument or to exchange other financial instruments on potentially favorable terms.",
        "label": "Financial Instruments [Domain]",
        "terseLabel": "Financial Instruments [Domain]"
       }
      }
     },
     "localname": "TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/FairValueMeasurementsScheduleOfFinancialInstrumentsMeasuredAtFairValueOnRecurringBasisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_TypeOfAdoptionMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Adoption and early adoption of sources of change to generally accepted accounting principles (GAAP) in the United States. The FASB released the FASB Accounting Standards Codification as the authoritative source of literature effective for interim and annual periods ending after September 15, 2009. As part of the Codification process, the FASB issues Accounting Standards Updates to amend the Codification but otherwise the Accounting Standards Updates are not authoritative in their own right. All previous accounting standards (such as FASB Statements of Financial Accounting Standards, FASB Interpretations, FASB Staff Positions, Emerging Issues Task Force Consensuses, other pronouncements of the FASB or other designated bodies, or other forms of GAAP are considered accounting pronouncements) were superseded upon the adoption of the Codification. For an interim period, references to the superseded standards are included to help users transition from the previous accounting hierarchy and will be removed from future versions of this taxonomy.",
        "label": "Type of Adoption [Domain]",
        "terseLabel": "Type of Adoption [Domain]"
       }
      }
     },
     "localname": "TypeOfAdoptionMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BasisOfPresentationAndSummaryOfSignificantAccountingPoliciesTextualDetails",
      "http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesAdditionalInformationDetails",
      "http://www.codexis.com/role/CommitmentsAndContingenciesReconciliationOfRightOfUseAssetsAndLeaseLiabilitiesDetails",
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails",
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfStockholdersEquityParenthetical"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_TypeOfArrangementAxis": {
     "auth_ref": [
      "r239"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by collaborative arrangement and arrangement other than collaborative applicable to revenue-generating activity or operations.",
        "label": "Collaborative Arrangement and Arrangement Other than Collaborative [Axis]",
        "terseLabel": "Collaborative Arrangement and Arrangement Other than Collaborative [Axis]"
       }
      }
     },
     "localname": "TypeOfArrangementAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTextualDetails",
      "http://www.codexis.com/role/DescriptionOfBusinessTextualDetails",
      "http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationAdditionalInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_UnbilledReceivablesCurrent": {
     "auth_ref": [],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets": {
       "order": 3.0,
       "parentTag": "us-gaap_AssetsCurrent",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount received for services rendered and products shipped, but not yet billed, for non-contractual agreements due within one year or the normal operating cycle, if longer.",
        "label": "Unbilled Receivables, Current",
        "periodEndLabel": "September 30, 2019 balance",
        "periodStartLabel": "January 1, 2019 balance",
        "terseLabel": "Unbilled receivables, current"
       }
      }
     },
     "localname": "UnbilledReceivablesCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedBalanceSheets",
      "http://www.codexis.com/role/RevenueRecognitionContractsWithCustomerDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_UnrealizedGainLossOnInvestments": {
     "auth_ref": [
      "r76"
     ],
     "calculation": {
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows": {
       "order": 6.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The net change in the difference between the fair value and the carrying value, or in the comparative fair values, of investments, not including unrealized gains or losses on securities separately or otherwise categorized as trading, available-for-sale, or held-to-maturity, held at each balance sheet date and included in earnings for the period.",
        "label": "Unrealized Gain (Loss) on Investments",
        "negatedTerseLabel": "Loss on investment in equity securities"
       }
      }
     },
     "localname": "UnrealizedGainLossOnInvestments",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_UnrecordedUnconditionalPurchaseObligationBalanceSheetAmount": {
     "auth_ref": [
      "r174"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of the unrecorded obligation to transfer funds in the future for fixed or minimum amounts or quantities of goods or services at fixed or minimum prices (for example, as in take-or-pay contracts or throughput contracts).",
        "label": "Unrecorded Unconditional Purchase Obligation",
        "terseLabel": "Future Minimum Payment"
       }
      }
     },
     "localname": "UnrecordedUnconditionalPurchaseObligationBalanceSheetAmount",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesOtherCommitmentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_UseOfEstimates": {
     "auth_ref": [
      "r108",
      "r109",
      "r110",
      "r111",
      "r117",
      "r118",
      "r119"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of accounting policy for the use of estimates in the preparation of financial statements in conformity with generally accepted accounting principles.",
        "label": "Use of Estimates, Policy [Policy Text Block]",
        "terseLabel": "Use of Estimates"
       }
      }
     },
     "localname": "UseOfEstimates",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/BasisOfPresentationAndSummaryOfSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_VariableRateAxis": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by type of variable rate.",
        "label": "Variable Rate [Axis]",
        "terseLabel": "Variable Rate [Axis]"
       }
      }
     },
     "localname": "VariableRateAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_VariableRateDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Interest rate that fluctuates over time as a result of an underlying benchmark interest rate or index.",
        "label": "Variable Rate [Domain]",
        "terseLabel": "Variable Rate [Domain]"
       }
      }
     },
     "localname": "VariableRateDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_VestingAxis": {
     "auth_ref": [
      "r226"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by vesting schedule of award under share-based payment arrangement.",
        "label": "Vesting [Axis]",
        "terseLabel": "Vesting [Axis]"
       }
      }
     },
     "localname": "VestingAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_VestingDomain": {
     "auth_ref": [
      "r226"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Vesting schedule of award under share-based payment arrangement.",
        "label": "Vesting [Domain]",
        "terseLabel": "Vesting [Domain]"
       }
      }
     },
     "localname": "VestingDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/StockBasedCompensationTextualDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment": {
     "auth_ref": [
      "r99"
     ],
     "calculation": {
      "http://www.codexis.com/role/NetIncomeLossPerShareEarningsPerShareDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding",
       "weight": 1.0
      }
     },
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The sum of dilutive potential common shares or units used in the calculation of the diluted per-share or per-unit computation.",
        "label": "Weighted Average Number Diluted Shares Outstanding Adjustment",
        "terseLabel": "Effect of dilutive shares (shares)"
       }
      }
     },
     "localname": "WeightedAverageNumberDilutedSharesOutstandingAdjustment",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/NetIncomeLossPerShareEarningsPerShareDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding": {
     "auth_ref": [
      "r95",
      "r99"
     ],
     "calculation": {
      "http://www.codexis.com/role/NetIncomeLossPerShareEarningsPerShareDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The average number of shares or units issued and outstanding that are used in calculating diluted EPS or earnings per unit (EPU), determined based on the timing of issuance of shares or units in the period.",
        "label": "Weighted Average Number of Shares Outstanding, Diluted",
        "terseLabel": "Weighted average common stock shares used in computing net income (loss) per share, diluted (shares)",
        "totalLabel": "Weighted average common stock shares used in computing net income (loss) per share, diluted (shares)"
       }
      }
     },
     "localname": "WeightedAverageNumberOfDilutedSharesOutstanding",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations",
      "http://www.codexis.com/role/NetIncomeLossPerShareEarningsPerShareDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_WeightedAverageNumberOfSharesOutstandingBasic": {
     "auth_ref": [
      "r94",
      "r99"
     ],
     "calculation": {
      "http://www.codexis.com/role/NetIncomeLossPerShareEarningsPerShareDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding",
       "weight": 1.0
      }
     },
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Number of [basic] shares or units, after adjustment for contingently issuable shares or units and other shares or units not deemed outstanding, determined by relating the portion of time within a reporting period that common shares or units have been outstanding to the total time in that period.",
        "label": "Weighted Average Number of Shares Outstanding, Basic",
        "terseLabel": "Weighted average common stock shares used in computing net income (loss) per share, basic (shares)"
       }
      }
     },
     "localname": "WeightedAverageNumberOfSharesOutstandingBasic",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations",
      "http://www.codexis.com/role/NetIncomeLossPerShareEarningsPerShareDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_WeightedAverageNumberOfSharesOutstandingDilutedDisclosureItemsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Weighted Average Number of Shares Outstanding Reconciliation [Abstract]",
        "terseLabel": "Denominator:"
       }
      }
     },
     "localname": "WeightedAverageNumberOfSharesOutstandingDilutedDisclosureItemsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.codexis.com/role/NetIncomeLossPerShareEarningsPerShareDetails"
     ],
     "xbrltype": "stringItemType"
    }
   },
   "unitCount": 9
  }
 },
 "std_ref": {
  "r0": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)",
   "Topic": "205",
   "URI": "http://asc.fasb.org/extlink&oid=109222650&loc=d3e1361-107760"
  },
  "r1": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=118951113&loc=d3e6676-107765"
  },
  "r10": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(19))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r100": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=6371337&loc=d3e3550-109257"
  },
  "r101": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=6371337&loc=d3e3550-109257"
  },
  "r102": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "52",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=117327953&loc=d3e4984-109258"
  },
  "r103": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "260",
   "URI": "http://asc.fasb.org/topic&trid=2144383"
  },
  "r104": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "270",
   "URI": "http://asc.fasb.org/extlink&oid=116846552&loc=d3e725-108305"
  },
  "r105": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "270",
   "URI": "http://asc.fasb.org/extlink&oid=116846552&loc=d3e765-108305"
  },
  "r106": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.10-01.(b)(6))",
   "Topic": "270",
   "URI": "http://asc.fasb.org/extlink&oid=27015980&loc=d3e46468-122699"
  },
  "r107": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "275",
   "URI": "http://asc.fasb.org/extlink&oid=99393423&loc=d3e5967-108592"
  },
  "r108": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "275",
   "URI": "http://asc.fasb.org/extlink&oid=99393423&loc=d3e5967-108592"
  },
  "r109": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "275",
   "URI": "http://asc.fasb.org/extlink&oid=99393423&loc=d3e5967-108592"
  },
  "r11": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(25))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r110": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "275",
   "URI": "http://asc.fasb.org/extlink&oid=99393423&loc=d3e6161-108592"
  },
  "r111": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "275",
   "URI": "http://asc.fasb.org/extlink&oid=99393423&loc=d3e6191-108592"
  },
  "r112": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "16",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "275",
   "URI": "http://asc.fasb.org/extlink&oid=99393423&loc=d3e6327-108592"
  },
  "r113": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "18",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "275",
   "URI": "http://asc.fasb.org/extlink&oid=99393423&loc=d3e6351-108592"
  },
  "r114": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "18",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "275",
   "URI": "http://asc.fasb.org/extlink&oid=99393423&loc=d3e6351-108592"
  },
  "r115": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "275",
   "URI": "http://asc.fasb.org/extlink&oid=99393423&loc=d3e6404-108592"
  },
  "r116": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "21",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "275",
   "URI": "http://asc.fasb.org/extlink&oid=99393423&loc=d3e6442-108592"
  },
  "r117": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "275",
   "URI": "http://asc.fasb.org/extlink&oid=99393423&loc=d3e6061-108592"
  },
  "r118": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "275",
   "URI": "http://asc.fasb.org/extlink&oid=99393423&loc=d3e6132-108592"
  },
  "r119": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "275",
   "URI": "http://asc.fasb.org/extlink&oid=99393423&loc=d3e6143-108592"
  },
  "r12": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(28))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r120": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "275",
   "URI": "http://asc.fasb.org/topic&trid=2134479"
  },
  "r121": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "21",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e8721-108599"
  },
  "r122": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e8736-108599"
  },
  "r123": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e8736-108599"
  },
  "r124": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(h)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e8736-108599"
  },
  "r125": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e8736-108599"
  },
  "r126": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "25",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e8813-108599"
  },
  "r127": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "30",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e8906-108599"
  },
  "r128": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "30",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e8906-108599"
  },
  "r129": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "31",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e8924-108599"
  },
  "r13": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(29))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r130": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "32",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e8933-108599"
  },
  "r131": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e8475-108599"
  },
  "r132": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "40",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e9031-108599"
  },
  "r133": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "41",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e9038-108599"
  },
  "r134": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "41",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e9038-108599"
  },
  "r135": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "42",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e9054-108599"
  },
  "r136": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "280",
   "URI": "http://asc.fasb.org/topic&trid=2134510"
  },
  "r137": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "310",
   "URI": "http://asc.fasb.org/extlink&oid=118952595&loc=d3e4428-111522"
  },
  "r138": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "310",
   "URI": "http://asc.fasb.org/extlink&oid=118952595&loc=d3e4531-111522"
  },
  "r139": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "310",
   "URI": "http://asc.fasb.org/extlink&oid=118936363&loc=d3e5074-111524"
  },
  "r14": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(3)(a)(2))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r140": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 4.E)",
   "Topic": "310",
   "URI": "http://asc.fasb.org/extlink&oid=27010918&loc=d3e74512-122707"
  },
  "r141": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "320",
   "URI": "http://asc.fasb.org/extlink&oid=118939692&loc=SL6284393-111563"
  },
  "r142": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "320",
   "URI": "http://asc.fasb.org/topic&trid=2196928"
  },
  "r143": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "321",
   "URI": "http://asc.fasb.org/extlink&oid=116654751&loc=SL75117546-209714"
  },
  "r144": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "321",
   "URI": "http://asc.fasb.org/topic&trid=75115024"
  },
  "r145": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "323",
   "URI": "http://asc.fasb.org/topic&trid=2196965"
  },
  "r146": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "325",
   "URI": "http://asc.fasb.org/topic&trid=2197064"
  },
  "r147": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=118955202&loc=SL82895884-210446"
  },
  "r148": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=119407570&loc=SL82919244-210447"
  },
  "r149": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=119407570&loc=SL82919249-210447"
  },
  "r15": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(3))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r150": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=119407570&loc=SL82919249-210447"
  },
  "r151": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "14",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=119407570&loc=SL82919253-210447"
  },
  "r152": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "16",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=119407570&loc=SL82919258-210447"
  },
  "r153": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=119407570&loc=SL82919230-210447"
  },
  "r154": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=118955579&loc=SL82922888-210455"
  },
  "r155": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=118955579&loc=SL82922895-210455"
  },
  "r156": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=118955579&loc=SL82922900-210455"
  },
  "r157": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "30",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=118942371&loc=SL82922954-210456"
  },
  "r158": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "30",
   "SubTopic": "10",
   "Topic": "330",
   "URI": "http://asc.fasb.org/extlink&oid=68048583&loc=d3e3636-108311"
  },
  "r159": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "35",
   "SubTopic": "10",
   "Topic": "330",
   "URI": "http://asc.fasb.org/extlink&oid=116846819&loc=d3e3927-108312"
  },
  "r16": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(30)(a)(1))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r160": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=99380562&loc=d3e13770-109266"
  },
  "r161": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=77989000&loc=SL49117168-202975"
  },
  "r162": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=108376223&loc=d3e13816-109267"
  },
  "r163": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "360",
   "URI": "http://asc.fasb.org/extlink&oid=6391035&loc=d3e2868-110229"
  },
  "r164": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "360",
   "URI": "http://asc.fasb.org/extlink&oid=6391035&loc=d3e2868-110229"
  },
  "r165": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "360",
   "URI": "http://asc.fasb.org/extlink&oid=6391035&loc=d3e2868-110229"
  },
  "r166": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "360",
   "URI": "http://asc.fasb.org/extlink&oid=6391035&loc=d3e2868-110229"
  },
  "r167": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "360",
   "URI": "http://asc.fasb.org/extlink&oid=109226691&loc=d3e2941-110230"
  },
  "r168": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)",
   "Topic": "360",
   "URI": "http://asc.fasb.org/extlink&oid=109226691&loc=d3e2941-110230"
  },
  "r169": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Topic": "410",
   "URI": "http://asc.fasb.org/extlink&oid=6392676&loc=d3e7480-110848"
  },
  "r17": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(30)(a)(3))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r170": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(c)",
   "Topic": "410",
   "URI": "http://asc.fasb.org/extlink&oid=6392692&loc=d3e7535-110849"
  },
  "r171": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(c)(3)",
   "Topic": "410",
   "URI": "http://asc.fasb.org/extlink&oid=6392692&loc=d3e7535-110849"
  },
  "r172": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "420",
   "URI": "http://asc.fasb.org/extlink&oid=6394359&loc=d3e17939-110869"
  },
  "r173": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 5.P.4(d))",
   "Topic": "420",
   "URI": "http://asc.fasb.org/extlink&oid=115931487&loc=d3e140904-122747"
  },
  "r174": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "440",
   "URI": "http://asc.fasb.org/extlink&oid=77896938&loc=d3e25336-109308"
  },
  "r175": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "440",
   "URI": "http://asc.fasb.org/topic&trid=2144648"
  },
  "r176": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "450",
   "URI": "http://asc.fasb.org/extlink&oid=118942415&loc=d3e14326-108349"
  },
  "r177": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "450",
   "URI": "http://asc.fasb.org/extlink&oid=118942415&loc=d3e14615-108349"
  },
  "r178": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "450",
   "URI": "http://asc.fasb.org/extlink&oid=118942415&loc=d3e14394-108349"
  },
  "r179": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "450",
   "URI": "http://asc.fasb.org/extlink&oid=118942415&loc=d3e14435-108349"
  },
  "r18": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(30))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r180": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "450",
   "URI": "http://asc.fasb.org/extlink&oid=118942415&loc=d3e14453-108349"
  },
  "r181": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "450",
   "URI": "http://asc.fasb.org/extlink&oid=118942415&loc=d3e14472-108349"
  },
  "r182": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "450",
   "URI": "http://asc.fasb.org/extlink&oid=118942415&loc=d3e14557-108349"
  },
  "r183": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "450",
   "URI": "http://asc.fasb.org/topic&trid=2127136"
  },
  "r184": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "15",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "460",
   "URI": "http://asc.fasb.org/extlink&oid=99404985&loc=d3e10037-110241"
  },
  "r185": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "460",
   "URI": "http://asc.fasb.org/extlink&oid=118943654&loc=d3e12021-110248"
  },
  "r186": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "460",
   "URI": "http://asc.fasb.org/extlink&oid=118943654&loc=d3e12053-110248"
  },
  "r187": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "460",
   "URI": "http://asc.fasb.org/extlink&oid=118956092&loc=d3e13051-110250"
  },
  "r188": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=109259400&loc=d3e21463-112644"
  },
  "r189": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.3-04)",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=27012166&loc=d3e187085-122770"
  },
  "r19": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(31))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r190": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "505",
   "URI": "http://asc.fasb.org/topic&trid=2208762"
  },
  "r191": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=118944033&loc=SL49130531-203044"
  },
  "r192": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=118944033&loc=SL49130532-203044"
  },
  "r193": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=118944033&loc=SL49130533-203044"
  },
  "r194": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=118956577&loc=SL49130551-203045"
  },
  "r195": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=118956577&loc=SL49130551-203045"
  },
  "r196": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=118956577&loc=SL49130551-203045"
  },
  "r197": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=118956577&loc=SL49130551-203045"
  },
  "r198": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=118956577&loc=SL49130551-203045"
  },
  "r199": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=118956577&loc=SL49130556-203045"
  },
  "r2": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=118951113&loc=d3e6676-107765"
  },
  "r20": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(32))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r200": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)(1)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=118956577&loc=SL49130556-203045"
  },
  "r201": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=118956577&loc=SL49130543-203045"
  },
  "r202": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=118956577&loc=SL49130543-203045"
  },
  "r203": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=118956577&loc=SL49130545-203045"
  },
  "r204": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=118956577&loc=SL49130549-203045"
  },
  "r205": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=118956577&loc=SL49130549-203045"
  },
  "r206": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "91",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=118944142&loc=SL49130690-203046-203046"
  },
  "r207": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "91",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=118944142&loc=SL49130690-203046-203046"
  },
  "r208": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "91",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=118944142&loc=SL49130690-203046-203046"
  },
  "r209": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=113356391&loc=SL49131195-203048"
  },
  "r21": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(4)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r210": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "606",
   "URI": "http://asc.fasb.org/topic&trid=49130388"
  },
  "r211": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)(ii)",
   "Topic": "715",
   "URI": "http://asc.fasb.org/extlink&oid=118255775&loc=d3e1928-114920"
  },
  "r212": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)(iv)(01)",
   "Topic": "715",
   "URI": "http://asc.fasb.org/extlink&oid=118255775&loc=d3e1928-114920"
  },
  "r213": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "17",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "715",
   "URI": "http://asc.fasb.org/extlink&oid=118257860&loc=d3e4179-114921"
  },
  "r214": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "35",
   "SubTopic": "10",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116855982&loc=d3e4534-113899"
  },
  "r215": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5047-113901"
  },
  "r216": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5047-113901"
  },
  "r217": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5047-113901"
  },
  "r218": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)(1)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r219": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)(2)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r22": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(6)(a))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r220": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)(3)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r221": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a),(g)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r222": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(1)(iv)(2)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r223": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(g)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r224": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(h)(1)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r225": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(i)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r226": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r227": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=SL79508275-113901"
  },
  "r228": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 14.F)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=115993241&loc=d3e301413-122809"
  },
  "r229": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=118258462&loc=d3e11149-113907"
  },
  "r23": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(6)(b))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r230": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=118258462&loc=d3e11178-113907"
  },
  "r231": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "718",
   "URI": "http://asc.fasb.org/topic&trid=2228938"
  },
  "r232": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "730",
   "URI": "http://asc.fasb.org/extlink&oid=6420194&loc=d3e21568-108373"
  },
  "r233": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "730",
   "URI": "http://asc.fasb.org/extlink&oid=6420387&loc=d3e23199-108380"
  },
  "r234": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "730",
   "URI": "http://asc.fasb.org/extlink&oid=6420387&loc=d3e23199-108380"
  },
  "r235": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "730",
   "URI": "http://asc.fasb.org/extlink&oid=6420387&loc=d3e23221-108380"
  },
  "r236": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=109238882&loc=d3e38679-109324"
  },
  "r237": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "808",
   "URI": "http://asc.fasb.org/extlink&oid=6931272&loc=SL5834143-161434"
  },
  "r238": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "808",
   "URI": "http://asc.fasb.org/extlink&oid=6931272&loc=SL5834143-161434"
  },
  "r239": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "808",
   "URI": "http://asc.fasb.org/extlink&oid=6931272&loc=SL5834143-161434"
  },
  "r24": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(6)(c))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r240": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "808",
   "URI": "http://asc.fasb.org/topic&trid=5833765"
  },
  "r241": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c),(3)",
   "Topic": "810",
   "URI": "http://asc.fasb.org/extlink&oid=109239629&loc=SL4573702-111684"
  },
  "r242": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4D",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=SL5624177-113959"
  },
  "r243": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=117815213&loc=d3e19207-110258"
  },
  "r244": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=117815213&loc=d3e19207-110258"
  },
  "r245": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(bb)",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=117815213&loc=d3e19207-110258"
  },
  "r246": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=117815213&loc=d3e19279-110258"
  },
  "r247": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "820",
   "URI": "http://asc.fasb.org/topic&trid=2155941"
  },
  "r248": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "825",
   "URI": "http://asc.fasb.org/extlink&oid=99377092&loc=SL75136599-209740"
  },
  "r249": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "825",
   "URI": "http://asc.fasb.org/extlink&oid=118260190&loc=d3e13531-108611"
  },
  "r25": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(7))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r250": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "21",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "825",
   "URI": "http://asc.fasb.org/extlink&oid=118260190&loc=d3e13537-108611"
  },
  "r251": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "21",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "825",
   "URI": "http://asc.fasb.org/extlink&oid=118260190&loc=d3e13537-108611"
  },
  "r252": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Topic": "825",
   "URI": "http://asc.fasb.org/extlink&oid=117336053&loc=SL75039408-165497"
  },
  "r253": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "230",
   "Topic": "830",
   "URI": "http://asc.fasb.org/extlink&oid=98513438&loc=d3e33268-110906"
  },
  "r254": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "40",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Subparagraph": "(Note 3)",
   "Topic": "840",
   "URI": "http://asc.fasb.org/extlink&oid=82846649&loc=d3e38371-112697"
  },
  "r255": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "25",
   "SubTopic": "20",
   "Topic": "840",
   "URI": "http://asc.fasb.org/extlink&oid=77902458&loc=d3e39896-112707"
  },
  "r256": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "25",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "840",
   "URI": "http://asc.fasb.org/extlink&oid=77902458&loc=d3e39927-112707"
  },
  "r257": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "25",
   "SubTopic": "20",
   "Topic": "840",
   "URI": "http://asc.fasb.org/extlink&oid=77902458&loc=d3e40010-112707"
  },
  "r258": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "25",
   "SubTopic": "20",
   "Topic": "840",
   "URI": "http://asc.fasb.org/extlink&oid=77902458&loc=d3e40019-112707"
  },
  "r259": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "840",
   "URI": "http://asc.fasb.org/extlink&oid=77902758&loc=d3e41502-112717"
  },
  "r26": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(8))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r260": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "840",
   "URI": "http://asc.fasb.org/extlink&oid=77902758&loc=d3e41502-112717"
  },
  "r261": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "840",
   "URI": "http://asc.fasb.org/extlink&oid=77891322&loc=d3e41614-112719"
  },
  "r262": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "840",
   "URI": "http://asc.fasb.org/extlink&oid=77891322&loc=d3e41620-112719"
  },
  "r263": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Topic": "840",
   "URI": "http://asc.fasb.org/extlink&oid=84164758&loc=d3e45023-112735"
  },
  "r264": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Subparagraph": "(b)",
   "Topic": "840",
   "URI": "http://asc.fasb.org/extlink&oid=84164817&loc=d3e45280-112737"
  },
  "r265": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Subparagraph": "(c)",
   "Topic": "840",
   "URI": "http://asc.fasb.org/extlink&oid=84164817&loc=d3e45280-112737"
  },
  "r266": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=119364159&loc=SL77916155-209984"
  },
  "r267": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888419&loc=SL77918627-209977"
  },
  "r268": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888419&loc=SL77918627-209977"
  },
  "r269": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888419&loc=SL77918638-209977"
  },
  "r27": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.1)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r270": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888419&loc=SL77918643-209977"
  },
  "r271": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888419&loc=SL77918643-209977"
  },
  "r272": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Subparagraph": "(c)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888419&loc=SL77918643-209977"
  },
  "r273": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888426&loc=SL77918666-209980"
  },
  "r274": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(a)(3)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888426&loc=SL77918673-209980"
  },
  "r275": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888426&loc=SL77918673-209980"
  },
  "r276": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888426&loc=SL77918686-209980"
  },
  "r277": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888426&loc=SL77918686-209980"
  },
  "r278": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(e)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888426&loc=SL77918686-209980"
  },
  "r279": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(g)(1)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888426&loc=SL77918686-209980"
  },
  "r28": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.12)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r280": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(g)(3)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888426&loc=SL77918686-209980"
  },
  "r281": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(g)(4)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888426&loc=SL77918686-209980"
  },
  "r282": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888426&loc=SL77918686-209980"
  },
  "r283": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888426&loc=SL77918701-209980"
  },
  "r284": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "53",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888399&loc=SL77918982-209971"
  },
  "r285": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=119202524&loc=SL77919396-209981"
  },
  "r286": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "850",
   "URI": "http://asc.fasb.org/extlink&oid=6457730&loc=d3e39549-107864"
  },
  "r287": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "850",
   "URI": "http://asc.fasb.org/extlink&oid=6457730&loc=d3e39603-107864"
  },
  "r288": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "850",
   "URI": "http://asc.fasb.org/extlink&oid=6457730&loc=d3e39622-107864"
  },
  "r289": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "850",
   "URI": "http://asc.fasb.org/topic&trid=2122745"
  },
  "r29": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.13)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r290": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(bb)",
   "Topic": "860",
   "URI": "http://asc.fasb.org/extlink&oid=118948506&loc=d3e107207-111719"
  },
  "r291": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(bb)(1)",
   "Topic": "860",
   "URI": "http://asc.fasb.org/extlink&oid=118948506&loc=d3e107207-111719"
  },
  "r292": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "50",
   "Topic": "860",
   "URI": "http://asc.fasb.org/extlink&oid=116651436&loc=d3e122625-111746"
  },
  "r293": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-10(a)(32))",
   "Topic": "932",
   "URI": "http://asc.fasb.org/extlink&oid=82851474&loc=d3e511914-122862"
  },
  "r294": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-10(c)(3)(ii)(A))",
   "Topic": "932",
   "URI": "http://asc.fasb.org/extlink&oid=82851474&loc=d3e511914-122862"
  },
  "r295": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-10(c)(7)(ii))",
   "Topic": "932",
   "URI": "http://asc.fasb.org/extlink&oid=82851474&loc=d3e511914-122862"
  },
  "r296": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(b)",
   "Topic": "932",
   "URI": "http://asc.fasb.org/extlink&oid=68064819&loc=SL6806780-109447"
  },
  "r297": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03(1)(a))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=6876686&loc=d3e534808-122878"
  },
  "r298": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03(11))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=6876686&loc=d3e534808-122878"
  },
  "r299": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03(17))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=6876686&loc=d3e534808-122878"
  },
  "r3": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=118951113&loc=d3e6676-107765"
  },
  "r30": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.14)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r300": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03(23))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=6876686&loc=d3e534808-122878"
  },
  "r301": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03.15(5))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=6876686&loc=d3e534808-122878"
  },
  "r302": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03.17)",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=6876686&loc=d3e534808-122878"
  },
  "r303": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04(22))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=116637391&loc=SL114874048-224260"
  },
  "r304": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04(23))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=116637391&loc=SL114874048-224260"
  },
  "r305": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(12))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=119400593&loc=d3e572229-122910"
  },
  "r306": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(19))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=119400593&loc=d3e572229-122910"
  },
  "r307": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(2))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=119400593&loc=d3e572229-122910"
  },
  "r308": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(23)(a)(4))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=119400593&loc=d3e572229-122910"
  },
  "r309": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(25))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=119400593&loc=d3e572229-122910"
  },
  "r31": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.17)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r310": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(3))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=119400593&loc=d3e572229-122910"
  },
  "r311": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(8))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=119400593&loc=d3e572229-122910"
  },
  "r312": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03.(a),19)",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=119400593&loc=d3e572229-122910"
  },
  "r313": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03.15(a))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=119400593&loc=d3e572229-122910"
  },
  "r314": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.7-04(18))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=116637232&loc=SL114874131-224263"
  },
  "r315": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.7-04(19))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=116637232&loc=SL114874131-224263"
  },
  "r316": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4H",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "40",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=116884468&loc=SL65671331-158438"
  },
  "r317": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13H",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "40",
   "Subparagraph": "(a)",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=117419784&loc=SL117783719-158441"
  },
  "r318": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13H",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "40",
   "Subparagraph": "(b)",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=117419784&loc=SL117783719-158441"
  },
  "r319": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13H",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "40",
   "Subparagraph": "(c)",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=117419784&loc=SL117783719-158441"
  },
  "r32": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.19(a))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r320": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "825",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=99380617&loc=SL75241803-196195"
  },
  "r321": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "210",
   "Subparagraph": "(c)",
   "Topic": "946",
   "URI": "http://asc.fasb.org/extlink&oid=99383244&loc=d3e12121-115841"
  },
  "r322": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.6-07.1(c))",
   "Topic": "946",
   "URI": "http://asc.fasb.org/extlink&oid=116637345&loc=SL114874292-224272"
  },
  "r323": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "320",
   "Subparagraph": "(SX 210.12-12(2)(i))",
   "Topic": "946",
   "URI": "http://asc.fasb.org/extlink&oid=50485924&loc=d3e611133-123010"
  },
  "r324": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "320",
   "Subparagraph": "(SX 210.12-12.Column B)",
   "Topic": "946",
   "URI": "http://asc.fasb.org/extlink&oid=50485924&loc=d3e611133-123010"
  },
  "r325": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "320",
   "Subparagraph": "(SX 210.12-12C(1)(a))",
   "Topic": "946",
   "URI": "http://asc.fasb.org/extlink&oid=50485924&loc=d3e611225-123010"
  },
  "r326": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "320",
   "Subparagraph": "(SX 210.12-12C.Column B)",
   "Topic": "946",
   "URI": "http://asc.fasb.org/extlink&oid=50485924&loc=d3e611225-123010"
  },
  "r327": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "320",
   "Subparagraph": "(SX 210.12-13(1))",
   "Topic": "946",
   "URI": "http://asc.fasb.org/extlink&oid=50485924&loc=d3e611282-123010"
  },
  "r328": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "320",
   "Subparagraph": "(SX 210.12-14.Column B)",
   "Topic": "946",
   "URI": "http://asc.fasb.org/extlink&oid=50485924&loc=d3e611322-123010"
  },
  "r329": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "320",
   "Subparagraph": "(SX 210.12-15(Column A))",
   "Topic": "946",
   "URI": "http://asc.fasb.org/extlink&oid=50485924&loc=d3e611379-123010"
  },
  "r33": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.19(b),22(b))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r330": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "310",
   "Subparagraph": "(SX 210.12-29(Footnote 4))",
   "Topic": "948",
   "URI": "http://asc.fasb.org/extlink&oid=6589523&loc=d3e617274-123014"
  },
  "r331": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Footnote 2))",
   "Topic": "970",
   "URI": "http://asc.fasb.org/extlink&oid=6590653&loc=d3e638233-123024"
  },
  "r332": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28)",
   "Topic": "970",
   "URI": "http://asc.fasb.org/extlink&oid=6590653&loc=d3e638233-123024"
  },
  "r333": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "985",
   "URI": "http://asc.fasb.org/extlink&oid=6501960&loc=d3e128462-111756"
  },
  "r334": {
   "Name": "Exchange Act",
   "Number": "240",
   "Publisher": "SEC",
   "Section": "12",
   "Subsection": "b"
  },
  "r335": {
   "Name": "Exchange Act",
   "Number": "240",
   "Publisher": "SEC",
   "Section": "12",
   "Subsection": "d1-1"
  },
  "r336": {
   "Name": "Form 10-Q",
   "Number": "240",
   "Publisher": "SEC",
   "Section": "13",
   "Subsection": "a-13"
  },
  "r337": {
   "Name": "Forms 10-K, 10-Q, 20-F",
   "Number": "240",
   "Publisher": "SEC",
   "Section": "13",
   "Subsection": "a-1-"
  },
  "r338": {
   "Name": "Regulation 12B",
   "Number": "240",
   "Publisher": "SEC",
   "Section": "12",
   "Subsection": "b-2"
  },
  "r339": {
   "Name": "Regulation S-T",
   "Number": "232",
   "Publisher": "SEC",
   "Section": "405"
  },
  "r34": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.19-26)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r35": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.20)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r36": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.21)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r37": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.22(a)(1))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r38": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.22)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r39": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.24)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r4": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=118951113&loc=d3e6676-107765"
  },
  "r40": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.25)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r41": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.29)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r42": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.29-31)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r43": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.6(a)(1))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r44": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.6(a)(3))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r45": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.6(a)(4))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r46": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.6(a))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r47": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.9)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r48": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "16",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=99393222&loc=SL20226024-175313"
  },
  "r49": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=118930883&loc=SL7669646-108580"
  },
  "r5": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=118951113&loc=d3e6801-107765"
  },
  "r50": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "14A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=118930883&loc=SL7669686-108580"
  },
  "r51": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "17B",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=118930883&loc=SL34724394-108580"
  },
  "r52": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=118930883&loc=SL7669619-108580"
  },
  "r53": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=118930883&loc=SL7669625-108580"
  },
  "r54": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03(20))",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=116634182&loc=SL114868664-224227"
  },
  "r55": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03(21))",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=116634182&loc=SL114868664-224227"
  },
  "r56": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03.1(e))",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=116634182&loc=SL114868664-224227"
  },
  "r57": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03.2(a),(d))",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=116634182&loc=SL114868664-224227"
  },
  "r58": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03.4)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=116634182&loc=SL114868664-224227"
  },
  "r59": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03.7(b))",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=116634182&loc=SL114868664-224227"
  },
  "r6": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6361739&loc=d3e7789-107766"
  },
  "r60": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03.9)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=116634182&loc=SL114868664-224227"
  },
  "r61": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=116634182&loc=SL114868664-224227"
  },
  "r62": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3179-108585"
  },
  "r63": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3179-108585"
  },
  "r64": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3213-108585"
  },
  "r65": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3213-108585"
  },
  "r66": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "14",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3255-108585"
  },
  "r67": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3291-108585"
  },
  "r68": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3291-108585"
  },
  "r69": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3291-108585"
  },
  "r7": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(1))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r70": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "17",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3367-108585"
  },
  "r71": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "24",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3521-108585"
  },
  "r72": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "25",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3536-108585"
  },
  "r73": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "25",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(f)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3536-108585"
  },
  "r74": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "25",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3536-108585"
  },
  "r75": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3602-108585"
  },
  "r76": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3602-108585"
  },
  "r77": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3602-108585"
  },
  "r78": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3044-108585"
  },
  "r79": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=98513485&loc=d3e4297-108586"
  },
  "r8": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(13))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r80": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=98513485&loc=d3e4304-108586"
  },
  "r81": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=98513485&loc=d3e4313-108586"
  },
  "r82": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=98513485&loc=d3e4332-108586"
  },
  "r83": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=98513485&loc=SL98516268-108586"
  },
  "r84": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=84158767&loc=d3e18780-107790"
  },
  "r85": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08(h))",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=26873400&loc=d3e23780-122690"
  },
  "r86": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08(k)(1))",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=26873400&loc=d3e23780-122690"
  },
  "r87": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08(m)(1)(iii))",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=26873400&loc=d3e23780-122690"
  },
  "r88": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08.(h)(1)(i))",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=26873400&loc=d3e23780-122690"
  },
  "r89": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "235",
   "URI": "http://asc.fasb.org/topic&trid=2122369"
  },
  "r9": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(14))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r90": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)(3)",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=109234566&loc=d3e22499-107794"
  },
  "r91": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=109234566&loc=d3e22499-107794"
  },
  "r92": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=109234566&loc=d3e22694-107794"
  },
  "r93": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=109234566&loc=d3e22583-107794"
  },
  "r94": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=117326831&loc=d3e1448-109256"
  },
  "r95": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "16",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=117326831&loc=d3e1505-109256"
  },
  "r96": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=117326831&loc=d3e1252-109256"
  },
  "r97": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "60B",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=117326831&loc=SL5780133-109256"
  },
  "r98": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=117326831&loc=d3e1337-109256"
  },
  "r99": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=6371337&loc=d3e3550-109257"
  }
 },
 "version": "2.1"
}
