<?xml version="1.0" encoding="US-ASCII"?>
<!--XBRL Document Created with Wdesk from Workiva-->
<!-- -->
<link:linkbase xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd" xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xbrldt="http://xbrl.org/2005/xbrldt" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <link:roleRef roleURI="http://www.codexis.com/role/BalanceSheetsDetails" xlink:href="cdxs-20180331.xsd#BalanceSheetsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/BalanceSheetsDetailsAccruedLiabilitiesDetails" xlink:href="cdxs-20180331.xsd#BalanceSheetsDetailsAccruedLiabilitiesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/BalanceSheetsDetailsGoodwillDetails" xlink:href="cdxs-20180331.xsd#BalanceSheetsDetailsGoodwillDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/BalanceSheetsDetailsInventoriesDetails" xlink:href="cdxs-20180331.xsd#BalanceSheetsDetailsInventoriesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/BalanceSheetsDetailsPropertyAndEquipmentNetDetails" xlink:href="cdxs-20180331.xsd#BalanceSheetsDetailsPropertyAndEquipmentNetDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/BalanceSheetsDetailsTables" xlink:href="cdxs-20180331.xsd#BalanceSheetsDetailsTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/BasisOfPresentationAndSummaryOfSignificantAccountingPolicies" xlink:href="cdxs-20180331.xsd#BasisOfPresentationAndSummaryOfSignificantAccountingPolicies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/BasisOfPresentationAndSummaryOfSignificantAccountingPoliciesPolicies" xlink:href="cdxs-20180331.xsd#BasisOfPresentationAndSummaryOfSignificantAccountingPoliciesPolicies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/BasisOfPresentationAndSummaryOfSignificantAccountingPoliciesTextualDetails" xlink:href="cdxs-20180331.xsd#BasisOfPresentationAndSummaryOfSignificantAccountingPoliciesTextualDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/CapitalStock" xlink:href="cdxs-20180331.xsd#CapitalStock" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/CapitalStockTextualDetails" xlink:href="cdxs-20180331.xsd#CapitalStockTextualDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/CashEquivalentsAndMarketableSecurities" xlink:href="cdxs-20180331.xsd#CashEquivalentsAndMarketableSecurities" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesComponentsOfCashEquivalentsAndMarketableSecuritiesDetails" xlink:href="cdxs-20180331.xsd#CashEquivalentsAndMarketableSecuritiesComponentsOfCashEquivalentsAndMarketableSecuritiesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesTables" xlink:href="cdxs-20180331.xsd#CashEquivalentsAndMarketableSecuritiesTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/CollaborativeArrangements" xlink:href="cdxs-20180331.xsd#CollaborativeArrangements" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/CollaborativeArrangementsTextualDetails" xlink:href="cdxs-20180331.xsd#CollaborativeArrangementsTextualDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/CommitmentsAndContingencies" xlink:href="cdxs-20180331.xsd#CommitmentsAndContingencies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails" xlink:href="cdxs-20180331.xsd#CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/CommitmentsAndContingenciesOtherCommitmentsDetails" xlink:href="cdxs-20180331.xsd#CommitmentsAndContingenciesOtherCommitmentsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/CommitmentsAndContingenciesTables" xlink:href="cdxs-20180331.xsd#CommitmentsAndContingenciesTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails" xlink:href="cdxs-20180331.xsd#CommitmentsAndContingenciesTextualDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/CondensedConsolidatedBalanceSheets" xlink:href="cdxs-20180331.xsd#CondensedConsolidatedBalanceSheets" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/CondensedConsolidatedBalanceSheetsParenthetical" xlink:href="cdxs-20180331.xsd#CondensedConsolidatedBalanceSheetsParenthetical" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows" xlink:href="cdxs-20180331.xsd#CondensedConsolidatedStatementsOfCashFlows" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/CondensedConsolidatedStatementsOfComprehensiveIncomeLoss" xlink:href="cdxs-20180331.xsd#CondensedConsolidatedStatementsOfComprehensiveIncomeLoss" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations" xlink:href="cdxs-20180331.xsd#CondensedConsolidatedStatementsOfOperations" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/DescriptionOfBusiness" xlink:href="cdxs-20180331.xsd#DescriptionOfBusiness" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/DescriptionOfBusinessTextualDetails" xlink:href="cdxs-20180331.xsd#DescriptionOfBusinessTextualDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/DocumentAndEntityInformation" xlink:href="cdxs-20180331.xsd#DocumentAndEntityInformation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/FairValueMeasurements" xlink:href="cdxs-20180331.xsd#FairValueMeasurements" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/FairValueMeasurementsScheduleOfFinancialInstrumentsMeasuredAtFairValueOnRecurringBasisDetails" xlink:href="cdxs-20180331.xsd#FairValueMeasurementsScheduleOfFinancialInstrumentsMeasuredAtFairValueOnRecurringBasisDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/FairValueMeasurementsTables" xlink:href="cdxs-20180331.xsd#FairValueMeasurementsTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/NetLossPerShare" xlink:href="cdxs-20180331.xsd#NetLossPerShare" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/NetLossPerShareAntiDilutiveSecuritiesDetails" xlink:href="cdxs-20180331.xsd#NetLossPerShareAntiDilutiveSecuritiesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/NetLossPerShareTables" xlink:href="cdxs-20180331.xsd#NetLossPerShareTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/RelatedPartyTransactions" xlink:href="cdxs-20180331.xsd#RelatedPartyTransactions" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/RelatedPartyTransactionsTextualDetails" xlink:href="cdxs-20180331.xsd#RelatedPartyTransactionsTextualDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/RevenueRecognition" xlink:href="cdxs-20180331.xsd#RevenueRecognition" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/RevenueRecognitionContractsWithCustomerDetails" xlink:href="cdxs-20180331.xsd#RevenueRecognitionContractsWithCustomerDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/RevenueRecognitionDetails" xlink:href="cdxs-20180331.xsd#RevenueRecognitionDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/RevenueRecognitionImpactToFinancialStatementsDetails" xlink:href="cdxs-20180331.xsd#RevenueRecognitionImpactToFinancialStatementsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/RevenueRecognitionPerformanceObligationDetails" xlink:href="cdxs-20180331.xsd#RevenueRecognitionPerformanceObligationDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/RevenueRecognitionTables" xlink:href="cdxs-20180331.xsd#RevenueRecognitionTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformation" xlink:href="cdxs-20180331.xsd#SegmentGeographicalAndOtherRevenueInformation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationConcentrationRiskDetails" xlink:href="cdxs-20180331.xsd#SegmentGeographicalAndOtherRevenueInformationConcentrationRiskDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationLongLivedAssetsByGeographicAreaDetails" xlink:href="cdxs-20180331.xsd#SegmentGeographicalAndOtherRevenueInformationLongLivedAssetsByGeographicAreaDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationRevenuesByGeographicAreaDetails" xlink:href="cdxs-20180331.xsd#SegmentGeographicalAndOtherRevenueInformationRevenuesByGeographicAreaDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationSegmentReportingDetails" xlink:href="cdxs-20180331.xsd#SegmentGeographicalAndOtherRevenueInformationSegmentReportingDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationTables" xlink:href="cdxs-20180331.xsd#SegmentGeographicalAndOtherRevenueInformationTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/StockBasedCompensation" xlink:href="cdxs-20180331.xsd#StockBasedCompensation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/StockBasedCompensationStockBasedCompensationExpenseDetails" xlink:href="cdxs-20180331.xsd#StockBasedCompensationStockBasedCompensationExpenseDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/StockBasedCompensationTables" xlink:href="cdxs-20180331.xsd#StockBasedCompensationTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/StockBasedCompensationTextualDetails" xlink:href="cdxs-20180331.xsd#StockBasedCompensationTextualDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/StockBasedCompensationValuationAssumptionsDetails" xlink:href="cdxs-20180331.xsd#StockBasedCompensationValuationAssumptionsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/SubsequentEvents" xlink:href="cdxs-20180331.xsd#SubsequentEvents" xlink:type="simple" />
  <link:roleRef roleURI="http://www.codexis.com/role/SubsequentEventsTextualDetails" xlink:href="cdxs-20180331.xsd#SubsequentEventsTextualDetails" xlink:type="simple" />
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/all" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#all" xlink:type="simple" />
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-default" xlink:type="simple" />
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-domain" xlink:type="simple" />
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/domain-member" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#domain-member" xlink:type="simple" />
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#hypercube-dimension" xlink:type="simple" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/BalanceSheetsDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/BalanceSheetsDetailsAccruedLiabilitiesDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/BalanceSheetsDetailsGoodwillDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/BalanceSheetsDetailsInventoriesDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/BalanceSheetsDetailsPropertyAndEquipmentNetDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentLineItems" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentLineItems_85812039E81C7C347EDADF84A1E09F5A" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfPropertyPlantAndEquipmentTable" xlink:label="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_19CD18747438D95E063CDF84A1E056E2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_85812039E81C7C347EDADF84A1E09F5A" xlink:to="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_19CD18747438D95E063CDF84A1E056E2" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentByTypeAxis" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_EABC919778EB8CA095B4DF84A1E012C9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_19CD18747438D95E063CDF84A1E056E2" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_EABC919778EB8CA095B4DF84A1E012C9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_C5C4E37412062A69F82EDF84A1E09164_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_EABC919778EB8CA095B4DF84A1E012C9" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_C5C4E37412062A69F82EDF84A1E09164_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_C5C4E37412062A69F82EDF84A1E09164" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_EABC919778EB8CA095B4DF84A1E012C9" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_C5C4E37412062A69F82EDF84A1E09164" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_LaboratoryEquipmentMember" xlink:label="loc_cdxs_LaboratoryEquipmentMember_D4C8416DB45C568C5471DF84A1E051EB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_C5C4E37412062A69F82EDF84A1E09164" xlink:to="loc_cdxs_LaboratoryEquipmentMember_D4C8416DB45C568C5471DF84A1E051EB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LeaseholdImprovementsMember" xlink:label="loc_us-gaap_LeaseholdImprovementsMember_FC05403F41CE9ECBC548DF84A1E08A58" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_C5C4E37412062A69F82EDF84A1E09164" xlink:to="loc_us-gaap_LeaseholdImprovementsMember_FC05403F41CE9ECBC548DF84A1E08A58" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ComputerEquipmentMember" xlink:label="loc_us-gaap_ComputerEquipmentMember_F5178DC2BE23EB4943EEDF84A1E0B0A2" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_C5C4E37412062A69F82EDF84A1E09164" xlink:to="loc_us-gaap_ComputerEquipmentMember_F5178DC2BE23EB4943EEDF84A1E0B0A2" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_OfficeEquipmentAndFurnitureMember" xlink:label="loc_cdxs_OfficeEquipmentAndFurnitureMember_BCBCD858681B4E682D35DF84A1E074AD" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_C5C4E37412062A69F82EDF84A1E09164" xlink:to="loc_cdxs_OfficeEquipmentAndFurnitureMember_BCBCD858681B4E682D35DF84A1E074AD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConstructionInProgressMember" xlink:label="loc_us-gaap_ConstructionInProgressMember_1061390EA72671DDC12FDF84A1E09903" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_C5C4E37412062A69F82EDF84A1E09164" xlink:to="loc_us-gaap_ConstructionInProgressMember_1061390EA72671DDC12FDF84A1E09903" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentGross" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentGross_BADFDDF44EB6A0883975DF84A1E06A4B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_85812039E81C7C347EDADF84A1E09F5A" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentGross_BADFDDF44EB6A0883975DF84A1E06A4B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment" xlink:label="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_45D077AEF9570F48ADD5DF84A1E0264D" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_85812039E81C7C347EDADF84A1E09F5A" xlink:to="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_45D077AEF9570F48ADD5DF84A1E0264D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_34A2AA5427785C55180ADF84A1E09138" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_85812039E81C7C347EDADF84A1E09F5A" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_34A2AA5427785C55180ADF84A1E09138" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentDisposals" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentDisposals_6E04F955547BFE0BFAE3DF84A1E00AD7" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_85812039E81C7C347EDADF84A1E09F5A" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentDisposals_6E04F955547BFE0BFAE3DF84A1E00AD7" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.codexis.com/role/BalanceSheetsDetailsTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/BasisOfPresentationAndSummaryOfSignificantAccountingPolicies" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/BasisOfPresentationAndSummaryOfSignificantAccountingPoliciesPolicies" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/BasisOfPresentationAndSummaryOfSignificantAccountingPoliciesTextualDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LossContingenciesLineItems" xlink:label="loc_us-gaap_LossContingenciesLineItems_8A9039820F09B7AAF786485D3003F7AC" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LossContingenciesTable" xlink:label="loc_us-gaap_LossContingenciesTable_2C7F435B63611C2D5D14485D3003A697" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_LossContingenciesLineItems_8A9039820F09B7AAF786485D3003F7AC" xlink:to="loc_us-gaap_LossContingenciesTable_2C7F435B63611C2D5D14485D3003A697" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_InitialApplicationPeriodCumulativeEffectTransitionAxis" xlink:label="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionAxis_0FEF29C2F672BA97BCBD485D30037DF1" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LossContingenciesTable_2C7F435B63611C2D5D14485D3003A697" xlink:to="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionAxis_0FEF29C2F672BA97BCBD485D30037DF1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_InitialApplicationPeriodCumulativeEffectTransitionDomain" xlink:label="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionDomain_DA3780020D9A0D4648B2485D3003D9C4_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionAxis_0FEF29C2F672BA97BCBD485D30037DF1" xlink:to="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionDomain_DA3780020D9A0D4648B2485D3003D9C4_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_InitialApplicationPeriodCumulativeEffectTransitionDomain" xlink:label="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionDomain_DA3780020D9A0D4648B2485D3003D9C4" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionAxis_0FEF29C2F672BA97BCBD485D30037DF1" xlink:to="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionDomain_DA3780020D9A0D4648B2485D3003D9C4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DifferenceBetweenRevenueGuidanceInEffectBeforeAndAfterTopic606Member" xlink:label="loc_us-gaap_DifferenceBetweenRevenueGuidanceInEffectBeforeAndAfterTopic606Member_842EFFE2D1666BDF7768485D30030216" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionDomain_DA3780020D9A0D4648B2485D3003D9C4" xlink:to="loc_us-gaap_DifferenceBetweenRevenueGuidanceInEffectBeforeAndAfterTopic606Member_842EFFE2D1666BDF7768485D30030216" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AdjustmentsForNewAccountingPronouncementsAxis" xlink:label="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_926F8B230B0C06148F9E485D3003370C" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LossContingenciesTable_2C7F435B63611C2D5D14485D3003A697" xlink:to="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_926F8B230B0C06148F9E485D3003370C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TypeOfAdoptionMember" xlink:label="loc_us-gaap_TypeOfAdoptionMember_16CFE3D9484D02FB1CA8485D30032FED_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_926F8B230B0C06148F9E485D3003370C" xlink:to="loc_us-gaap_TypeOfAdoptionMember_16CFE3D9484D02FB1CA8485D30032FED_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TypeOfAdoptionMember" xlink:label="loc_us-gaap_TypeOfAdoptionMember_16CFE3D9484D02FB1CA8485D30032FED" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_926F8B230B0C06148F9E485D3003370C" xlink:to="loc_us-gaap_TypeOfAdoptionMember_16CFE3D9484D02FB1CA8485D30032FED" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AccountingStandardsUpdate201409Member" xlink:label="loc_us-gaap_AccountingStandardsUpdate201409Member_C75AC56CF50673DD845B485D30036D6F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfAdoptionMember_16CFE3D9484D02FB1CA8485D30032FED" xlink:to="loc_us-gaap_AccountingStandardsUpdate201409Member_C75AC56CF50673DD845B485D30036D6F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AccountingStandardsUpdate201601Member" xlink:label="loc_us-gaap_AccountingStandardsUpdate201601Member_E93B6A0B358D3B58D8E2485D3003A35A" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfAdoptionMember_16CFE3D9484D02FB1CA8485D30032FED" xlink:to="loc_us-gaap_AccountingStandardsUpdate201601Member_E93B6A0B358D3B58D8E2485D3003A35A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TypeOfArrangementAxis" xlink:label="loc_us-gaap_TypeOfArrangementAxis_02149FCEDA4CC42648A0485D30038C1A" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LossContingenciesTable_2C7F435B63611C2D5D14485D3003A697" xlink:to="loc_us-gaap_TypeOfArrangementAxis_02149FCEDA4CC42648A0485D30038C1A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ArrangementsAndNonarrangementTransactionsMember" xlink:label="loc_us-gaap_ArrangementsAndNonarrangementTransactionsMember_A197C9443392163B7CCB485D3003506A_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_TypeOfArrangementAxis_02149FCEDA4CC42648A0485D30038C1A" xlink:to="loc_us-gaap_ArrangementsAndNonarrangementTransactionsMember_A197C9443392163B7CCB485D3003506A_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ArrangementsAndNonarrangementTransactionsMember" xlink:label="loc_us-gaap_ArrangementsAndNonarrangementTransactionsMember_A197C9443392163B7CCB485D3003506A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_TypeOfArrangementAxis_02149FCEDA4CC42648A0485D30038C1A" xlink:to="loc_us-gaap_ArrangementsAndNonarrangementTransactionsMember_A197C9443392163B7CCB485D3003506A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/country/2017/country-2017-01-31.xsd#country_IN" xlink:label="loc_country_IN_DE3DC835B78CF14D09FA485D3003897B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ArrangementsAndNonarrangementTransactionsMember_A197C9443392163B7CCB485D3003506A" xlink:to="loc_country_IN_DE3DC835B78CF14D09FA485D3003897B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LossContingenciesByNatureOfContingencyAxis" xlink:label="loc_us-gaap_LossContingenciesByNatureOfContingencyAxis_64BF4B6B6E00695D6C4B485D3003F973" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LossContingenciesTable_2C7F435B63611C2D5D14485D3003A697" xlink:to="loc_us-gaap_LossContingenciesByNatureOfContingencyAxis_64BF4B6B6E00695D6C4B485D3003F973" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LossContingencyNatureDomain" xlink:label="loc_us-gaap_LossContingencyNatureDomain_CCEAA0C69CCAF9E08FD3485D30035A7C_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LossContingenciesByNatureOfContingencyAxis_64BF4B6B6E00695D6C4B485D3003F973" xlink:to="loc_us-gaap_LossContingencyNatureDomain_CCEAA0C69CCAF9E08FD3485D30035A7C_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LossContingencyNatureDomain" xlink:label="loc_us-gaap_LossContingencyNatureDomain_CCEAA0C69CCAF9E08FD3485D30035A7C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LossContingenciesByNatureOfContingencyAxis_64BF4B6B6E00695D6C4B485D3003F973" xlink:to="loc_us-gaap_LossContingencyNatureDomain_CCEAA0C69CCAF9E08FD3485D30035A7C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StandbyLettersOfCreditMember" xlink:label="loc_us-gaap_StandbyLettersOfCreditMember_64240FC0F4223DDF6E6E485D30037535" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LossContingencyNatureDomain_CCEAA0C69CCAF9E08FD3485D30035A7C" xlink:to="loc_us-gaap_StandbyLettersOfCreditMember_64240FC0F4223DDF6E6E485D30037535" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_BAAABEE38070CF4A83D6485D300337B8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LossContingenciesLineItems_8A9039820F09B7AAF786485D3003F7AC" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_BAAABEE38070CF4A83D6485D300337B8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_Cash" xlink:label="loc_us-gaap_Cash_0C18527EA7E3ABAC8122485D3003866D" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LossContingenciesLineItems_8A9039820F09B7AAF786485D3003F7AC" xlink:to="loc_us-gaap_Cash_0C18527EA7E3ABAC8122485D3003866D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MoneyMarketFundsAtCarryingValue" xlink:label="loc_us-gaap_MoneyMarketFundsAtCarryingValue_F6725F30002AC8CF59E8485D3003C3D9" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LossContingenciesLineItems_8A9039820F09B7AAF786485D3003F7AC" xlink:to="loc_us-gaap_MoneyMarketFundsAtCarryingValue_F6725F30002AC8CF59E8485D3003C3D9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestrictedCashAndCashEquivalentsNoncurrent" xlink:label="loc_us-gaap_RestrictedCashAndCashEquivalentsNoncurrent_686F13BE8A6F56F45125485D3003B767" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LossContingenciesLineItems_8A9039820F09B7AAF786485D3003F7AC" xlink:to="loc_us-gaap_RestrictedCashAndCashEquivalentsNoncurrent_686F13BE8A6F56F45125485D3003B767" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestrictedCashAndInvestmentsNoncurrent" xlink:label="loc_us-gaap_RestrictedCashAndInvestmentsNoncurrent_F8FB3C795DFB31BAABF8485D30036D3F" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LossContingenciesLineItems_8A9039820F09B7AAF786485D3003F7AC" xlink:to="loc_us-gaap_RestrictedCashAndInvestmentsNoncurrent_F8FB3C795DFB31BAABF8485D30036D3F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentTransfersAndChanges" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentTransfersAndChanges_4C17513337174F2D012F485D30031103" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LossContingenciesLineItems_8A9039820F09B7AAF786485D3003F7AC" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentTransfersAndChanges_4C17513337174F2D012F485D30031103" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NumberOfOperatingSegments" xlink:label="loc_us-gaap_NumberOfOperatingSegments_A22FFD374DBF6378CB0B485D30037ADD" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LossContingenciesLineItems_8A9039820F09B7AAF786485D3003F7AC" xlink:to="loc_us-gaap_NumberOfOperatingSegments_A22FFD374DBF6378CB0B485D30037ADD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeTaxExpenseBenefit" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_21DF5A43ABFA2CD1EC4D485D3003CB87" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LossContingenciesLineItems_8A9039820F09B7AAF786485D3003F7AC" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_21DF5A43ABFA2CD1EC4D485D3003CB87" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AdvertisingExpense" xlink:label="loc_us-gaap_AdvertisingExpense_72ED201B152A6C45DC16485D300322E9" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LossContingenciesLineItems_8A9039820F09B7AAF786485D3003F7AC" xlink:to="loc_us-gaap_AdvertisingExpense_72ED201B152A6C45DC16485D300322E9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ValuationAllowanceDeferredTaxAssetChangeInAmount" xlink:label="loc_us-gaap_ValuationAllowanceDeferredTaxAssetChangeInAmount_EE13FE4AF8D1C67641DE485D3003625B" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LossContingenciesLineItems_8A9039820F09B7AAF786485D3003F7AC" xlink:to="loc_us-gaap_ValuationAllowanceDeferredTaxAssetChangeInAmount_EE13FE4AF8D1C67641DE485D3003625B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetainedEarningsAccumulatedDeficit" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_81D47953CBA4874CD987485D30037858" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LossContingenciesLineItems_8A9039820F09B7AAF786485D3003F7AC" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_81D47953CBA4874CD987485D30037858" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_Revenues" xlink:label="loc_us-gaap_Revenues_B158A411C36E05903EE1485D30032E20" xlink:type="locator" />
    <link:definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LossContingenciesLineItems_8A9039820F09B7AAF786485D3003F7AC" xlink:to="loc_us-gaap_Revenues_B158A411C36E05903EE1485D30032E20" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ReclassificationFromAociCurrentPeriodBeforeTaxAttributableToParent" xlink:label="loc_us-gaap_ReclassificationFromAociCurrentPeriodBeforeTaxAttributableToParent_B58AD600725C1C1B92CA485D30032DAB" xlink:type="locator" />
    <link:definitionArc order="13" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LossContingenciesLineItems_8A9039820F09B7AAF786485D3003F7AC" xlink:to="loc_us-gaap_ReclassificationFromAociCurrentPeriodBeforeTaxAttributableToParent_B58AD600725C1C1B92CA485D30032DAB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ReclassificationFromAociCurrentPeriodTax" xlink:label="loc_us-gaap_ReclassificationFromAociCurrentPeriodTax_0D55D432993231A76CC8485D30033DED" xlink:type="locator" />
    <link:definitionArc order="14" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LossContingenciesLineItems_8A9039820F09B7AAF786485D3003F7AC" xlink:to="loc_us-gaap_ReclassificationFromAociCurrentPeriodTax_0D55D432993231A76CC8485D30033DED" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_Goodwill" xlink:label="loc_us-gaap_Goodwill_6FE3E3C88D9BD6B04C4A485D3003FF87" xlink:type="locator" />
    <link:definitionArc order="15" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LossContingenciesLineItems_8A9039820F09B7AAF786485D3003F7AC" xlink:to="loc_us-gaap_Goodwill_6FE3E3C88D9BD6B04C4A485D3003FF87" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.codexis.com/role/CapitalStock" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/CapitalStockTextualDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/CashEquivalentsAndMarketableSecurities" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesComponentsOfCashEquivalentsAndMarketableSecuritiesDetails" xlink:type="extended">
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_CashEquivalentsAndMarketableSecuritiesLineItems" xlink:label="loc_cdxs_CashEquivalentsAndMarketableSecuritiesLineItems_44EB127E5A995CCA804A5B02C3FB45E6" xlink:type="locator" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_ScheduleOfCashEquivalentsAndMarketableSecuritiesTable" xlink:label="loc_cdxs_ScheduleOfCashEquivalentsAndMarketableSecuritiesTable_FA8864817C6057C3B7FC444998C35C48" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_cdxs_CashEquivalentsAndMarketableSecuritiesLineItems_44EB127E5A995CCA804A5B02C3FB45E6" xlink:to="loc_cdxs_ScheduleOfCashEquivalentsAndMarketableSecuritiesTable_FA8864817C6057C3B7FC444998C35C48" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CashAndCashEquivalentsAxis" xlink:label="loc_us-gaap_CashAndCashEquivalentsAxis_74A825D16AF95B55B9F43E23464F6CB0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_cdxs_ScheduleOfCashEquivalentsAndMarketableSecuritiesTable_FA8864817C6057C3B7FC444998C35C48" xlink:to="loc_us-gaap_CashAndCashEquivalentsAxis_74A825D16AF95B55B9F43E23464F6CB0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestrictedCashAndCashEquivalentsCashAndCashEquivalentsMember" xlink:label="loc_us-gaap_RestrictedCashAndCashEquivalentsCashAndCashEquivalentsMember_B70697F8DB90D7F1CC4985CFC4963312_20900B910BF6590881153FB371F47846" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_CashAndCashEquivalentsAxis_74A825D16AF95B55B9F43E23464F6CB0" xlink:to="loc_us-gaap_RestrictedCashAndCashEquivalentsCashAndCashEquivalentsMember_B70697F8DB90D7F1CC4985CFC4963312_20900B910BF6590881153FB371F47846" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestrictedCashAndCashEquivalentsCashAndCashEquivalentsMember" xlink:label="loc_us-gaap_RestrictedCashAndCashEquivalentsCashAndCashEquivalentsMember_4BF0AF1280495F689D1C8CBC5E161EE9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_CashAndCashEquivalentsAxis_74A825D16AF95B55B9F43E23464F6CB0" xlink:to="loc_us-gaap_RestrictedCashAndCashEquivalentsCashAndCashEquivalentsMember_4BF0AF1280495F689D1C8CBC5E161EE9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MoneyMarketFundsMember" xlink:label="loc_us-gaap_MoneyMarketFundsMember_FA2964B12C65543E9FA522790D51FC56" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestrictedCashAndCashEquivalentsCashAndCashEquivalentsMember_4BF0AF1280495F689D1C8CBC5E161EE9" xlink:to="loc_us-gaap_MoneyMarketFundsMember_FA2964B12C65543E9FA522790D51FC56" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_CashEquivalentsAndMarketableSecuritiesByTypeAxis" xlink:label="loc_cdxs_CashEquivalentsAndMarketableSecuritiesByTypeAxis_14B953EF145F5BD2BBAE3DF9B64BB76D" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_cdxs_ScheduleOfCashEquivalentsAndMarketableSecuritiesTable_FA8864817C6057C3B7FC444998C35C48" xlink:to="loc_cdxs_CashEquivalentsAndMarketableSecuritiesByTypeAxis_14B953EF145F5BD2BBAE3DF9B64BB76D" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_CashEquivalentsAndMarketableSecuritiesDomain" xlink:label="loc_cdxs_CashEquivalentsAndMarketableSecuritiesDomain_6C3BCCFFA44F9F08D10985CFC496D495_20900B910BF6590881153FB371F47846" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_cdxs_CashEquivalentsAndMarketableSecuritiesByTypeAxis_14B953EF145F5BD2BBAE3DF9B64BB76D" xlink:to="loc_cdxs_CashEquivalentsAndMarketableSecuritiesDomain_6C3BCCFFA44F9F08D10985CFC496D495_20900B910BF6590881153FB371F47846" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_CashEquivalentsAndMarketableSecuritiesDomain" xlink:label="loc_cdxs_CashEquivalentsAndMarketableSecuritiesDomain_2A1CF950253F57E1B846AD3892FFA683" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_cdxs_CashEquivalentsAndMarketableSecuritiesByTypeAxis_14B953EF145F5BD2BBAE3DF9B64BB76D" xlink:to="loc_cdxs_CashEquivalentsAndMarketableSecuritiesDomain_2A1CF950253F57E1B846AD3892FFA683" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_CommonSharesOfCoTwoSolutionMember" xlink:label="loc_cdxs_CommonSharesOfCoTwoSolutionMember_C476E6F5284D51728EAEB109A6355A6E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_CashEquivalentsAndMarketableSecuritiesDomain_2A1CF950253F57E1B846AD3892FFA683" xlink:to="loc_cdxs_CommonSharesOfCoTwoSolutionMember_C476E6F5284D51728EAEB109A6355A6E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AvailableForSaleSecuritiesAmortizedCost" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesAmortizedCost_EDB8E7C88224514892DDE95C843D3966" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_CashEquivalentsAndMarketableSecuritiesLineItems_44EB127E5A995CCA804A5B02C3FB45E6" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesAmortizedCost_EDB8E7C88224514892DDE95C843D3966" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AvailableForSaleSecuritiesAccumulatedGrossUnrealizedGainBeforeTax" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_86AB35E36EFB5CDDA2FB146164924A71" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_CashEquivalentsAndMarketableSecuritiesLineItems_44EB127E5A995CCA804A5B02C3FB45E6" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_86AB35E36EFB5CDDA2FB146164924A71" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AvailableForSaleSecuritiesAccumulatedGrossUnrealizedLossBeforeTax" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_6AC4C6515E07559DA63C348BB7B455C8" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_CashEquivalentsAndMarketableSecuritiesLineItems_44EB127E5A995CCA804A5B02C3FB45E6" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_6AC4C6515E07559DA63C348BB7B455C8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CashCashEquivalentsAndShortTermInvestments" xlink:label="loc_us-gaap_CashCashEquivalentsAndShortTermInvestments_C2CABEF213E45FE0A8195BCD161E2EA3" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_CashEquivalentsAndMarketableSecuritiesLineItems_44EB127E5A995CCA804A5B02C3FB45E6" xlink:to="loc_us-gaap_CashCashEquivalentsAndShortTermInvestments_C2CABEF213E45FE0A8195BCD161E2EA3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AvailableforsaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions1" xlink:label="loc_us-gaap_AvailableforsaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions1_0101FE26E305518C8D16AADB609C3B9D" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_CashEquivalentsAndMarketableSecuritiesLineItems_44EB127E5A995CCA804A5B02C3FB45E6" xlink:to="loc_us-gaap_AvailableforsaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions1_0101FE26E305518C8D16AADB609C3B9D" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.codexis.com/role/CashEquivalentsAndMarketableSecuritiesTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/CollaborativeArrangements" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/CollaborativeArrangementsTextualDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CollaborativeArrangementsAndNoncollaborativeArrangementTransactionsLineItems" xlink:label="loc_us-gaap_CollaborativeArrangementsAndNoncollaborativeArrangementTransactionsLineItems_40E02683B40FFA86482041877962C757" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfCollaborativeArrangementsAndNoncollaborativeArrangementTransactionsTable" xlink:label="loc_us-gaap_ScheduleOfCollaborativeArrangementsAndNoncollaborativeArrangementTransactionsTable_2210815B4F49EB0AB20641877961C480" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_CollaborativeArrangementsAndNoncollaborativeArrangementTransactionsLineItems_40E02683B40FFA86482041877962C757" xlink:to="loc_us-gaap_ScheduleOfCollaborativeArrangementsAndNoncollaborativeArrangementTransactionsTable_2210815B4F49EB0AB20641877961C480" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeAxis" xlink:label="loc_us-gaap_RangeAxis_67296B43E64298704C1B41877961B962" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfCollaborativeArrangementsAndNoncollaborativeArrangementTransactionsTable_2210815B4F49EB0AB20641877961C480" xlink:to="loc_us-gaap_RangeAxis_67296B43E64298704C1B41877961B962" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_E0D4E7D7D1D6FE3CCA5F41877961DAB9_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RangeAxis_67296B43E64298704C1B41877961B962" xlink:to="loc_us-gaap_RangeMember_E0D4E7D7D1D6FE3CCA5F41877961DAB9_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_E0D4E7D7D1D6FE3CCA5F41877961DAB9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RangeAxis_67296B43E64298704C1B41877961B962" xlink:to="loc_us-gaap_RangeMember_E0D4E7D7D1D6FE3CCA5F41877961DAB9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MinimumMember" xlink:label="loc_us-gaap_MinimumMember_2158348BEAC2693BD46A418779617F48" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_E0D4E7D7D1D6FE3CCA5F41877961DAB9" xlink:to="loc_us-gaap_MinimumMember_2158348BEAC2693BD46A418779617F48" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MaximumMember" xlink:label="loc_us-gaap_MaximumMember_FE716174FF5EC54249DD41877961A8BF" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_E0D4E7D7D1D6FE3CCA5F41877961DAB9" xlink:to="loc_us-gaap_MaximumMember_FE716174FF5EC54249DD41877961A8BF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CapitalizedCostsOfUnprovedPropertiesExcludedFromAmortizationByPropertyOrProjectAxis" xlink:label="loc_us-gaap_CapitalizedCostsOfUnprovedPropertiesExcludedFromAmortizationByPropertyOrProjectAxis_945C4D5D68F260B2081941877961FBFD" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfCollaborativeArrangementsAndNoncollaborativeArrangementTransactionsTable_2210815B4F49EB0AB20641877961C480" xlink:to="loc_us-gaap_CapitalizedCostsOfUnprovedPropertiesExcludedFromAmortizationByPropertyOrProjectAxis_945C4D5D68F260B2081941877961FBFD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ProjectMember" xlink:label="loc_us-gaap_ProjectMember_E184B3D7FD9C556CB88C418779616F2D_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_CapitalizedCostsOfUnprovedPropertiesExcludedFromAmortizationByPropertyOrProjectAxis_945C4D5D68F260B2081941877961FBFD" xlink:to="loc_us-gaap_ProjectMember_E184B3D7FD9C556CB88C418779616F2D_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ProjectMember" xlink:label="loc_us-gaap_ProjectMember_E184B3D7FD9C556CB88C418779616F2D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_CapitalizedCostsOfUnprovedPropertiesExcludedFromAmortizationByPropertyOrProjectAxis_945C4D5D68F260B2081941877961FBFD" xlink:to="loc_us-gaap_ProjectMember_E184B3D7FD9C556CB88C418779616F2D" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_TherapeuticDevelopmentProgramMember" xlink:label="loc_cdxs_TherapeuticDevelopmentProgramMember_3BB1FE5A2A3C56FFAE3F41877961194B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ProjectMember_E184B3D7FD9C556CB88C418779616F2D" xlink:to="loc_cdxs_TherapeuticDevelopmentProgramMember_3BB1FE5A2A3C56FFAE3F41877961194B" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_GlobalDevelopmentOptionandLicenseAgreementMember" xlink:label="loc_cdxs_GlobalDevelopmentOptionandLicenseAgreementMember_611C5C2544537BF014C641877961F6A2" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ProjectMember_E184B3D7FD9C556CB88C418779616F2D" xlink:to="loc_cdxs_GlobalDevelopmentOptionandLicenseAgreementMember_611C5C2544537BF014C641877961F6A2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TypeOfArrangementAxis" xlink:label="loc_us-gaap_TypeOfArrangementAxis_87B566AD684494B8939D41877961450E" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfCollaborativeArrangementsAndNoncollaborativeArrangementTransactionsTable_2210815B4F49EB0AB20641877961C480" xlink:to="loc_us-gaap_TypeOfArrangementAxis_87B566AD684494B8939D41877961450E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ArrangementsAndNonarrangementTransactionsMember" xlink:label="loc_us-gaap_ArrangementsAndNonarrangementTransactionsMember_D86D5D044EAD3D15F5F941877961F3F0_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_TypeOfArrangementAxis_87B566AD684494B8939D41877961450E" xlink:to="loc_us-gaap_ArrangementsAndNonarrangementTransactionsMember_D86D5D044EAD3D15F5F941877961F3F0_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ArrangementsAndNonarrangementTransactionsMember" xlink:label="loc_us-gaap_ArrangementsAndNonarrangementTransactionsMember_D86D5D044EAD3D15F5F941877961F3F0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_TypeOfArrangementAxis_87B566AD684494B8939D41877961450E" xlink:to="loc_us-gaap_ArrangementsAndNonarrangementTransactionsMember_D86D5D044EAD3D15F5F941877961F3F0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CollaborativeArrangementMember" xlink:label="loc_us-gaap_CollaborativeArrangementMember_B4BC3F86E85C7DE749F74187796171FC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ArrangementsAndNonarrangementTransactionsMember_D86D5D044EAD3D15F5F941877961F3F0" xlink:to="loc_us-gaap_CollaborativeArrangementMember_B4BC3F86E85C7DE749F74187796171FC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CounterpartyNameAxis" xlink:label="loc_us-gaap_CounterpartyNameAxis_D7958536F1665763848E4187796146AE" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfCollaborativeArrangementsAndNoncollaborativeArrangementTransactionsTable_2210815B4F49EB0AB20641877961C480" xlink:to="loc_us-gaap_CounterpartyNameAxis_D7958536F1665763848E4187796146AE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RepurchaseAgreementCounterpartyNameDomain" xlink:label="loc_us-gaap_RepurchaseAgreementCounterpartyNameDomain_2276B633C554C340BD8141877962532B_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_CounterpartyNameAxis_D7958536F1665763848E4187796146AE" xlink:to="loc_us-gaap_RepurchaseAgreementCounterpartyNameDomain_2276B633C554C340BD8141877962532B_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RepurchaseAgreementCounterpartyNameDomain" xlink:label="loc_us-gaap_RepurchaseAgreementCounterpartyNameDomain_2276B633C554C340BD8141877962532B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_CounterpartyNameAxis_D7958536F1665763848E4187796146AE" xlink:to="loc_us-gaap_RepurchaseAgreementCounterpartyNameDomain_2276B633C554C340BD8141877962532B" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_MerckMember" xlink:label="loc_cdxs_MerckMember_28FC03587612CF818766418779625D0F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RepurchaseAgreementCounterpartyNameDomain_2276B633C554C340BD8141877962532B" xlink:to="loc_cdxs_MerckMember_28FC03587612CF818766418779625D0F" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_FineChemicalCustomerMember" xlink:label="loc_cdxs_FineChemicalCustomerMember_32B493DCFF10C0D422E241877962C937" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RepurchaseAgreementCounterpartyNameDomain_2276B633C554C340BD8141877962532B" xlink:to="loc_cdxs_FineChemicalCustomerMember_32B493DCFF10C0D422E241877962C937" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_NestecLtd.NestleHealthSciencesMember" xlink:label="loc_cdxs_NestecLtd.NestleHealthSciencesMember_5C2662C3172656864426418779624C05" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RepurchaseAgreementCounterpartyNameDomain_2276B633C554C340BD8141877962532B" xlink:to="loc_cdxs_NestecLtd.NestleHealthSciencesMember_5C2662C3172656864426418779624C05" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_AgreementTypeAxis" xlink:label="loc_cdxs_AgreementTypeAxis_67574F664E744120F4A7418779627CBD" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfCollaborativeArrangementsAndNoncollaborativeArrangementTransactionsTable_2210815B4F49EB0AB20641877961C480" xlink:to="loc_cdxs_AgreementTypeAxis_67574F664E744120F4A7418779627CBD" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_AgreementTypeDomain" xlink:label="loc_cdxs_AgreementTypeDomain_E164971EFD112017FF07418779625357_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_cdxs_AgreementTypeAxis_67574F664E744120F4A7418779627CBD" xlink:to="loc_cdxs_AgreementTypeDomain_E164971EFD112017FF07418779625357_default" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_AgreementTypeDomain" xlink:label="loc_cdxs_AgreementTypeDomain_E164971EFD112017FF07418779625357" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_cdxs_AgreementTypeAxis_67574F664E744120F4A7418779627CBD" xlink:to="loc_cdxs_AgreementTypeDomain_E164971EFD112017FF07418779625357" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_TechnologyTransferCollaborationandLicenseAgreementMember" xlink:label="loc_cdxs_TechnologyTransferCollaborationandLicenseAgreementMember_B73C9B3C653459BC4E0941877962F3BB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_AgreementTypeDomain_E164971EFD112017FF07418779625357" xlink:to="loc_cdxs_TechnologyTransferCollaborationandLicenseAgreementMember_B73C9B3C653459BC4E0941877962F3BB" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_SupplyAgreementMember" xlink:label="loc_cdxs_SupplyAgreementMember_83BD784F8F3BBBB60D9841877962DC07" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_AgreementTypeDomain_E164971EFD112017FF07418779625357" xlink:to="loc_cdxs_SupplyAgreementMember_83BD784F8F3BBBB60D9841877962DC07" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_ResearchandDevelopmentAgreementMember" xlink:label="loc_cdxs_ResearchandDevelopmentAgreementMember_332DD648506F24C657C0418779626A3B" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_AgreementTypeDomain_E164971EFD112017FF07418779625357" xlink:to="loc_cdxs_ResearchandDevelopmentAgreementMember_332DD648506F24C657C0418779626A3B" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_SalesBasedMilestoneMember" xlink:label="loc_cdxs_SalesBasedMilestoneMember_AF93D01F671C69B46C3C418779626FC6" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_AgreementTypeDomain_E164971EFD112017FF07418779625357" xlink:to="loc_cdxs_SalesBasedMilestoneMember_AF93D01F671C69B46C3C418779626FC6" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_LicenseRevenueContingentReceivables" xlink:label="loc_cdxs_LicenseRevenueContingentReceivables_DA68F72CBD1700A482984187796204C1" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CollaborativeArrangementsAndNoncollaborativeArrangementTransactionsLineItems_40E02683B40FFA86482041877962C757" xlink:to="loc_cdxs_LicenseRevenueContingentReceivables_DA68F72CBD1700A482984187796204C1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ProceedsFromLicenseFeesReceived" xlink:label="loc_us-gaap_ProceedsFromLicenseFeesReceived_F876004CFCC47627815D41877962DF0A" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CollaborativeArrangementsAndNoncollaborativeArrangementTransactionsLineItems_40E02683B40FFA86482041877962C757" xlink:to="loc_us-gaap_ProceedsFromLicenseFeesReceived_F876004CFCC47627815D41877962DF0A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RevenueRecognitionMilestoneMethodRevenueRecognized" xlink:label="loc_us-gaap_RevenueRecognitionMilestoneMethodRevenueRecognized_92F58777BDD3D37C724D418779622863" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CollaborativeArrangementsAndNoncollaborativeArrangementTransactionsLineItems_40E02683B40FFA86482041877962C757" xlink:to="loc_us-gaap_RevenueRecognitionMilestoneMethodRevenueRecognized_92F58777BDD3D37C724D418779622863" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_RevenueRecognitionMilestoneMethodAdditionalMilestonesMaximumMilestoneReceivable" xlink:label="loc_cdxs_RevenueRecognitionMilestoneMethodAdditionalMilestonesMaximumMilestoneReceivable_E7B83EA074D0F43F2B654187796282E4" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CollaborativeArrangementsAndNoncollaborativeArrangementTransactionsLineItems_40E02683B40FFA86482041877962C757" xlink:to="loc_cdxs_RevenueRecognitionMilestoneMethodAdditionalMilestonesMaximumMilestoneReceivable_E7B83EA074D0F43F2B654187796282E4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LicenseAndServicesRevenue" xlink:label="loc_us-gaap_LicenseAndServicesRevenue_8C4A4EEC9F55196EC6FE4187796318B8" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CollaborativeArrangementsAndNoncollaborativeArrangementTransactionsLineItems_40E02683B40FFA86482041877962C757" xlink:to="loc_us-gaap_LicenseAndServicesRevenue_8C4A4EEC9F55196EC6FE4187796318B8" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_TermOfCollaborativeResearchAndDevelopmentAgreement" xlink:label="loc_cdxs_TermOfCollaborativeResearchAndDevelopmentAgreement_3E252EC9204CCEA74DDB418779637A5E" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CollaborativeArrangementsAndNoncollaborativeArrangementTransactionsLineItems_40E02683B40FFA86482041877962C757" xlink:to="loc_cdxs_TermOfCollaborativeResearchAndDevelopmentAgreement_3E252EC9204CCEA74DDB418779637A5E" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_CollaborativeResearchandDevelopmentAgreementOptionalExtensionPeriod" xlink:label="loc_cdxs_CollaborativeResearchandDevelopmentAgreementOptionalExtensionPeriod_4E9F3654A00C2B240E64418779639273" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CollaborativeArrangementsAndNoncollaborativeArrangementTransactionsLineItems_40E02683B40FFA86482041877962C757" xlink:to="loc_cdxs_CollaborativeResearchandDevelopmentAgreementOptionalExtensionPeriod_4E9F3654A00C2B240E64418779639273" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DeferredRevenue" xlink:label="loc_us-gaap_DeferredRevenue_164737CFCD9F8F9CC2E141877963A877" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CollaborativeArrangementsAndNoncollaborativeArrangementTransactionsLineItems_40E02683B40FFA86482041877962C757" xlink:to="loc_us-gaap_DeferredRevenue_164737CFCD9F8F9CC2E141877963A877" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SalesRevenueGoodsNet" xlink:label="loc_us-gaap_SalesRevenueGoodsNet_B7913DF0366E9CF5A05241877963829E" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CollaborativeArrangementsAndNoncollaborativeArrangementTransactionsLineItems_40E02683B40FFA86482041877962C757" xlink:to="loc_us-gaap_SalesRevenueGoodsNet_B7913DF0366E9CF5A05241877963829E" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_RevenueRecognitionMilestoneRevenue" xlink:label="loc_cdxs_RevenueRecognitionMilestoneRevenue_FEE202628714988450BF41877963A089" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CollaborativeArrangementsAndNoncollaborativeArrangementTransactionsLineItems_40E02683B40FFA86482041877962C757" xlink:to="loc_cdxs_RevenueRecognitionMilestoneRevenue_FEE202628714988450BF41877963A089" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ResearchAndDevelopmentArrangementContractToPerformForOthersCompensationEarned" xlink:label="loc_us-gaap_ResearchAndDevelopmentArrangementContractToPerformForOthersCompensationEarned_11789DB4BE1C4741BDEA4187796371D1" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CollaborativeArrangementsAndNoncollaborativeArrangementTransactionsLineItems_40E02683B40FFA86482041877962C757" xlink:to="loc_us-gaap_ResearchAndDevelopmentArrangementContractToPerformForOthersCompensationEarned_11789DB4BE1C4741BDEA4187796371D1" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_RevenueRecognitionProgressPaymentAmount" xlink:label="loc_cdxs_RevenueRecognitionProgressPaymentAmount_FCC7BBE9F826F8496F9441877963CFFB" xlink:type="locator" />
    <link:definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CollaborativeArrangementsAndNoncollaborativeArrangementTransactionsLineItems_40E02683B40FFA86482041877962C757" xlink:to="loc_cdxs_RevenueRecognitionProgressPaymentAmount_FCC7BBE9F826F8496F9441877963CFFB" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_RevenueRecognitionEventofCounterpartyExercisingAlternativeOption" xlink:label="loc_cdxs_RevenueRecognitionEventofCounterpartyExercisingAlternativeOption_74A94A595B104B10B5D54187796375B1" xlink:type="locator" />
    <link:definitionArc order="13" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CollaborativeArrangementsAndNoncollaborativeArrangementTransactionsLineItems_40E02683B40FFA86482041877962C757" xlink:to="loc_cdxs_RevenueRecognitionEventofCounterpartyExercisingAlternativeOption_74A94A595B104B10B5D54187796375B1" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_RevenueRecognitionDurationtoPayAfterLicenseEffectiveDate" xlink:label="loc_cdxs_RevenueRecognitionDurationtoPayAfterLicenseEffectiveDate_8BA836CB407C0E224CA04187796342EF" xlink:type="locator" />
    <link:definitionArc order="14" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CollaborativeArrangementsAndNoncollaborativeArrangementTransactionsLineItems_40E02683B40FFA86482041877962C757" xlink:to="loc_cdxs_RevenueRecognitionDurationtoPayAfterLicenseEffectiveDate_8BA836CB407C0E224CA04187796342EF" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_RevenueRecognitionTargetSalesforSalesMilestone" xlink:label="loc_cdxs_RevenueRecognitionTargetSalesforSalesMilestone_5BCDE1E4E15C7C71E9D6418779632F30" xlink:type="locator" />
    <link:definitionArc order="15" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CollaborativeArrangementsAndNoncollaborativeArrangementTransactionsLineItems_40E02683B40FFA86482041877962C757" xlink:to="loc_cdxs_RevenueRecognitionTargetSalesforSalesMilestone_5BCDE1E4E15C7C71E9D6418779632F30" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DeferredRevenueCurrent" xlink:label="loc_us-gaap_DeferredRevenueCurrent_4F38675F93B68CD910D2418779630BFB" xlink:type="locator" />
    <link:definitionArc order="16" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CollaborativeArrangementsAndNoncollaborativeArrangementTransactionsLineItems_40E02683B40FFA86482041877962C757" xlink:to="loc_us-gaap_DeferredRevenueCurrent_4F38675F93B68CD910D2418779630BFB" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.codexis.com/role/CommitmentsAndContingencies" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/CommitmentsAndContingenciesOtherCommitmentsDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherCommitmentsLineItems" xlink:label="loc_us-gaap_OtherCommitmentsLineItems_B0B825F6783BF1982DB0D42F3DF26C10" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherCommitmentsTable" xlink:label="loc_us-gaap_OtherCommitmentsTable_9056D42E79A8457D00F3D42F3DF11F94" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_OtherCommitmentsLineItems_B0B825F6783BF1982DB0D42F3DF26C10" xlink:to="loc_us-gaap_OtherCommitmentsTable_9056D42E79A8457D00F3D42F3DF11F94" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_AgreementDateAxis" xlink:label="loc_cdxs_AgreementDateAxis_94497C651200FA7762A9D42F3DF1DF03" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_OtherCommitmentsTable_9056D42E79A8457D00F3D42F3DF11F94" xlink:to="loc_cdxs_AgreementDateAxis_94497C651200FA7762A9D42F3DF1DF03" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_AgreementDateDomain" xlink:label="loc_cdxs_AgreementDateDomain_45CC04AF10EBC9FFC330D42F3DF1972A_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_cdxs_AgreementDateAxis_94497C651200FA7762A9D42F3DF1DF03" xlink:to="loc_cdxs_AgreementDateDomain_45CC04AF10EBC9FFC330D42F3DF1972A_default" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_AgreementDateDomain" xlink:label="loc_cdxs_AgreementDateDomain_45CC04AF10EBC9FFC330D42F3DF1972A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_cdxs_AgreementDateAxis_94497C651200FA7762A9D42F3DF1DF03" xlink:to="loc_cdxs_AgreementDateDomain_45CC04AF10EBC9FFC330D42F3DF1972A" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_April2016Member" xlink:label="loc_cdxs_April2016Member_5774497B599E9F1F7303D42F3DF27A4C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_AgreementDateDomain_45CC04AF10EBC9FFC330D42F3DF1972A" xlink:to="loc_cdxs_April2016Member_5774497B599E9F1F7303D42F3DF27A4C" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_April2017Member" xlink:label="loc_cdxs_April2017Member_84641E1446C2CF8F2436D42F3DF29D5D" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_AgreementDateDomain_45CC04AF10EBC9FFC330D42F3DF1972A" xlink:to="loc_cdxs_April2017Member_84641E1446C2CF8F2436D42F3DF29D5D" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_July2017Member" xlink:label="loc_cdxs_July2017Member_1B00B203F407856812EDD42F3DF222F1" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_AgreementDateDomain_45CC04AF10EBC9FFC330D42F3DF1972A" xlink:to="loc_cdxs_July2017Member_1B00B203F407856812EDD42F3DF222F1" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_December2017Member" xlink:label="loc_cdxs_December2017Member_081108703B6DC3481C18D45BD56BAF58" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_AgreementDateDomain_45CC04AF10EBC9FFC330D42F3DF1972A" xlink:to="loc_cdxs_December2017Member_081108703B6DC3481C18D45BD56BAF58" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SupplyCommitmentAxis" xlink:label="loc_us-gaap_SupplyCommitmentAxis_862ED533E29794BE4E76D42F3DF2F6CD" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_OtherCommitmentsTable_9056D42E79A8457D00F3D42F3DF11F94" xlink:to="loc_us-gaap_SupplyCommitmentAxis_862ED533E29794BE4E76D42F3DF2F6CD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SupplyCommitmentArrangementMember" xlink:label="loc_us-gaap_SupplyCommitmentArrangementMember_3B4C9A40403D4370BE1DD42F3DF2E258_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_SupplyCommitmentAxis_862ED533E29794BE4E76D42F3DF2F6CD" xlink:to="loc_us-gaap_SupplyCommitmentArrangementMember_3B4C9A40403D4370BE1DD42F3DF2E258_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SupplyCommitmentArrangementMember" xlink:label="loc_us-gaap_SupplyCommitmentArrangementMember_3B4C9A40403D4370BE1DD42F3DF2E258" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_SupplyCommitmentAxis_862ED533E29794BE4E76D42F3DF2F6CD" xlink:to="loc_us-gaap_SupplyCommitmentArrangementMember_3B4C9A40403D4370BE1DD42F3DF2E258" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SupplyCommitmentMember" xlink:label="loc_us-gaap_SupplyCommitmentMember_33576F1786411F60A684D42F3DF22D36" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SupplyCommitmentArrangementMember_3B4C9A40403D4370BE1DD42F3DF2E258" xlink:to="loc_us-gaap_SupplyCommitmentMember_33576F1786411F60A684D42F3DF22D36" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SignificantSupplyCommitmentRemainingMinimumAmountCommitted" xlink:label="loc_us-gaap_SignificantSupplyCommitmentRemainingMinimumAmountCommitted_FDD0C33E319063AAED8AD42F3DF20A9A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherCommitmentsLineItems_B0B825F6783BF1982DB0D42F3DF26C10" xlink:to="loc_us-gaap_SignificantSupplyCommitmentRemainingMinimumAmountCommitted_FDD0C33E319063AAED8AD42F3DF20A9A" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.codexis.com/role/CommitmentsAndContingenciesTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/CommitmentsAndContingenciesTextualDetails" xlink:type="extended">
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_CommitmentsAndContingenciesLineItems" xlink:label="loc_cdxs_CommitmentsAndContingenciesLineItems_6B1610F4596803E8E0431849119E1F4D" xlink:type="locator" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_ScheduleOfCommitmentsAndContingenciesTable" xlink:label="loc_cdxs_ScheduleOfCommitmentsAndContingenciesTable_1403099F48151DC15AA41849119D7B3B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_cdxs_CommitmentsAndContingenciesLineItems_6B1610F4596803E8E0431849119E1F4D" xlink:to="loc_cdxs_ScheduleOfCommitmentsAndContingenciesTable_1403099F48151DC15AA41849119D7B3B" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LossContingenciesByNatureOfContingencyAxis" xlink:label="loc_us-gaap_LossContingenciesByNatureOfContingencyAxis_3D0D788EE6ACE60BB3F61849119DDD9B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_cdxs_ScheduleOfCommitmentsAndContingenciesTable_1403099F48151DC15AA41849119D7B3B" xlink:to="loc_us-gaap_LossContingenciesByNatureOfContingencyAxis_3D0D788EE6ACE60BB3F61849119DDD9B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LossContingencyNatureDomain" xlink:label="loc_us-gaap_LossContingencyNatureDomain_5E9AA58D189E3A9760A21849119D0911_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LossContingenciesByNatureOfContingencyAxis_3D0D788EE6ACE60BB3F61849119DDD9B" xlink:to="loc_us-gaap_LossContingencyNatureDomain_5E9AA58D189E3A9760A21849119D0911_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LossContingencyNatureDomain" xlink:label="loc_us-gaap_LossContingencyNatureDomain_5E9AA58D189E3A9760A21849119D0911" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LossContingenciesByNatureOfContingencyAxis_3D0D788EE6ACE60BB3F61849119DDD9B" xlink:to="loc_us-gaap_LossContingencyNatureDomain_5E9AA58D189E3A9760A21849119D0911" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StandbyLettersOfCreditMember" xlink:label="loc_us-gaap_StandbyLettersOfCreditMember_72AEA145A5E9C8C413061849119D080F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LossContingencyNatureDomain_5E9AA58D189E3A9760A21849119D0911" xlink:to="loc_us-gaap_StandbyLettersOfCreditMember_72AEA145A5E9C8C413061849119D080F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IndemnificationGuaranteeMember" xlink:label="loc_us-gaap_IndemnificationGuaranteeMember_36530182D36EE0F6A5601849119D4401" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LossContingencyNatureDomain_5E9AA58D189E3A9760A21849119D0911" xlink:to="loc_us-gaap_IndemnificationGuaranteeMember_36530182D36EE0F6A5601849119D4401" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_VariableRateAxis" xlink:label="loc_us-gaap_VariableRateAxis_BD2D0743059577C1AD6E1849119D4E18" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_cdxs_ScheduleOfCommitmentsAndContingenciesTable_1403099F48151DC15AA41849119D7B3B" xlink:to="loc_us-gaap_VariableRateAxis_BD2D0743059577C1AD6E1849119D4E18" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_VariableRateDomain" xlink:label="loc_us-gaap_VariableRateDomain_CA7B24A87AD49CD2C0A91849119D2B13_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_VariableRateAxis_BD2D0743059577C1AD6E1849119D4E18" xlink:to="loc_us-gaap_VariableRateDomain_CA7B24A87AD49CD2C0A91849119D2B13_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_VariableRateDomain" xlink:label="loc_us-gaap_VariableRateDomain_CA7B24A87AD49CD2C0A91849119D2B13" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_VariableRateAxis_BD2D0743059577C1AD6E1849119D4E18" xlink:to="loc_us-gaap_VariableRateDomain_CA7B24A87AD49CD2C0A91849119D2B13" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LondonInterbankOfferedRateLIBORMember" xlink:label="loc_us-gaap_LondonInterbankOfferedRateLIBORMember_AE11E4400A83668EDFC11849119D6D5A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_VariableRateDomain_CA7B24A87AD49CD2C0A91849119D2B13" xlink:to="loc_us-gaap_LondonInterbankOfferedRateLIBORMember_AE11E4400A83668EDFC11849119D6D5A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PrimeRateMember" xlink:label="loc_us-gaap_PrimeRateMember_7093A668EFF3CBEA766C1849119E7804" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_VariableRateDomain_CA7B24A87AD49CD2C0A91849119D2B13" xlink:to="loc_us-gaap_PrimeRateMember_7093A668EFF3CBEA766C1849119E7804" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CreditFacilityAxis" xlink:label="loc_us-gaap_CreditFacilityAxis_5344C8FDEC87EECF55201849119EA12C" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_cdxs_ScheduleOfCommitmentsAndContingenciesTable_1403099F48151DC15AA41849119D7B3B" xlink:to="loc_us-gaap_CreditFacilityAxis_5344C8FDEC87EECF55201849119EA12C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CreditFacilityDomain" xlink:label="loc_us-gaap_CreditFacilityDomain_34397D5A8BAAEB3965091849119E032D_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_CreditFacilityAxis_5344C8FDEC87EECF55201849119EA12C" xlink:to="loc_us-gaap_CreditFacilityDomain_34397D5A8BAAEB3965091849119E032D_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CreditFacilityDomain" xlink:label="loc_us-gaap_CreditFacilityDomain_34397D5A8BAAEB3965091849119E032D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_CreditFacilityAxis_5344C8FDEC87EECF55201849119EA12C" xlink:to="loc_us-gaap_CreditFacilityDomain_34397D5A8BAAEB3965091849119E032D" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_TermLoanMember" xlink:label="loc_cdxs_TermLoanMember_131570763A379E8747961849119E0B3D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CreditFacilityDomain_34397D5A8BAAEB3965091849119E032D" xlink:to="loc_cdxs_TermLoanMember_131570763A379E8747961849119E0B3D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RevolvingCreditFacilityMember" xlink:label="loc_us-gaap_RevolvingCreditFacilityMember_712785B173CA213425651849119E62AA" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CreditFacilityDomain_34397D5A8BAAEB3965091849119E032D" xlink:to="loc_us-gaap_RevolvingCreditFacilityMember_712785B173CA213425651849119E62AA" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_LeasesLocationOfLeasedPropertyAxis" xlink:label="loc_cdxs_LeasesLocationOfLeasedPropertyAxis_4676AC0994EB3AC100B81849119E446E" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_cdxs_ScheduleOfCommitmentsAndContingenciesTable_1403099F48151DC15AA41849119D7B3B" xlink:to="loc_cdxs_LeasesLocationOfLeasedPropertyAxis_4676AC0994EB3AC100B81849119E446E" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_LeasesLocationOfLeasedPropertyDomain" xlink:label="loc_cdxs_LeasesLocationOfLeasedPropertyDomain_BB3BC267AEA1202BF3AB1849119EEBCB_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_cdxs_LeasesLocationOfLeasedPropertyAxis_4676AC0994EB3AC100B81849119E446E" xlink:to="loc_cdxs_LeasesLocationOfLeasedPropertyDomain_BB3BC267AEA1202BF3AB1849119EEBCB_default" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_LeasesLocationOfLeasedPropertyDomain" xlink:label="loc_cdxs_LeasesLocationOfLeasedPropertyDomain_BB3BC267AEA1202BF3AB1849119EEBCB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_cdxs_LeasesLocationOfLeasedPropertyAxis_4676AC0994EB3AC100B81849119E446E" xlink:to="loc_cdxs_LeasesLocationOfLeasedPropertyDomain_BB3BC267AEA1202BF3AB1849119EEBCB" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_HeadquartersRedwoodCityMember" xlink:label="loc_cdxs_HeadquartersRedwoodCityMember_E2254D6C11A1DDE32EA01849119E12D3" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_LeasesLocationOfLeasedPropertyDomain_BB3BC267AEA1202BF3AB1849119EEBCB" xlink:to="loc_cdxs_HeadquartersRedwoodCityMember_E2254D6C11A1DDE32EA01849119E12D3" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_LeasesLeaseAgreementByTypeAxis" xlink:label="loc_cdxs_LeasesLeaseAgreementByTypeAxis_6ADC35A8180DDE4C3A511849119EB1E3" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_cdxs_ScheduleOfCommitmentsAndContingenciesTable_1403099F48151DC15AA41849119D7B3B" xlink:to="loc_cdxs_LeasesLeaseAgreementByTypeAxis_6ADC35A8180DDE4C3A511849119EB1E3" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_LeasesLeaseAgreementByTypeDomain" xlink:label="loc_cdxs_LeasesLeaseAgreementByTypeDomain_0B61EA347BA79DCD4C531849119ECFE0_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_cdxs_LeasesLeaseAgreementByTypeAxis_6ADC35A8180DDE4C3A511849119EB1E3" xlink:to="loc_cdxs_LeasesLeaseAgreementByTypeDomain_0B61EA347BA79DCD4C531849119ECFE0_default" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_LeasesLeaseAgreementByTypeDomain" xlink:label="loc_cdxs_LeasesLeaseAgreementByTypeDomain_0B61EA347BA79DCD4C531849119ECFE0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_cdxs_LeasesLeaseAgreementByTypeAxis_6ADC35A8180DDE4C3A511849119EB1E3" xlink:to="loc_cdxs_LeasesLeaseAgreementByTypeDomain_0B61EA347BA79DCD4C531849119ECFE0" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_SeventhAmendmentMember" xlink:label="loc_cdxs_SeventhAmendmentMember_888DFA24F757350AFC211849119EA5A9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_LeasesLeaseAgreementByTypeDomain_0B61EA347BA79DCD4C531849119ECFE0" xlink:to="loc_cdxs_SeventhAmendmentMember_888DFA24F757350AFC211849119EA5A9" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_FifthAmendmentMember" xlink:label="loc_cdxs_FifthAmendmentMember_2B71BAA8208525783A141849119E10DB" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_LeasesLeaseAgreementByTypeDomain_0B61EA347BA79DCD4C531849119ECFE0" xlink:to="loc_cdxs_FifthAmendmentMember_2B71BAA8208525783A141849119E10DB" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_LeaseAreaSpaceOccupancy" xlink:label="loc_cdxs_LeaseAreaSpaceOccupancy_C2FD44AC63D9DD6E7CEA1849119E8FC0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_CommitmentsAndContingenciesLineItems_6B1610F4596803E8E0431849119E1F4D" xlink:to="loc_cdxs_LeaseAreaSpaceOccupancy_C2FD44AC63D9DD6E7CEA1849119E8FC0" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_LeaseAreaNumberofBuildings" xlink:label="loc_cdxs_LeaseAreaNumberofBuildings_853E12DBBC8D56FFD8481849119EF9AD" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_CommitmentsAndContingenciesLineItems_6B1610F4596803E8E0431849119E1F4D" xlink:to="loc_cdxs_LeaseAreaNumberofBuildings_853E12DBBC8D56FFD8481849119EF9AD" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_WaivedAssetRetirementObligationAndExtendedLeaseTermNumberOfBuildings" xlink:label="loc_cdxs_WaivedAssetRetirementObligationAndExtendedLeaseTermNumberOfBuildings_839BCA1C7312EC7204741849119E6303" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_CommitmentsAndContingenciesLineItems_6B1610F4596803E8E0431849119E1F4D" xlink:to="loc_cdxs_WaivedAssetRetirementObligationAndExtendedLeaseTermNumberOfBuildings_839BCA1C7312EC7204741849119E6303" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PaymentsForCapitalImprovements" xlink:label="loc_us-gaap_PaymentsForCapitalImprovements_E8F8C432D89CE262C1541849119EF4ED" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_CommitmentsAndContingenciesLineItems_6B1610F4596803E8E0431849119E1F4D" xlink:to="loc_us-gaap_PaymentsForCapitalImprovements_E8F8C432D89CE262C1541849119EF4ED" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TenantReimbursements" xlink:label="loc_us-gaap_TenantReimbursements_5892304FF1FD4EEE85531849119EE582" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_CommitmentsAndContingenciesLineItems_6B1610F4596803E8E0431849119E1F4D" xlink:to="loc_us-gaap_TenantReimbursements_5892304FF1FD4EEE85531849119EE582" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncentiveFromLessor" xlink:label="loc_us-gaap_IncentiveFromLessor_E3DB353DD0DCEE8671FA1849119ECDFA" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_CommitmentsAndContingenciesLineItems_6B1610F4596803E8E0431849119E1F4D" xlink:to="loc_us-gaap_IncentiveFromLessor_E3DB353DD0DCEE8671FA1849119ECDFA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AssetRetirementObligation" xlink:label="loc_us-gaap_AssetRetirementObligation_E891BF9E721FAE5420ED1849119F8A70" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_CommitmentsAndContingenciesLineItems_6B1610F4596803E8E0431849119E1F4D" xlink:to="loc_us-gaap_AssetRetirementObligation_E891BF9E721FAE5420ED1849119F8A70" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AssetRetirementObligationAccretionExpense" xlink:label="loc_us-gaap_AssetRetirementObligationAccretionExpense_5BF697CFD09286DA82751849119F476A" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_CommitmentsAndContingenciesLineItems_6B1610F4596803E8E0431849119E1F4D" xlink:to="loc_us-gaap_AssetRetirementObligationAccretionExpense_5BF697CFD09286DA82751849119F476A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestrictedCashAndInvestmentsNoncurrent" xlink:label="loc_us-gaap_RestrictedCashAndInvestmentsNoncurrent_49223B95F6B3410088C31849119F57AF" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_CommitmentsAndContingenciesLineItems_6B1610F4596803E8E0431849119E1F4D" xlink:to="loc_us-gaap_RestrictedCashAndInvestmentsNoncurrent_49223B95F6B3410088C31849119F57AF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LeaseAndRentalExpense" xlink:label="loc_us-gaap_LeaseAndRentalExpense_DA1E96A1E0C022916DA31849119FB387" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_CommitmentsAndContingenciesLineItems_6B1610F4596803E8E0431849119E1F4D" xlink:to="loc_us-gaap_LeaseAndRentalExpense_DA1E96A1E0C022916DA31849119FB387" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OperatingLeasesRentExpenseSubleaseRentals1" xlink:label="loc_us-gaap_OperatingLeasesRentExpenseSubleaseRentals1_EDC645B73DBF230D35C31849119FC99B" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_CommitmentsAndContingenciesLineItems_6B1610F4596803E8E0431849119E1F4D" xlink:to="loc_us-gaap_OperatingLeasesRentExpenseSubleaseRentals1_EDC645B73DBF230D35C31849119FC99B" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_LesseeLeasingArrangementsCapitalLeasesTermofContract" xlink:label="loc_cdxs_LesseeLeasingArrangementsCapitalLeasesTermofContract_1A25C52FCAB4C9CD8ED61849119F707D" xlink:type="locator" />
    <link:definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_CommitmentsAndContingenciesLineItems_6B1610F4596803E8E0431849119E1F4D" xlink:to="loc_cdxs_LesseeLeasingArrangementsCapitalLeasesTermofContract_1A25C52FCAB4C9CD8ED61849119F707D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CapitalLeaseObligationsIncurred" xlink:label="loc_us-gaap_CapitalLeaseObligationsIncurred_0CDD6E1768CE3410073B1849119F7D59" xlink:type="locator" />
    <link:definitionArc order="13" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_CommitmentsAndContingenciesLineItems_6B1610F4596803E8E0431849119E1F4D" xlink:to="loc_us-gaap_CapitalLeaseObligationsIncurred_0CDD6E1768CE3410073B1849119F7D59" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OperatingLeasesFutureMinimumPaymentsDueFutureMinimumSubleaseRentals" xlink:label="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDueFutureMinimumSubleaseRentals_E0E5BE243B6285C0BA691849119F579F" xlink:type="locator" />
    <link:definitionArc order="14" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_CommitmentsAndContingenciesLineItems_6B1610F4596803E8E0431849119E1F4D" xlink:to="loc_us-gaap_OperatingLeasesFutureMinimumPaymentsDueFutureMinimumSubleaseRentals_E0E5BE243B6285C0BA691849119F579F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LineOfCreditFacilityCurrentBorrowingCapacity" xlink:label="loc_us-gaap_LineOfCreditFacilityCurrentBorrowingCapacity_A0C94AD380EDEEC354611849119F38C4" xlink:type="locator" />
    <link:definitionArc order="15" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_CommitmentsAndContingenciesLineItems_6B1610F4596803E8E0431849119E1F4D" xlink:to="loc_us-gaap_LineOfCreditFacilityCurrentBorrowingCapacity_A0C94AD380EDEEC354611849119F38C4" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_LineofCreditFacilityAccountsReceivableBorrowingBasePercentage" xlink:label="loc_cdxs_LineofCreditFacilityAccountsReceivableBorrowingBasePercentage_B7B5A337B709BBC631D91849119F071F" xlink:type="locator" />
    <link:definitionArc order="16" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_CommitmentsAndContingenciesLineItems_6B1610F4596803E8E0431849119E1F4D" xlink:to="loc_cdxs_LineofCreditFacilityAccountsReceivableBorrowingBasePercentage_B7B5A337B709BBC631D91849119F071F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentBasisSpreadOnVariableRate1" xlink:label="loc_us-gaap_DebtInstrumentBasisSpreadOnVariableRate1_5775D176145219AF22061849119F65E7" xlink:type="locator" />
    <link:definitionArc order="17" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_CommitmentsAndContingenciesLineItems_6B1610F4596803E8E0431849119E1F4D" xlink:to="loc_us-gaap_DebtInstrumentBasisSpreadOnVariableRate1_5775D176145219AF22061849119F65E7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentInterestRateStatedPercentage" xlink:label="loc_us-gaap_DebtInstrumentInterestRateStatedPercentage_2A888FA8D4CA098D38DF1849119F27ED" xlink:type="locator" />
    <link:definitionArc order="18" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_CommitmentsAndContingenciesLineItems_6B1610F4596803E8E0431849119E1F4D" xlink:to="loc_us-gaap_DebtInstrumentInterestRateStatedPercentage_2A888FA8D4CA098D38DF1849119F27ED" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LossContingencyAccrualCarryingValueCurrent" xlink:label="loc_us-gaap_LossContingencyAccrualCarryingValueCurrent_A758721BECD602DCF6731849119F1278" xlink:type="locator" />
    <link:definitionArc order="19" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_CommitmentsAndContingenciesLineItems_6B1610F4596803E8E0431849119E1F4D" xlink:to="loc_us-gaap_LossContingencyAccrualCarryingValueCurrent_A758721BECD602DCF6731849119F1278" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.codexis.com/role/CondensedConsolidatedBalanceSheets" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/CondensedConsolidatedBalanceSheetsParenthetical" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/CondensedConsolidatedStatementsOfCashFlows" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/CondensedConsolidatedStatementsOfComprehensiveIncomeLoss" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/CondensedConsolidatedStatementsOfOperations" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/DescriptionOfBusiness" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/DescriptionOfBusinessTextualDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/DocumentAndEntityInformation" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/FairValueMeasurements" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/FairValueMeasurementsScheduleOfFinancialInstrumentsMeasuredAtFairValueOnRecurringBasisDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems" xlink:label="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_89E69882BB82BF7C2BADD42F3EFACDCE" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable" xlink:label="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_70BAB9AC6055932913EBD42F3EF97C41" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_89E69882BB82BF7C2BADD42F3EFACDCE" xlink:to="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_70BAB9AC6055932913EBD42F3EF97C41" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationAxis" xlink:label="loc_us-gaap_IncomeStatementLocationAxis_B1AEC903592DF04F9463D44BFF1132AD" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_70BAB9AC6055932913EBD42F3EF97C41" xlink:to="loc_us-gaap_IncomeStatementLocationAxis_B1AEC903592DF04F9463D44BFF1132AD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_3997168204B851B98BE4D44BFF156EE0_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_B1AEC903592DF04F9463D44BFF1132AD" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_3997168204B851B98BE4D44BFF156EE0_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_3997168204B851B98BE4D44BFF156EE0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_B1AEC903592DF04F9463D44BFF1132AD" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_3997168204B851B98BE4D44BFF156EE0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherExpenseMember" xlink:label="loc_us-gaap_OtherExpenseMember_F5A06BDD472D64D5DFC9D44C3945258B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_3997168204B851B98BE4D44BFF156EE0" xlink:to="loc_us-gaap_OtherExpenseMember_F5A06BDD472D64D5DFC9D44C3945258B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherComprehensiveIncomeMember" xlink:label="loc_us-gaap_OtherComprehensiveIncomeMember_DDFE8A1C631C9E1C3C19D44D22F843EA" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_3997168204B851B98BE4D44BFF156EE0" xlink:to="loc_us-gaap_OtherComprehensiveIncomeMember_DDFE8A1C631C9E1C3C19D44D22F843EA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_14C3AAFBB5A89C79FDA4D42F3EF983DD" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_70BAB9AC6055932913EBD42F3EF97C41" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_14C3AAFBB5A89C79FDA4D42F3EF983DD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_89269F5519D5DEF3574CD42F3EF96294_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_14C3AAFBB5A89C79FDA4D42F3EF983DD" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_89269F5519D5DEF3574CD42F3EF96294_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_89269F5519D5DEF3574CD42F3EF96294" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_14C3AAFBB5A89C79FDA4D42F3EF983DD" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_89269F5519D5DEF3574CD42F3EF96294" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_CommonSharesOfCoTwoSolutionMember" xlink:label="loc_cdxs_CommonSharesOfCoTwoSolutionMember_A7BFD7EEF244ABBFA7D6D42F3EF92B6A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_89269F5519D5DEF3574CD42F3EF96294" xlink:to="loc_cdxs_CommonSharesOfCoTwoSolutionMember_A7BFD7EEF244ABBFA7D6D42F3EF92B6A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CashAndCashEquivalentsAxis" xlink:label="loc_us-gaap_CashAndCashEquivalentsAxis_9ED85F3BA5D35C3F06A3D42F3EF92C18" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_70BAB9AC6055932913EBD42F3EF97C41" xlink:to="loc_us-gaap_CashAndCashEquivalentsAxis_9ED85F3BA5D35C3F06A3D42F3EF92C18" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestrictedCashAndCashEquivalentsCashAndCashEquivalentsMember" xlink:label="loc_us-gaap_RestrictedCashAndCashEquivalentsCashAndCashEquivalentsMember_8506CF1881C64600245ED42F3EF9A3FC_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_CashAndCashEquivalentsAxis_9ED85F3BA5D35C3F06A3D42F3EF92C18" xlink:to="loc_us-gaap_RestrictedCashAndCashEquivalentsCashAndCashEquivalentsMember_8506CF1881C64600245ED42F3EF9A3FC_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestrictedCashAndCashEquivalentsCashAndCashEquivalentsMember" xlink:label="loc_us-gaap_RestrictedCashAndCashEquivalentsCashAndCashEquivalentsMember_8506CF1881C64600245ED42F3EF9A3FC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_CashAndCashEquivalentsAxis_9ED85F3BA5D35C3F06A3D42F3EF92C18" xlink:to="loc_us-gaap_RestrictedCashAndCashEquivalentsCashAndCashEquivalentsMember_8506CF1881C64600245ED42F3EF9A3FC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MoneyMarketFundsMember" xlink:label="loc_us-gaap_MoneyMarketFundsMember_CD251A56B45A58C2A0B9D42F3EFA9AED" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestrictedCashAndCashEquivalentsCashAndCashEquivalentsMember_8506CF1881C64600245ED42F3EF9A3FC" xlink:to="loc_us-gaap_MoneyMarketFundsMember_CD251A56B45A58C2A0B9D42F3EFA9AED" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueByFairValueHierarchyLevelAxis" xlink:label="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_E70C67397C597CBA55EFD42F3EFA1A73" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_70BAB9AC6055932913EBD42F3EF97C41" xlink:to="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_E70C67397C597CBA55EFD42F3EFA1A73" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_F95181917B2B0496A6FBD42F3EFA5198_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_E70C67397C597CBA55EFD42F3EFA1A73" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_F95181917B2B0496A6FBD42F3EFA5198_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_F95181917B2B0496A6FBD42F3EFA5198" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_E70C67397C597CBA55EFD42F3EFA1A73" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_F95181917B2B0496A6FBD42F3EFA5198" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueInputsLevel1Member" xlink:label="loc_us-gaap_FairValueInputsLevel1Member_BCEBBF4D67B7F15C5845D42F3EFA55C2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_F95181917B2B0496A6FBD42F3EFA5198" xlink:to="loc_us-gaap_FairValueInputsLevel1Member_BCEBBF4D67B7F15C5845D42F3EFA55C2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueInputsLevel2Member" xlink:label="loc_us-gaap_FairValueInputsLevel2Member_BA06F01C941C46EAF900D42F3EFAF04E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_F95181917B2B0496A6FBD42F3EFA5198" xlink:to="loc_us-gaap_FairValueInputsLevel2Member_BA06F01C941C46EAF900D42F3EFAF04E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueInputsLevel3Member" xlink:label="loc_us-gaap_FairValueInputsLevel3Member_9427F1AF8FFA385C107ED42F3EFAF1C8" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_F95181917B2B0496A6FBD42F3EFA5198" xlink:to="loc_us-gaap_FairValueInputsLevel3Member_9427F1AF8FFA385C107ED42F3EFAF1C8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FinancialInstrumentsFinancialAssetsBalanceSheetGroupingsAbstract" xlink:label="loc_us-gaap_FinancialInstrumentsFinancialAssetsBalanceSheetGroupingsAbstract_D3F45F6385AD2B36C082D42F3EFAFD7A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_89E69882BB82BF7C2BADD42F3EFACDCE" xlink:to="loc_us-gaap_FinancialInstrumentsFinancialAssetsBalanceSheetGroupingsAbstract_D3F45F6385AD2B36C082D42F3EFAFD7A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AssetsFairValueDisclosureRecurring" xlink:label="loc_us-gaap_AssetsFairValueDisclosureRecurring_1670F080FA59AF35975CD42F3EFA51BF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancialInstrumentsFinancialAssetsBalanceSheetGroupingsAbstract_D3F45F6385AD2B36C082D42F3EFAFD7A" xlink:to="loc_us-gaap_AssetsFairValueDisclosureRecurring_1670F080FA59AF35975CD42F3EFA51BF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_InvestmentOwnedBalanceShares" xlink:label="loc_us-gaap_InvestmentOwnedBalanceShares_0601DE493FB0F597E7A9D42F3EFABFA9" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_89E69882BB82BF7C2BADD42F3EFACDCE" xlink:to="loc_us-gaap_InvestmentOwnedBalanceShares_0601DE493FB0F597E7A9D42F3EFABFA9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueAssetsLevel1ToLevel2TransfersAmount" xlink:label="loc_us-gaap_FairValueAssetsLevel1ToLevel2TransfersAmount_36107C029E4890FECA24D42F3EFA0556" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_89E69882BB82BF7C2BADD42F3EFACDCE" xlink:to="loc_us-gaap_FairValueAssetsLevel1ToLevel2TransfersAmount_36107C029E4890FECA24D42F3EFA0556" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueAssetsLevel2ToLevel1TransfersAmount" xlink:label="loc_us-gaap_FairValueAssetsLevel2ToLevel1TransfersAmount_02A23A5F8DF86D37BFE1D42F3EFA79B8" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_89E69882BB82BF7C2BADD42F3EFACDCE" xlink:to="loc_us-gaap_FairValueAssetsLevel2ToLevel1TransfersAmount_02A23A5F8DF86D37BFE1D42F3EFA79B8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_UnrealizedGainLossOnInvestments" xlink:label="loc_us-gaap_UnrealizedGainLossOnInvestments_9818AFFF2DAC0A4DC40CD44BB9333557" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_89E69882BB82BF7C2BADD42F3EFACDCE" xlink:to="loc_us-gaap_UnrealizedGainLossOnInvestments_9818AFFF2DAC0A4DC40CD44BB9333557" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.codexis.com/role/FairValueMeasurementsTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/NetLossPerShare" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/NetLossPerShareAntiDilutiveSecuritiesDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems" xlink:label="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_7AF5F093F8AFE134EC6CD42F3F134476" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable" xlink:label="loc_us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable_0528745405B2A3847752D42F3F13490A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_7AF5F093F8AFE134EC6CD42F3F134476" xlink:to="loc_us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable_0528745405B2A3847752D42F3F13490A" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis" xlink:label="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_3785C297E448FDB14700D42F3F1301FC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable_0528745405B2A3847752D42F3F13490A" xlink:to="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_3785C297E448FDB14700D42F3F1301FC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AntidilutiveSecuritiesNameDomain" xlink:label="loc_us-gaap_AntidilutiveSecuritiesNameDomain_E79F085CB95D28777979D42F3F133E15_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_3785C297E448FDB14700D42F3F1301FC" xlink:to="loc_us-gaap_AntidilutiveSecuritiesNameDomain_E79F085CB95D28777979D42F3F133E15_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AntidilutiveSecuritiesNameDomain" xlink:label="loc_us-gaap_AntidilutiveSecuritiesNameDomain_E79F085CB95D28777979D42F3F133E15" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_3785C297E448FDB14700D42F3F1301FC" xlink:to="loc_us-gaap_AntidilutiveSecuritiesNameDomain_E79F085CB95D28777979D42F3F133E15" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StockCompensationPlanMember" xlink:label="loc_us-gaap_StockCompensationPlanMember_100539609CB00BEDF125D42F3F13642F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesNameDomain_E79F085CB95D28777979D42F3F133E15" xlink:to="loc_us-gaap_StockCompensationPlanMember_100539609CB00BEDF125D42F3F13642F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_WarrantMember" xlink:label="loc_us-gaap_WarrantMember_F714DF6F857DA153E582D42F3F135882" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesNameDomain_E79F085CB95D28777979D42F3F133E15" xlink:to="loc_us-gaap_WarrantMember_F714DF6F857DA153E582D42F3F135882" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount" xlink:label="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount_75649593BFD028FB62E9D42F3F13D30A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_7AF5F093F8AFE134EC6CD42F3F134476" xlink:to="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount_75649593BFD028FB62E9D42F3F13D30A" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.codexis.com/role/NetLossPerShareTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/RelatedPartyTransactions" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/RelatedPartyTransactionsTextualDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RelatedPartyTransactionLineItems" xlink:label="loc_us-gaap_RelatedPartyTransactionLineItems_14B8077AEB28D9F6161941A0659B675F" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable" xlink:label="loc_us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable_1D9C1255BE4098BDCF6E41A06594E0E4" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_RelatedPartyTransactionLineItems_14B8077AEB28D9F6161941A0659B675F" xlink:to="loc_us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable_1D9C1255BE4098BDCF6E41A06594E0E4" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_LegalEntityAxis" xlink:label="loc_dei_LegalEntityAxis_C9AAE1C2F183A7DFBB0941A06595A38D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable_1D9C1255BE4098BDCF6E41A06594E0E4" xlink:to="loc_dei_LegalEntityAxis_C9AAE1C2F183A7DFBB0941A06595A38D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_1A77DF0D76869EF87AA041A06595F4AE_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_dei_LegalEntityAxis_C9AAE1C2F183A7DFBB0941A06595A38D" xlink:to="loc_dei_EntityDomain_1A77DF0D76869EF87AA041A06595F4AE_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_1A77DF0D76869EF87AA041A06595F4AE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_dei_LegalEntityAxis_C9AAE1C2F183A7DFBB0941A06595A38D" xlink:to="loc_dei_EntityDomain_1A77DF0D76869EF87AA041A06595F4AE" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_PresidioPartners2007L.P.Member" xlink:label="loc_cdxs_PresidioPartners2007L.P.Member_3D0A3353D57293FADDCE41A06595350C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_1A77DF0D76869EF87AA041A06595F4AE" xlink:to="loc_cdxs_PresidioPartners2007L.P.Member_3D0A3353D57293FADDCE41A06595350C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MajorCustomersAxis" xlink:label="loc_us-gaap_MajorCustomersAxis_CFC8102F7CADC513C75141A065955940" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable_1D9C1255BE4098BDCF6E41A06594E0E4" xlink:to="loc_us-gaap_MajorCustomersAxis_CFC8102F7CADC513C75141A065955940" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NameOfMajorCustomerDomain" xlink:label="loc_us-gaap_NameOfMajorCustomerDomain_26999731B60B9939555541A0659ADCE0_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_MajorCustomersAxis_CFC8102F7CADC513C75141A065955940" xlink:to="loc_us-gaap_NameOfMajorCustomerDomain_26999731B60B9939555541A0659ADCE0_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NameOfMajorCustomerDomain" xlink:label="loc_us-gaap_NameOfMajorCustomerDomain_26999731B60B9939555541A0659ADCE0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_MajorCustomersAxis_CFC8102F7CADC513C75141A065955940" xlink:to="loc_us-gaap_NameOfMajorCustomerDomain_26999731B60B9939555541A0659ADCE0" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_ExelaPharmSciIncMember" xlink:label="loc_cdxs_ExelaPharmSciIncMember_0D699E23960278C0791741A0659AFF8B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NameOfMajorCustomerDomain_26999731B60B9939555541A0659ADCE0" xlink:to="loc_cdxs_ExelaPharmSciIncMember_0D699E23960278C0791741A0659AFF8B" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_AstraZenecaMember" xlink:label="loc_cdxs_AstraZenecaMember_37147A8DB7CEFE0EDC0E41A0659B29FA" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NameOfMajorCustomerDomain_26999731B60B9939555541A0659ADCE0" xlink:to="loc_cdxs_AstraZenecaMember_37147A8DB7CEFE0EDC0E41A0659B29FA" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_AsymchemMember" xlink:label="loc_cdxs_AsymchemMember_5DBE6B9C7364203BE16041A0659B82DE" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NameOfMajorCustomerDomain_26999731B60B9939555541A0659ADCE0" xlink:to="loc_cdxs_AsymchemMember_5DBE6B9C7364203BE16041A0659B82DE" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_AlfaAesarMember" xlink:label="loc_cdxs_AlfaAesarMember_9CF451D08E34CBB8645841A0659BB4FE" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NameOfMajorCustomerDomain_26999731B60B9939555541A0659ADCE0" xlink:to="loc_cdxs_AlfaAesarMember_9CF451D08E34CBB8645841A0659BB4FE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RelatedPartyTransactionsByRelatedPartyAxis" xlink:label="loc_us-gaap_RelatedPartyTransactionsByRelatedPartyAxis_4703CD99E2769AA772BB41A0659B1A76" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable_1D9C1255BE4098BDCF6E41A06594E0E4" xlink:to="loc_us-gaap_RelatedPartyTransactionsByRelatedPartyAxis_4703CD99E2769AA772BB41A0659B1A76" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RelatedPartyDomain" xlink:label="loc_us-gaap_RelatedPartyDomain_FD27A0D48CD58B835CC541A0659BFD48_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RelatedPartyTransactionsByRelatedPartyAxis_4703CD99E2769AA772BB41A0659B1A76" xlink:to="loc_us-gaap_RelatedPartyDomain_FD27A0D48CD58B835CC541A0659BFD48_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RelatedPartyDomain" xlink:label="loc_us-gaap_RelatedPartyDomain_FD27A0D48CD58B835CC541A0659BFD48" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RelatedPartyTransactionsByRelatedPartyAxis_4703CD99E2769AA772BB41A0659B1A76" xlink:to="loc_us-gaap_RelatedPartyDomain_FD27A0D48CD58B835CC541A0659BFD48" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AffiliatedEntityMember" xlink:label="loc_us-gaap_AffiliatedEntityMember_BF0E641A5400A911972A41A0659BA999" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RelatedPartyDomain_FD27A0D48CD58B835CC541A0659BFD48" xlink:to="loc_us-gaap_AffiliatedEntityMember_BF0E641A5400A911972A41A0659BA999" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_InvestmentOwnershipPercentage" xlink:label="loc_cdxs_InvestmentOwnershipPercentage_BDA67A01171573626C6B41A0659B159E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RelatedPartyTransactionLineItems_14B8077AEB28D9F6161941A0659B675F" xlink:to="loc_cdxs_InvestmentOwnershipPercentage_BDA67A01171573626C6B41A0659B159E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RoyaltyRevenue" xlink:label="loc_us-gaap_RoyaltyRevenue_D52693BBBEC86B54580441A0659B77F9" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RelatedPartyTransactionLineItems_14B8077AEB28D9F6161941A0659B675F" xlink:to="loc_us-gaap_RoyaltyRevenue_D52693BBBEC86B54580441A0659B77F9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AccountsReceivableRelatedParties" xlink:label="loc_us-gaap_AccountsReceivableRelatedParties_79A18941023F33D38EED41A0659BE6DD" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RelatedPartyTransactionLineItems_14B8077AEB28D9F6161941A0659B675F" xlink:to="loc_us-gaap_AccountsReceivableRelatedParties_79A18941023F33D38EED41A0659BE6DD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RevenueFromRelatedParties" xlink:label="loc_us-gaap_RevenueFromRelatedParties_AAEE319AE12BB9A61E3141A0659BBF5D" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RelatedPartyTransactionLineItems_14B8077AEB28D9F6161941A0659B675F" xlink:to="loc_us-gaap_RevenueFromRelatedParties_AAEE319AE12BB9A61E3141A0659BBF5D" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_RelatedPartyTransactionEstimatedValueOfOption" xlink:label="loc_cdxs_RelatedPartyTransactionEstimatedValueOfOption_85D9ADA89C453BBB231641A0659B1B26" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RelatedPartyTransactionLineItems_14B8077AEB28D9F6161941A0659B675F" xlink:to="loc_cdxs_RelatedPartyTransactionEstimatedValueOfOption_85D9ADA89C453BBB231641A0659B1B26" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.codexis.com/role/RevenueRecognition" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/RevenueRecognitionContractsWithCustomerDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/RevenueRecognitionDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DisaggregationOfRevenueLineItems" xlink:label="loc_us-gaap_DisaggregationOfRevenueLineItems_4BFF802AFA77BAA31F6C485D2FF49E8D" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DisaggregationOfRevenueTable" xlink:label="loc_us-gaap_DisaggregationOfRevenueTable_C7E4CBA4D2190F7EFD6D485D2FF473B2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_4BFF802AFA77BAA31F6C485D2FF49E8D" xlink:to="loc_us-gaap_DisaggregationOfRevenueTable_C7E4CBA4D2190F7EFD6D485D2FF473B2" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_BC2ACCF53B33B8A2D601485D2FF43B51" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_C7E4CBA4D2190F7EFD6D485D2FF473B2" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_BC2ACCF53B33B8A2D601485D2FF43B51" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_8786FB5FAE9AE24269A7485D2FF462DB_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_BC2ACCF53B33B8A2D601485D2FF43B51" xlink:to="loc_us-gaap_SegmentDomain_8786FB5FAE9AE24269A7485D2FF462DB_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_8786FB5FAE9AE24269A7485D2FF462DB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_BC2ACCF53B33B8A2D601485D2FF43B51" xlink:to="loc_us-gaap_SegmentDomain_8786FB5FAE9AE24269A7485D2FF462DB" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_CoreSegmentMember" xlink:label="loc_cdxs_CoreSegmentMember_D5EE4219BF10435F7231485D2FF48C82" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_8786FB5FAE9AE24269A7485D2FF462DB" xlink:to="loc_cdxs_CoreSegmentMember_D5EE4219BF10435F7231485D2FF48C82" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_BiotherapeuticSegmentMember" xlink:label="loc_cdxs_BiotherapeuticSegmentMember_881155F3267BD91C113E485D2FF4CDC5" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_8786FB5FAE9AE24269A7485D2FF462DB" xlink:to="loc_cdxs_BiotherapeuticSegmentMember_881155F3267BD91C113E485D2FF4CDC5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_InitialApplicationPeriodCumulativeEffectTransitionAxis" xlink:label="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionAxis_BA24D9437664B021AB6C485D2FF49C39" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_C7E4CBA4D2190F7EFD6D485D2FF473B2" xlink:to="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionAxis_BA24D9437664B021AB6C485D2FF49C39" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_InitialApplicationPeriodCumulativeEffectTransitionDomain" xlink:label="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionDomain_BAC1F69A9ACE0C426FF7485D2FF4598B_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionAxis_BA24D9437664B021AB6C485D2FF49C39" xlink:to="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionDomain_BAC1F69A9ACE0C426FF7485D2FF4598B_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_InitialApplicationPeriodCumulativeEffectTransitionDomain" xlink:label="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionDomain_BAC1F69A9ACE0C426FF7485D2FF4598B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionAxis_BA24D9437664B021AB6C485D2FF49C39" xlink:to="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionDomain_BAC1F69A9ACE0C426FF7485D2FF4598B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DifferenceBetweenRevenueGuidanceInEffectBeforeAndAfterTopic606Member" xlink:label="loc_us-gaap_DifferenceBetweenRevenueGuidanceInEffectBeforeAndAfterTopic606Member_4F61E0E852E0E2EC263E485D2FF4C3BC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionDomain_BAC1F69A9ACE0C426FF7485D2FF4598B" xlink:to="loc_us-gaap_DifferenceBetweenRevenueGuidanceInEffectBeforeAndAfterTopic606Member_4F61E0E852E0E2EC263E485D2FF4C3BC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AdjustmentsForNewAccountingPronouncementsAxis" xlink:label="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_EE71691988388CB0EB1A485D2FF49266" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_C7E4CBA4D2190F7EFD6D485D2FF473B2" xlink:to="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_EE71691988388CB0EB1A485D2FF49266" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TypeOfAdoptionMember" xlink:label="loc_us-gaap_TypeOfAdoptionMember_D8BB2975FD286D31C4D9485D2FF46799_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_EE71691988388CB0EB1A485D2FF49266" xlink:to="loc_us-gaap_TypeOfAdoptionMember_D8BB2975FD286D31C4D9485D2FF46799_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TypeOfAdoptionMember" xlink:label="loc_us-gaap_TypeOfAdoptionMember_D8BB2975FD286D31C4D9485D2FF46799" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_EE71691988388CB0EB1A485D2FF49266" xlink:to="loc_us-gaap_TypeOfAdoptionMember_D8BB2975FD286D31C4D9485D2FF46799" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AccountingStandardsUpdate201409Member" xlink:label="loc_us-gaap_AccountingStandardsUpdate201409Member_19DAC46454A4B8D5D3CB485D2FF42E4D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfAdoptionMember_D8BB2975FD286D31C4D9485D2FF46799" xlink:to="loc_us-gaap_AccountingStandardsUpdate201409Member_19DAC46454A4B8D5D3CB485D2FF42E4D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ProductOrServiceAxis" xlink:label="loc_us-gaap_ProductOrServiceAxis_DE705D84BF5167E96249485D2FF4CD8F" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_C7E4CBA4D2190F7EFD6D485D2FF473B2" xlink:to="loc_us-gaap_ProductOrServiceAxis_DE705D84BF5167E96249485D2FF4CD8F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ProductsAndServicesDomain" xlink:label="loc_us-gaap_ProductsAndServicesDomain_1C4A8A67A25B348B4B27485D2FF42971_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ProductOrServiceAxis_DE705D84BF5167E96249485D2FF4CD8F" xlink:to="loc_us-gaap_ProductsAndServicesDomain_1C4A8A67A25B348B4B27485D2FF42971_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ProductsAndServicesDomain" xlink:label="loc_us-gaap_ProductsAndServicesDomain_1C4A8A67A25B348B4B27485D2FF42971" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ProductOrServiceAxis_DE705D84BF5167E96249485D2FF4CD8F" xlink:to="loc_us-gaap_ProductsAndServicesDomain_1C4A8A67A25B348B4B27485D2FF42971" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_ProductSalesMember" xlink:label="loc_cdxs_ProductSalesMember_9050A6470277E790E98A485D2FF4F07D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ProductsAndServicesDomain_1C4A8A67A25B348B4B27485D2FF42971" xlink:to="loc_cdxs_ProductSalesMember_9050A6470277E790E98A485D2FF4F07D" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_ResearchandDevelopmentRevenueMember" xlink:label="loc_cdxs_ResearchandDevelopmentRevenueMember_F471AC12815F30A92FAA485D2FF457DE" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ProductsAndServicesDomain_1C4A8A67A25B348B4B27485D2FF42971" xlink:to="loc_cdxs_ResearchandDevelopmentRevenueMember_F471AC12815F30A92FAA485D2FF457DE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementGeographicalAxis" xlink:label="loc_us-gaap_StatementGeographicalAxis_726049360AFB17C2ECB8485D2FF42289" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_C7E4CBA4D2190F7EFD6D485D2FF473B2" xlink:to="loc_us-gaap_StatementGeographicalAxis_726049360AFB17C2ECB8485D2FF42289" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentGeographicalDomain" xlink:label="loc_us-gaap_SegmentGeographicalDomain_406541429B759603697D485D2FF4CB94_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementGeographicalAxis_726049360AFB17C2ECB8485D2FF42289" xlink:to="loc_us-gaap_SegmentGeographicalDomain_406541429B759603697D485D2FF4CB94_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentGeographicalDomain" xlink:label="loc_us-gaap_SegmentGeographicalDomain_406541429B759603697D485D2FF4CB94" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementGeographicalAxis_726049360AFB17C2ECB8485D2FF42289" xlink:to="loc_us-gaap_SegmentGeographicalDomain_406541429B759603697D485D2FF4CB94" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AmericasMember" xlink:label="loc_us-gaap_AmericasMember_9B20F46E330356110C10485D2FF42278" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentGeographicalDomain_406541429B759603697D485D2FF4CB94" xlink:to="loc_us-gaap_AmericasMember_9B20F46E330356110C10485D2FF42278" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EMEAMember" xlink:label="loc_us-gaap_EMEAMember_A4EEA7E8AA7701AE04FB485D2FF49A5F" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentGeographicalDomain_406541429B759603697D485D2FF4CB94" xlink:to="loc_us-gaap_EMEAMember_A4EEA7E8AA7701AE04FB485D2FF49A5F" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_APACMember" xlink:label="loc_cdxs_APACMember_C6DB47D27D0ECC589806485D2FF47D5C" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentGeographicalDomain_406541429B759603697D485D2FF4CB94" xlink:to="loc_cdxs_APACMember_C6DB47D27D0ECC589806485D2FF47D5C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetainedEarningsAccumulatedDeficit" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_65909A405286AFA9939D485D2FF4FFC6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_4BFF802AFA77BAA31F6C485D2FF49E8D" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_65909A405286AFA9939D485D2FF4FFC6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_Revenues" xlink:label="loc_us-gaap_Revenues_B5A8894E2117F67B31F1485D2FF42406" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_4BFF802AFA77BAA31F6C485D2FF49E8D" xlink:to="loc_us-gaap_Revenues_B5A8894E2117F67B31F1485D2FF42406" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DisaggregationOfRevenueAbstract" xlink:label="loc_us-gaap_DisaggregationOfRevenueAbstract_8DF1733044E3285A6EA5485D2FF487EB" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_4BFF802AFA77BAA31F6C485D2FF49E8D" xlink:to="loc_us-gaap_DisaggregationOfRevenueAbstract_8DF1733044E3285A6EA5485D2FF487EB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RevenueFromContractWithCustomerIncludingAssessedTax" xlink:label="loc_us-gaap_RevenueFromContractWithCustomerIncludingAssessedTax_CE34C7C10827442F4B11485D2FF45376" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueAbstract_8DF1733044E3285A6EA5485D2FF487EB" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerIncludingAssessedTax_CE34C7C10827442F4B11485D2FF45376" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.codexis.com/role/RevenueRecognitionImpactToFinancialStatementsDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RevenueInitialApplicationPeriodCumulativeEffectTransitionLineItems" xlink:label="loc_us-gaap_RevenueInitialApplicationPeriodCumulativeEffectTransitionLineItems_8A0BDCEF8D900833F1EE485D2FE429AA" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleTable" xlink:label="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleTable_9E178780881E63352BA7485D2FE43FEA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_RevenueInitialApplicationPeriodCumulativeEffectTransitionLineItems_8A0BDCEF8D900833F1EE485D2FE429AA" xlink:to="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleTable_9E178780881E63352BA7485D2FE43FEA" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AdjustmentsForNewAccountingPronouncementsAxis" xlink:label="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_4DB0E84B2BEE55DB300D485D2FE44D54" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleTable_9E178780881E63352BA7485D2FE43FEA" xlink:to="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_4DB0E84B2BEE55DB300D485D2FE44D54" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TypeOfAdoptionMember" xlink:label="loc_us-gaap_TypeOfAdoptionMember_B52816BF06D3520690A4485D2FE48CBF_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_4DB0E84B2BEE55DB300D485D2FE44D54" xlink:to="loc_us-gaap_TypeOfAdoptionMember_B52816BF06D3520690A4485D2FE48CBF_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TypeOfAdoptionMember" xlink:label="loc_us-gaap_TypeOfAdoptionMember_B52816BF06D3520690A4485D2FE48CBF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_4DB0E84B2BEE55DB300D485D2FE44D54" xlink:to="loc_us-gaap_TypeOfAdoptionMember_B52816BF06D3520690A4485D2FE48CBF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AccountingStandardsUpdate201409Member" xlink:label="loc_us-gaap_AccountingStandardsUpdate201409Member_77C224E03BAB6D69409D485D2FE4DB0D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfAdoptionMember_B52816BF06D3520690A4485D2FE48CBF" xlink:to="loc_us-gaap_AccountingStandardsUpdate201409Member_77C224E03BAB6D69409D485D2FE4DB0D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_InitialApplicationPeriodCumulativeEffectTransitionAxis" xlink:label="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionAxis_14DD2F017A1D17AA1B65485D2FE454EF" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleTable_9E178780881E63352BA7485D2FE43FEA" xlink:to="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionAxis_14DD2F017A1D17AA1B65485D2FE454EF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_InitialApplicationPeriodCumulativeEffectTransitionDomain" xlink:label="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionDomain_E10194F6CD6586E37085485D2FE4AA64_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionAxis_14DD2F017A1D17AA1B65485D2FE454EF" xlink:to="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionDomain_E10194F6CD6586E37085485D2FE4AA64_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_InitialApplicationPeriodCumulativeEffectTransitionDomain" xlink:label="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionDomain_E10194F6CD6586E37085485D2FE4AA64" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionAxis_14DD2F017A1D17AA1B65485D2FE454EF" xlink:to="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionDomain_E10194F6CD6586E37085485D2FE4AA64" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CalculatedUnderRevenueGuidanceInEffectBeforeTopic606Member" xlink:label="loc_us-gaap_CalculatedUnderRevenueGuidanceInEffectBeforeTopic606Member_EAEB3C3D8BDF9AAB204A485D2FE461F8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionDomain_E10194F6CD6586E37085485D2FE4AA64" xlink:to="loc_us-gaap_CalculatedUnderRevenueGuidanceInEffectBeforeTopic606Member_EAEB3C3D8BDF9AAB204A485D2FE461F8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DifferenceBetweenRevenueGuidanceInEffectBeforeAndAfterTopic606Member" xlink:label="loc_us-gaap_DifferenceBetweenRevenueGuidanceInEffectBeforeAndAfterTopic606Member_EE085780BFA80787D9A5485D2FE43065" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionDomain_E10194F6CD6586E37085485D2FE4AA64" xlink:to="loc_us-gaap_DifferenceBetweenRevenueGuidanceInEffectBeforeAndAfterTopic606Member_EE085780BFA80787D9A5485D2FE43065" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementAbstract" xlink:label="loc_us-gaap_IncomeStatementAbstract_A28B8055195FBB43D00C485D2FE4D9CB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RevenueInitialApplicationPeriodCumulativeEffectTransitionLineItems_8A0BDCEF8D900833F1EE485D2FE429AA" xlink:to="loc_us-gaap_IncomeStatementAbstract_A28B8055195FBB43D00C485D2FE4D9CB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RevenuesAbstract" xlink:label="loc_us-gaap_RevenuesAbstract_4E3D3BA32B6E838A27B6485D2FE44B73" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementAbstract_A28B8055195FBB43D00C485D2FE4D9CB" xlink:to="loc_us-gaap_RevenuesAbstract_4E3D3BA32B6E838A27B6485D2FE44B73" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SalesRevenueGoodsGross" xlink:label="loc_us-gaap_SalesRevenueGoodsGross_054F6D68A197518CC4F0485D2FE445AD" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RevenuesAbstract_4E3D3BA32B6E838A27B6485D2FE44B73" xlink:to="loc_us-gaap_SalesRevenueGoodsGross_054F6D68A197518CC4F0485D2FE445AD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ResearchAndDevelopmentArrangementContractToPerformForOthersCompensationEarned" xlink:label="loc_us-gaap_ResearchAndDevelopmentArrangementContractToPerformForOthersCompensationEarned_54834A4A409E2F6B7E1A485D2FE46439" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RevenuesAbstract_4E3D3BA32B6E838A27B6485D2FE44B73" xlink:to="loc_us-gaap_ResearchAndDevelopmentArrangementContractToPerformForOthersCompensationEarned_54834A4A409E2F6B7E1A485D2FE46439" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_Revenues" xlink:label="loc_us-gaap_Revenues_848EA6190050E1063716485D2FE48FA5" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RevenuesAbstract_4E3D3BA32B6E838A27B6485D2FE44B73" xlink:to="loc_us-gaap_Revenues_848EA6190050E1063716485D2FE48FA5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OperatingCostsAndExpensesAbstract" xlink:label="loc_us-gaap_OperatingCostsAndExpensesAbstract_E9C929D19E415C0497DB485D2FE439A6" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementAbstract_A28B8055195FBB43D00C485D2FE4D9CB" xlink:to="loc_us-gaap_OperatingCostsAndExpensesAbstract_E9C929D19E415C0497DB485D2FE439A6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CostOfGoodsSold" xlink:label="loc_us-gaap_CostOfGoodsSold_53C39FF09071F659157A485D2FE48E59" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OperatingCostsAndExpensesAbstract_E9C929D19E415C0497DB485D2FE439A6" xlink:to="loc_us-gaap_CostOfGoodsSold_53C39FF09071F659157A485D2FE48E59" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ResearchAndDevelopmentExpense" xlink:label="loc_us-gaap_ResearchAndDevelopmentExpense_83642E43CC992FEC9019485D2FE4DEE8" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OperatingCostsAndExpensesAbstract_E9C929D19E415C0497DB485D2FE439A6" xlink:to="loc_us-gaap_ResearchAndDevelopmentExpense_83642E43CC992FEC9019485D2FE4DEE8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SellingGeneralAndAdministrativeExpense" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpense_75B7EC82A6B216AAD0C4485D2FE48CE3" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OperatingCostsAndExpensesAbstract_E9C929D19E415C0497DB485D2FE439A6" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpense_75B7EC82A6B216AAD0C4485D2FE48CE3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OperatingExpenses" xlink:label="loc_us-gaap_OperatingExpenses_B584473804000585D07C485D2FE48389" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OperatingCostsAndExpensesAbstract_E9C929D19E415C0497DB485D2FE439A6" xlink:to="loc_us-gaap_OperatingExpenses_B584473804000585D07C485D2FE48389" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OperatingIncomeLoss" xlink:label="loc_us-gaap_OperatingIncomeLoss_A283003FF708E57BF99C485D2FE48396" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OperatingCostsAndExpensesAbstract_E9C929D19E415C0497DB485D2FE439A6" xlink:to="loc_us-gaap_OperatingIncomeLoss_A283003FF708E57BF99C485D2FE48396" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_InvestmentIncomeInterest" xlink:label="loc_us-gaap_InvestmentIncomeInterest_84AFC4EB3892A8D0DFC3485D2FE456F1" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementAbstract_A28B8055195FBB43D00C485D2FE4D9CB" xlink:to="loc_us-gaap_InvestmentIncomeInterest_84AFC4EB3892A8D0DFC3485D2FE456F1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherNonoperatingIncomeExpense" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_20F170A3B1E6C881B9EC485D2FE4307F" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementAbstract_A28B8055195FBB43D00C485D2FE4D9CB" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_20F170A3B1E6C881B9EC485D2FE4307F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments_D1203245250AA22F4076485D2FE41FC3" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementAbstract_A28B8055195FBB43D00C485D2FE4D9CB" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments_D1203245250AA22F4076485D2FE41FC3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeTaxExpenseBenefit" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_662AD6EF9D33D858CAE2485D2FE40F07" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementAbstract_A28B8055195FBB43D00C485D2FE4D9CB" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_662AD6EF9D33D858CAE2485D2FE40F07" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NetIncomeLoss" xlink:label="loc_us-gaap_NetIncomeLoss_46EB5B2BE2EB2421AF94485D2FE4E5D9" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementAbstract_A28B8055195FBB43D00C485D2FE4D9CB" xlink:to="loc_us-gaap_NetIncomeLoss_46EB5B2BE2EB2421AF94485D2FE4E5D9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EarningsPerShareBasicAndDiluted" xlink:label="loc_us-gaap_EarningsPerShareBasicAndDiluted_B51547A9985D907BD940485D2FE44538" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementAbstract_A28B8055195FBB43D00C485D2FE4D9CB" xlink:to="loc_us-gaap_EarningsPerShareBasicAndDiluted_B51547A9985D907BD940485D2FE44538" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_WeightedAverageNumberOfSharesOutstandingBasic" xlink:label="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_FDF3D47E09CC8040E551485D2FE4EC3E" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementAbstract_A28B8055195FBB43D00C485D2FE4D9CB" xlink:to="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_FDF3D47E09CC8040E551485D2FE4EC3E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementOfFinancialPositionAbstract" xlink:label="loc_us-gaap_StatementOfFinancialPositionAbstract_CE89642243A2F1DD9F4A485D2FE4C5E5" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RevenueInitialApplicationPeriodCumulativeEffectTransitionLineItems_8A0BDCEF8D900833F1EE485D2FE429AA" xlink:to="loc_us-gaap_StatementOfFinancialPositionAbstract_CE89642243A2F1DD9F4A485D2FE4C5E5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AssetsAbstract" xlink:label="loc_us-gaap_AssetsAbstract_1B63275C5FDB84163592485D2FE40C82" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementOfFinancialPositionAbstract_CE89642243A2F1DD9F4A485D2FE4C5E5" xlink:to="loc_us-gaap_AssetsAbstract_1B63275C5FDB84163592485D2FE40C82" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AccountsReceivableNetCurrent" xlink:label="loc_us-gaap_AccountsReceivableNetCurrent_796469E67804D8504B25485D2FE48EAB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_1B63275C5FDB84163592485D2FE40C82" xlink:to="loc_us-gaap_AccountsReceivableNetCurrent_796469E67804D8504B25485D2FE48EAB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherAssetsNoncurrent" xlink:label="loc_us-gaap_OtherAssetsNoncurrent_F3F09820732756DCE5C9485D2FE4B178" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_1B63275C5FDB84163592485D2FE40C82" xlink:to="loc_us-gaap_OtherAssetsNoncurrent_F3F09820732756DCE5C9485D2FE4B178" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LiabilitiesAndStockholdersEquityAbstract" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_85AF93A744B6158DA199485D2FE4173C" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RevenueInitialApplicationPeriodCumulativeEffectTransitionLineItems_8A0BDCEF8D900833F1EE485D2FE429AA" xlink:to="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_85AF93A744B6158DA199485D2FE4173C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AccruedLiabilitiesCurrent" xlink:label="loc_us-gaap_AccruedLiabilitiesCurrent_7073B75F59186C5D7513485D2FE4A45D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_85AF93A744B6158DA199485D2FE4173C" xlink:to="loc_us-gaap_AccruedLiabilitiesCurrent_7073B75F59186C5D7513485D2FE4A45D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DeferredRevenueCurrent" xlink:label="loc_us-gaap_DeferredRevenueCurrent_429025694E646B7CB088485D2FE4932A" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_85AF93A744B6158DA199485D2FE4173C" xlink:to="loc_us-gaap_DeferredRevenueCurrent_429025694E646B7CB088485D2FE4932A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DeferredRevenueNoncurrent" xlink:label="loc_us-gaap_DeferredRevenueNoncurrent_18794C512A61EC33B688485D2FE4F885" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_85AF93A744B6158DA199485D2FE4173C" xlink:to="loc_us-gaap_DeferredRevenueNoncurrent_18794C512A61EC33B688485D2FE4F885" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StockholdersEquityAbstract" xlink:label="loc_us-gaap_StockholdersEquityAbstract_C3BEEEA75A03F83CE43B485D2FE4CED9" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RevenueInitialApplicationPeriodCumulativeEffectTransitionLineItems_8A0BDCEF8D900833F1EE485D2FE429AA" xlink:to="loc_us-gaap_StockholdersEquityAbstract_C3BEEEA75A03F83CE43B485D2FE4CED9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetainedEarningsAccumulatedDeficit" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_44E2948F9D6833B65028485D2FE43777" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityAbstract_C3BEEEA75A03F83CE43B485D2FE4CED9" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_44E2948F9D6833B65028485D2FE43777" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.codexis.com/role/RevenueRecognitionPerformanceObligationDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RevenueInitialApplicationPeriodCumulativeEffectTransitionLineItems" xlink:label="loc_us-gaap_RevenueInitialApplicationPeriodCumulativeEffectTransitionLineItems_498363E223215BEF602D485D2FF4BC24" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RevenueInitialApplicationPeriodCumulativeEffectTransitionTable" xlink:label="loc_us-gaap_RevenueInitialApplicationPeriodCumulativeEffectTransitionTable_ED6B11AE44668AA2CA28485D2FF4F90F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_RevenueInitialApplicationPeriodCumulativeEffectTransitionLineItems_498363E223215BEF602D485D2FF4BC24" xlink:to="loc_us-gaap_RevenueInitialApplicationPeriodCumulativeEffectTransitionTable_ED6B11AE44668AA2CA28485D2FF4F90F" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ProductOrServiceAxis" xlink:label="loc_us-gaap_ProductOrServiceAxis_70C0BD6A5B27E0B3052B485D2FF45B30" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_RevenueInitialApplicationPeriodCumulativeEffectTransitionTable_ED6B11AE44668AA2CA28485D2FF4F90F" xlink:to="loc_us-gaap_ProductOrServiceAxis_70C0BD6A5B27E0B3052B485D2FF45B30" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ProductsAndServicesDomain" xlink:label="loc_us-gaap_ProductsAndServicesDomain_DA18F7ABAF39413FFF94485D2FF44687_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ProductOrServiceAxis_70C0BD6A5B27E0B3052B485D2FF45B30" xlink:to="loc_us-gaap_ProductsAndServicesDomain_DA18F7ABAF39413FFF94485D2FF44687_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ProductsAndServicesDomain" xlink:label="loc_us-gaap_ProductsAndServicesDomain_DA18F7ABAF39413FFF94485D2FF44687" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ProductOrServiceAxis_70C0BD6A5B27E0B3052B485D2FF45B30" xlink:to="loc_us-gaap_ProductsAndServicesDomain_DA18F7ABAF39413FFF94485D2FF44687" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_ProductSalesMember" xlink:label="loc_cdxs_ProductSalesMember_F1DD1A969AE80E7FE3E1485D2FF4B28F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ProductsAndServicesDomain_DA18F7ABAF39413FFF94485D2FF44687" xlink:to="loc_cdxs_ProductSalesMember_F1DD1A969AE80E7FE3E1485D2FF4B28F" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_ResearchandDevelopmentRevenueMember" xlink:label="loc_cdxs_ResearchandDevelopmentRevenueMember_7DDF1443F2C002DF7E93485D2FF4379E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ProductsAndServicesDomain_DA18F7ABAF39413FFF94485D2FF44687" xlink:to="loc_cdxs_ResearchandDevelopmentRevenueMember_7DDF1443F2C002DF7E93485D2FF4379E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionStartDateAxis" xlink:label="loc_us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionStartDateAxis_8662BB2DDB7FE61BE3DF485D2FF4520E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_RevenueInitialApplicationPeriodCumulativeEffectTransitionTable_ED6B11AE44668AA2CA28485D2FF4F90F" xlink:to="loc_us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionStartDateAxis_8662BB2DDB7FE61BE3DF485D2FF4520E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RevenueRemainingPerformanceObligation" xlink:label="loc_us-gaap_RevenueRemainingPerformanceObligation_F67C783A183490F3E4C3485D2FF44BCB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RevenueInitialApplicationPeriodCumulativeEffectTransitionLineItems_498363E223215BEF602D485D2FF4BC24" xlink:to="loc_us-gaap_RevenueRemainingPerformanceObligation_F67C783A183490F3E4C3485D2FF44BCB" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.codexis.com/role/RevenueRecognitionTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformation" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationConcentrationRiskDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskLineItems" xlink:label="loc_us-gaap_ConcentrationRiskLineItems_FB58376B846F9C863A252BB36859A1AE" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskTable" xlink:label="loc_us-gaap_ConcentrationRiskTable_293E3DA54020BDE2BD282BB368567074" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ConcentrationRiskLineItems_FB58376B846F9C863A252BB36859A1AE" xlink:to="loc_us-gaap_ConcentrationRiskTable_293E3DA54020BDE2BD282BB368567074" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskByTypeAxis" xlink:label="loc_us-gaap_ConcentrationRiskByTypeAxis_0E0AD30FED2CB53D17EC2BB3685614ED" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ConcentrationRiskTable_293E3DA54020BDE2BD282BB368567074" xlink:to="loc_us-gaap_ConcentrationRiskByTypeAxis_0E0AD30FED2CB53D17EC2BB3685614ED" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskTypeDomain" xlink:label="loc_us-gaap_ConcentrationRiskTypeDomain_4984FADD4959EAA332052BB36856286E_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConcentrationRiskByTypeAxis_0E0AD30FED2CB53D17EC2BB3685614ED" xlink:to="loc_us-gaap_ConcentrationRiskTypeDomain_4984FADD4959EAA332052BB36856286E_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskTypeDomain" xlink:label="loc_us-gaap_ConcentrationRiskTypeDomain_4984FADD4959EAA332052BB36856286E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConcentrationRiskByTypeAxis_0E0AD30FED2CB53D17EC2BB3685614ED" xlink:to="loc_us-gaap_ConcentrationRiskTypeDomain_4984FADD4959EAA332052BB36856286E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CustomerConcentrationRiskMember" xlink:label="loc_us-gaap_CustomerConcentrationRiskMember_6A2F40420B14389AD54F2BB368564ECB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskTypeDomain_4984FADD4959EAA332052BB36856286E" xlink:to="loc_us-gaap_CustomerConcentrationRiskMember_6A2F40420B14389AD54F2BB368564ECB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CreditConcentrationRiskMember" xlink:label="loc_us-gaap_CreditConcentrationRiskMember_8BBAA9191A6801AABC7F2BB3685751A1" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskTypeDomain_4984FADD4959EAA332052BB36856286E" xlink:to="loc_us-gaap_CreditConcentrationRiskMember_8BBAA9191A6801AABC7F2BB3685751A1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MajorCustomersAxis" xlink:label="loc_us-gaap_MajorCustomersAxis_3BC2A7AC54885A6E6B522BB368575E8A" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ConcentrationRiskTable_293E3DA54020BDE2BD282BB368567074" xlink:to="loc_us-gaap_MajorCustomersAxis_3BC2A7AC54885A6E6B522BB368575E8A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NameOfMajorCustomerDomain" xlink:label="loc_us-gaap_NameOfMajorCustomerDomain_C46B468A2D320F6836602BB368575A07_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_MajorCustomersAxis_3BC2A7AC54885A6E6B522BB368575E8A" xlink:to="loc_us-gaap_NameOfMajorCustomerDomain_C46B468A2D320F6836602BB368575A07_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NameOfMajorCustomerDomain" xlink:label="loc_us-gaap_NameOfMajorCustomerDomain_C46B468A2D320F6836602BB368575A07" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_MajorCustomersAxis_3BC2A7AC54885A6E6B522BB368575E8A" xlink:to="loc_us-gaap_NameOfMajorCustomerDomain_C46B468A2D320F6836602BB368575A07" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_CustomerAMember" xlink:label="loc_cdxs_CustomerAMember_61ED41FDA49AFD290A1B2BB368577A06" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NameOfMajorCustomerDomain_C46B468A2D320F6836602BB368575A07" xlink:to="loc_cdxs_CustomerAMember_61ED41FDA49AFD290A1B2BB368577A06" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_CustomerBMember" xlink:label="loc_cdxs_CustomerBMember_6A8BF4814D3849334AA62BB36858E751" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NameOfMajorCustomerDomain_C46B468A2D320F6836602BB368575A07" xlink:to="loc_cdxs_CustomerBMember_6A8BF4814D3849334AA62BB36858E751" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_CustomerCMember" xlink:label="loc_cdxs_CustomerCMember_BFEB027F4CC492FFFC892BB3685810B6" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NameOfMajorCustomerDomain_C46B468A2D320F6836602BB368575A07" xlink:to="loc_cdxs_CustomerCMember_BFEB027F4CC492FFFC892BB3685810B6" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_CustomerDMember" xlink:label="loc_cdxs_CustomerDMember_3759B42E325B903A37E02BB36858C756" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NameOfMajorCustomerDomain_C46B468A2D320F6836602BB368575A07" xlink:to="loc_cdxs_CustomerDMember_3759B42E325B903A37E02BB36858C756" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_CustomerEMember" xlink:label="loc_cdxs_CustomerEMember_A3A0E306B2E3A87C8F0D2BB36858D2A0" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NameOfMajorCustomerDomain_C46B468A2D320F6836602BB368575A07" xlink:to="loc_cdxs_CustomerEMember_A3A0E306B2E3A87C8F0D2BB36858D2A0" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_CustomerFMember" xlink:label="loc_cdxs_CustomerFMember_47FCF71D709B005E2EB92BB368585482" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NameOfMajorCustomerDomain_C46B468A2D320F6836602BB368575A07" xlink:to="loc_cdxs_CustomerFMember_47FCF71D709B005E2EB92BB368585482" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskByBenchmarkAxis" xlink:label="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_D6AF3E49677D8FB36F6D2BB368583601" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ConcentrationRiskTable_293E3DA54020BDE2BD282BB368567074" xlink:to="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_D6AF3E49677D8FB36F6D2BB368583601" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskBenchmarkDomain" xlink:label="loc_us-gaap_ConcentrationRiskBenchmarkDomain_564D63A73EDC0F8BA8632BB368584A8C_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_D6AF3E49677D8FB36F6D2BB368583601" xlink:to="loc_us-gaap_ConcentrationRiskBenchmarkDomain_564D63A73EDC0F8BA8632BB368584A8C_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskBenchmarkDomain" xlink:label="loc_us-gaap_ConcentrationRiskBenchmarkDomain_564D63A73EDC0F8BA8632BB368584A8C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_D6AF3E49677D8FB36F6D2BB368583601" xlink:to="loc_us-gaap_ConcentrationRiskBenchmarkDomain_564D63A73EDC0F8BA8632BB368584A8C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SalesMember" xlink:label="loc_us-gaap_SalesMember_D02FD4E392578D1B0EA12BB36859E5FA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskBenchmarkDomain_564D63A73EDC0F8BA8632BB368584A8C" xlink:to="loc_us-gaap_SalesMember_D02FD4E392578D1B0EA12BB36859E5FA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AccountsReceivableMember" xlink:label="loc_us-gaap_AccountsReceivableMember_64B9B162DC3791D3D2B42BB36859E45D" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskBenchmarkDomain_564D63A73EDC0F8BA8632BB368584A8C" xlink:to="loc_us-gaap_AccountsReceivableMember_64B9B162DC3791D3D2B42BB36859E45D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskPercentage1" xlink:label="loc_us-gaap_ConcentrationRiskPercentage1_1B438755C71F8CB682192BB36859AD5F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskLineItems_FB58376B846F9C863A252BB36859A1AE" xlink:to="loc_us-gaap_ConcentrationRiskPercentage1_1B438755C71F8CB682192BB36859AD5F" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationLongLivedAssetsByGeographicAreaDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentReportingInformationLineItems" xlink:label="loc_us-gaap_SegmentReportingInformationLineItems_5362C42D4B20FBBB74F34664D3EFEEB0" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" xlink:label="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_86F058F53F0B155523974664D3EF0535" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_5362C42D4B20FBBB74F34664D3EFEEB0" xlink:to="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_86F058F53F0B155523974664D3EF0535" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskByBenchmarkAxis" xlink:label="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_B1F657476ACE401A8AE44666CB2513C0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_86F058F53F0B155523974664D3EF0535" xlink:to="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_B1F657476ACE401A8AE44666CB2513C0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskBenchmarkDomain" xlink:label="loc_us-gaap_ConcentrationRiskBenchmarkDomain_F6DC629625D4B736AC374666CB2E833B_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_B1F657476ACE401A8AE44666CB2513C0" xlink:to="loc_us-gaap_ConcentrationRiskBenchmarkDomain_F6DC629625D4B736AC374666CB2E833B_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskBenchmarkDomain" xlink:label="loc_us-gaap_ConcentrationRiskBenchmarkDomain_F6DC629625D4B736AC374666CB2E833B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_B1F657476ACE401A8AE44666CB2513C0" xlink:to="loc_us-gaap_ConcentrationRiskBenchmarkDomain_F6DC629625D4B736AC374666CB2E833B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NetAssetsGeographicAreaMember" xlink:label="loc_us-gaap_NetAssetsGeographicAreaMember_A966563AEA97028A90994668A7C4DB63" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskBenchmarkDomain_F6DC629625D4B736AC374666CB2E833B" xlink:to="loc_us-gaap_NetAssetsGeographicAreaMember_A966563AEA97028A90994668A7C4DB63" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementGeographicalAxis" xlink:label="loc_us-gaap_StatementGeographicalAxis_4002D215513EF19264694664D3EF2D9E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_86F058F53F0B155523974664D3EF0535" xlink:to="loc_us-gaap_StatementGeographicalAxis_4002D215513EF19264694664D3EF2D9E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentGeographicalDomain" xlink:label="loc_us-gaap_SegmentGeographicalDomain_935B820F6187517D2F294664D3EF8970_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementGeographicalAxis_4002D215513EF19264694664D3EF2D9E" xlink:to="loc_us-gaap_SegmentGeographicalDomain_935B820F6187517D2F294664D3EF8970_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentGeographicalDomain" xlink:label="loc_us-gaap_SegmentGeographicalDomain_935B820F6187517D2F294664D3EF8970" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementGeographicalAxis_4002D215513EF19264694664D3EF2D9E" xlink:to="loc_us-gaap_SegmentGeographicalDomain_935B820F6187517D2F294664D3EF8970" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/country/2017/country-2017-01-31.xsd#country_US" xlink:label="loc_country_US_57F009E98771DE79EB144664D3EF12E3" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentGeographicalDomain_935B820F6187517D2F294664D3EF8970" xlink:to="loc_country_US_57F009E98771DE79EB144664D3EF12E3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_GeographicAreasLongLivedAssetsAbstract" xlink:label="loc_us-gaap_GeographicAreasLongLivedAssetsAbstract_BBB59D26F0A508DCF99F4664D3EF34C6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_5362C42D4B20FBBB74F34664D3EFEEB0" xlink:to="loc_us-gaap_GeographicAreasLongLivedAssetsAbstract_BBB59D26F0A508DCF99F4664D3EF34C6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskPercentage1" xlink:label="loc_us-gaap_ConcentrationRiskPercentage1_A7622CB2822AFE795D7D4667017D7972" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GeographicAreasLongLivedAssetsAbstract_BBB59D26F0A508DCF99F4664D3EF34C6" xlink:to="loc_us-gaap_ConcentrationRiskPercentage1_A7622CB2822AFE795D7D4667017D7972" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationRevenuesByGeographicAreaDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentReportingInformationLineItems" xlink:label="loc_us-gaap_SegmentReportingInformationLineItems_C07EC2861BDC60F32DF1184E28070707" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" xlink:label="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_A6C9C655F5D593EE1F12184E280734CA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_C07EC2861BDC60F32DF1184E28070707" xlink:to="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_A6C9C655F5D593EE1F12184E280734CA" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementGeographicalAxis" xlink:label="loc_us-gaap_StatementGeographicalAxis_C2867A8407B396D41283184E280736F9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_A6C9C655F5D593EE1F12184E280734CA" xlink:to="loc_us-gaap_StatementGeographicalAxis_C2867A8407B396D41283184E280736F9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentGeographicalDomain" xlink:label="loc_us-gaap_SegmentGeographicalDomain_6941A18A82FEDD12D11A184E2807D49B_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementGeographicalAxis_C2867A8407B396D41283184E280736F9" xlink:to="loc_us-gaap_SegmentGeographicalDomain_6941A18A82FEDD12D11A184E2807D49B_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentGeographicalDomain" xlink:label="loc_us-gaap_SegmentGeographicalDomain_6941A18A82FEDD12D11A184E2807D49B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementGeographicalAxis_C2867A8407B396D41283184E280736F9" xlink:to="loc_us-gaap_SegmentGeographicalDomain_6941A18A82FEDD12D11A184E2807D49B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AmericasMember" xlink:label="loc_us-gaap_AmericasMember_074A6EC6B4B65A3E1A0E184E28074621" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentGeographicalDomain_6941A18A82FEDD12D11A184E2807D49B" xlink:to="loc_us-gaap_AmericasMember_074A6EC6B4B65A3E1A0E184E28074621" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EMEAMember" xlink:label="loc_us-gaap_EMEAMember_D5AF906BF6D31665F4CD184E280724AB" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentGeographicalDomain_6941A18A82FEDD12D11A184E2807D49B" xlink:to="loc_us-gaap_EMEAMember_D5AF906BF6D31665F4CD184E280724AB" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_APACMember" xlink:label="loc_cdxs_APACMember_342EAD0DF8504A28AA6D184E280785B4" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentGeographicalDomain_6941A18A82FEDD12D11A184E2807D49B" xlink:to="loc_cdxs_APACMember_342EAD0DF8504A28AA6D184E280785B4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RevenuesAbstract" xlink:label="loc_us-gaap_RevenuesAbstract_16A23F9A4FB9BBF44BB5184E28072983" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_C07EC2861BDC60F32DF1184E28070707" xlink:to="loc_us-gaap_RevenuesAbstract_16A23F9A4FB9BBF44BB5184E28072983" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_Revenues" xlink:label="loc_us-gaap_Revenues_633C6CF40A4F48D1F2F6184E280849EB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RevenuesAbstract_16A23F9A4FB9BBF44BB5184E28072983" xlink:to="loc_us-gaap_Revenues_633C6CF40A4F48D1F2F6184E280849EB" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationSegmentReportingDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentReportingInformationLineItems" xlink:label="loc_us-gaap_SegmentReportingInformationLineItems_E63E7815C8E12C7B2408485D2F384C51" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" xlink:label="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_ABD5D6D98E0DDCA42E5D485D2F38D82B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_E63E7815C8E12C7B2408485D2F384C51" xlink:to="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_ABD5D6D98E0DDCA42E5D485D2F38D82B" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConsolidationItemsAxis" xlink:label="loc_us-gaap_ConsolidationItemsAxis_BBB7231D23861B75891F485D2F38D7D9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_ABD5D6D98E0DDCA42E5D485D2F38D82B" xlink:to="loc_us-gaap_ConsolidationItemsAxis_BBB7231D23861B75891F485D2F38D7D9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConsolidationItemsDomain" xlink:label="loc_us-gaap_ConsolidationItemsDomain_4E42B26406226F9EEEA9485D2F388833_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConsolidationItemsAxis_BBB7231D23861B75891F485D2F38D7D9" xlink:to="loc_us-gaap_ConsolidationItemsDomain_4E42B26406226F9EEEA9485D2F388833_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConsolidationItemsDomain" xlink:label="loc_us-gaap_ConsolidationItemsDomain_4E42B26406226F9EEEA9485D2F388833" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConsolidationItemsAxis_BBB7231D23861B75891F485D2F38D7D9" xlink:to="loc_us-gaap_ConsolidationItemsDomain_4E42B26406226F9EEEA9485D2F388833" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OperatingSegmentsMember" xlink:label="loc_us-gaap_OperatingSegmentsMember_67CEF94BF16841BECA9E485D2F38A95F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConsolidationItemsDomain_4E42B26406226F9EEEA9485D2F388833" xlink:to="loc_us-gaap_OperatingSegmentsMember_67CEF94BF16841BECA9E485D2F38A95F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CorporateNonSegmentMember" xlink:label="loc_us-gaap_CorporateNonSegmentMember_E719AF6619B9AB125EBC485D2F389629" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConsolidationItemsDomain_4E42B26406226F9EEEA9485D2F388833" xlink:to="loc_us-gaap_CorporateNonSegmentMember_E719AF6619B9AB125EBC485D2F389629" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_B843F43E560D9565465A485D2F38BF5F" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_ABD5D6D98E0DDCA42E5D485D2F38D82B" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_B843F43E560D9565465A485D2F38BF5F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_CCC2C4C36F6E91FF06D7485D2F38FB32_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_B843F43E560D9565465A485D2F38BF5F" xlink:to="loc_us-gaap_SegmentDomain_CCC2C4C36F6E91FF06D7485D2F38FB32_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_CCC2C4C36F6E91FF06D7485D2F38FB32" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_B843F43E560D9565465A485D2F38BF5F" xlink:to="loc_us-gaap_SegmentDomain_CCC2C4C36F6E91FF06D7485D2F38FB32" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_CoreSegmentMember" xlink:label="loc_cdxs_CoreSegmentMember_6C12C8AA0EF920F2D63D485D2F38567F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_CCC2C4C36F6E91FF06D7485D2F38FB32" xlink:to="loc_cdxs_CoreSegmentMember_6C12C8AA0EF920F2D63D485D2F38567F" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_BiotherapeuticSegmentMember" xlink:label="loc_cdxs_BiotherapeuticSegmentMember_6982789279A59C78DEFB485D2F3877A2" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_CCC2C4C36F6E91FF06D7485D2F38FB32" xlink:to="loc_cdxs_BiotherapeuticSegmentMember_6982789279A59C78DEFB485D2F3877A2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NumberOfOperatingSegments" xlink:label="loc_us-gaap_NumberOfOperatingSegments_BDFD15C0DF6BE0D80C4E485D2F3810E7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_E63E7815C8E12C7B2408485D2F384C51" xlink:to="loc_us-gaap_NumberOfOperatingSegments_BDFD15C0DF6BE0D80C4E485D2F3810E7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SalesRevenueGoodsGross" xlink:label="loc_us-gaap_SalesRevenueGoodsGross_E93C284B0B7E5394071F485D2F38CBAE" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_E63E7815C8E12C7B2408485D2F384C51" xlink:to="loc_us-gaap_SalesRevenueGoodsGross_E93C284B0B7E5394071F485D2F38CBAE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ResearchAndDevelopmentArrangementContractToPerformForOthersCompensationEarned" xlink:label="loc_us-gaap_ResearchAndDevelopmentArrangementContractToPerformForOthersCompensationEarned_A48595308EA2AFC171B4485D2F3858E2" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_E63E7815C8E12C7B2408485D2F384C51" xlink:to="loc_us-gaap_ResearchAndDevelopmentArrangementContractToPerformForOthersCompensationEarned_A48595308EA2AFC171B4485D2F3858E2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_Revenues" xlink:label="loc_us-gaap_Revenues_6B4F93CAA280C98F268A485D2F381A75" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_E63E7815C8E12C7B2408485D2F384C51" xlink:to="loc_us-gaap_Revenues_6B4F93CAA280C98F268A485D2F381A75" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CostOfGoodsSold" xlink:label="loc_us-gaap_CostOfGoodsSold_39D0745A97495792852C485D2F38D316" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_E63E7815C8E12C7B2408485D2F384C51" xlink:to="loc_us-gaap_CostOfGoodsSold_39D0745A97495792852C485D2F38D316" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ResearchAndDevelopmentExpense" xlink:label="loc_us-gaap_ResearchAndDevelopmentExpense_2C64368E0CE94CF18C13485D2F38D277" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_E63E7815C8E12C7B2408485D2F384C51" xlink:to="loc_us-gaap_ResearchAndDevelopmentExpense_2C64368E0CE94CF18C13485D2F38D277" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SellingGeneralAndAdministrativeExpense" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpense_1B70BB970DAC5FE43DD9485D2F3885A3" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_E63E7815C8E12C7B2408485D2F384C51" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpense_1B70BB970DAC5FE43DD9485D2F3885A3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OperatingExpenses" xlink:label="loc_us-gaap_OperatingExpenses_915E5EC1375F4F867D3F485D2F38BCF7" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_E63E7815C8E12C7B2408485D2F384C51" xlink:to="loc_us-gaap_OperatingExpenses_915E5EC1375F4F867D3F485D2F38BCF7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OperatingIncomeLoss" xlink:label="loc_us-gaap_OperatingIncomeLoss_03A4BD7044006CAD94A1485D2F38432C" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_E63E7815C8E12C7B2408485D2F384C51" xlink:to="loc_us-gaap_OperatingIncomeLoss_03A4BD7044006CAD94A1485D2F38432C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_Depreciation" xlink:label="loc_us-gaap_Depreciation_3E63B0841BDFABE1BFE5485D2F380871" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_E63E7815C8E12C7B2408485D2F384C51" xlink:to="loc_us-gaap_Depreciation_3E63B0841BDFABE1BFE5485D2F380871" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments_6149C669C25888681642485D2F38736D" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_E63E7815C8E12C7B2408485D2F384C51" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments_6149C669C25888681642485D2F38736D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensation" xlink:label="loc_us-gaap_ShareBasedCompensation_FF20DDF369B2B77720BD485D2F38E3DD" xlink:type="locator" />
    <link:definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_E63E7815C8E12C7B2408485D2F384C51" xlink:to="loc_us-gaap_ShareBasedCompensation_FF20DDF369B2B77720BD485D2F38E3DD" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.codexis.com/role/SegmentGeographicalAndOtherRevenueInformationTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/StockBasedCompensation" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/StockBasedCompensationStockBasedCompensationExpenseDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_2D56246E50275562B8440F9CB94A378B" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTable" xlink:label="loc_us-gaap_ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTable_8917D9BA31E459DBBFB696374D18C37A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_2D56246E50275562B8440F9CB94A378B" xlink:to="loc_us-gaap_ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTable_8917D9BA31E459DBBFB696374D18C37A" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationAxis" xlink:label="loc_us-gaap_IncomeStatementLocationAxis_5431875942B259CCB2A88EF34E9B2825" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTable_8917D9BA31E459DBBFB696374D18C37A" xlink:to="loc_us-gaap_IncomeStatementLocationAxis_5431875942B259CCB2A88EF34E9B2825" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_2FAF17DC723EFF45128A265C5320EFA3_20900B910BF6590881153FB371F47846" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_5431875942B259CCB2A88EF34E9B2825" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_2FAF17DC723EFF45128A265C5320EFA3_20900B910BF6590881153FB371F47846" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_BED8B03ABF485D409900C57F2DEEEFC9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_5431875942B259CCB2A88EF34E9B2825" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_BED8B03ABF485D409900C57F2DEEEFC9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ResearchAndDevelopmentExpenseMember" xlink:label="loc_us-gaap_ResearchAndDevelopmentExpenseMember_5706AE52E58B5E7A8034EF99132E19D5" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_BED8B03ABF485D409900C57F2DEEEFC9" xlink:to="loc_us-gaap_ResearchAndDevelopmentExpenseMember_5706AE52E58B5E7A8034EF99132E19D5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SellingGeneralAndAdministrativeExpensesMember" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpensesMember_D5226459542C50EB90A46BCD51299EEF" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_BED8B03ABF485D409900C57F2DEEEFC9" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpensesMember_D5226459542C50EB90A46BCD51299EEF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AwardTypeAxis" xlink:label="loc_us-gaap_AwardTypeAxis_5CE021563F805E80A2FBE0F49E35CF80" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTable_8917D9BA31E459DBBFB696374D18C37A" xlink:to="loc_us-gaap_AwardTypeAxis_5CE021563F805E80A2FBE0F49E35CF80" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_C396C8FABCBA010DBBF9265C53201575_20900B910BF6590881153FB371F47846" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_5CE021563F805E80A2FBE0F49E35CF80" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_C396C8FABCBA010DBBF9265C53201575_20900B910BF6590881153FB371F47846" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_B896142E0D675A90875A6AEC191D57EE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_5CE021563F805E80A2FBE0F49E35CF80" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_B896142E0D675A90875A6AEC191D57EE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EmployeeStockOptionMember" xlink:label="loc_us-gaap_EmployeeStockOptionMember_960818C2C0ED532897FE19D3B5C9C11D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_B896142E0D675A90875A6AEC191D57EE" xlink:to="loc_us-gaap_EmployeeStockOptionMember_960818C2C0ED532897FE19D3B5C9C11D" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_RSAsandRSUsMember" xlink:label="loc_cdxs_RSAsandRSUsMember_69D2042EB8A45B45B30A838F853F152E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_B896142E0D675A90875A6AEC191D57EE" xlink:to="loc_cdxs_RSAsandRSUsMember_69D2042EB8A45B45B30A838F853F152E" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_PerformanceStockUnitsMember" xlink:label="loc_cdxs_PerformanceStockUnitsMember_A92345C43F1159278D2C4EF291181DF4" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_B896142E0D675A90875A6AEC191D57EE" xlink:to="loc_cdxs_PerformanceStockUnitsMember_A92345C43F1159278D2C4EF291181DF4" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_PerformanceBasedOptionsPBOsMember" xlink:label="loc_cdxs_PerformanceBasedOptionsPBOsMember_3912F63BB4F85CEFA89386A0772ECED5" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_B896142E0D675A90875A6AEC191D57EE" xlink:to="loc_cdxs_PerformanceBasedOptionsPBOsMember_3912F63BB4F85CEFA89386A0772ECED5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensation" xlink:label="loc_us-gaap_ShareBasedCompensation_762E66670CE1566DA5D1BAA69012FBB2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_2D56246E50275562B8440F9CB94A378B" xlink:to="loc_us-gaap_ShareBasedCompensation_762E66670CE1566DA5D1BAA69012FBB2" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.codexis.com/role/StockBasedCompensationTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/StockBasedCompensationTextualDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_BB377292EFDC230117D4FE08B7C23A28" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_07DA916D258830CCB5C3FE08B7B2AA79" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_BB377292EFDC230117D4FE08B7C23A28" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_07DA916D258830CCB5C3FE08B7B2AA79" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PlanNameAxis" xlink:label="loc_us-gaap_PlanNameAxis_15B0CE27A77BF836E3C4FE08B7B26399" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_07DA916D258830CCB5C3FE08B7B2AA79" xlink:to="loc_us-gaap_PlanNameAxis_15B0CE27A77BF836E3C4FE08B7B26399" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PlanNameDomain" xlink:label="loc_us-gaap_PlanNameDomain_4371C0B093A49B0B61ABFE08B7B24614_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_PlanNameAxis_15B0CE27A77BF836E3C4FE08B7B26399" xlink:to="loc_us-gaap_PlanNameDomain_4371C0B093A49B0B61ABFE08B7B24614_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PlanNameDomain" xlink:label="loc_us-gaap_PlanNameDomain_4371C0B093A49B0B61ABFE08B7B24614" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_PlanNameAxis_15B0CE27A77BF836E3C4FE08B7B26399" xlink:to="loc_us-gaap_PlanNameDomain_4371C0B093A49B0B61ABFE08B7B24614" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_TwoThousandTenPlanMember" xlink:label="loc_cdxs_TwoThousandTenPlanMember_6965606B94FBABBD2DE4FE08B7B24D01" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanNameDomain_4371C0B093A49B0B61ABFE08B7B24614" xlink:to="loc_cdxs_TwoThousandTenPlanMember_6965606B94FBABBD2DE4FE08B7B24D01" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_A2016PSUPlanMember" xlink:label="loc_cdxs_A2016PSUPlanMember_4408E2FA45B4DC9F10F3FE08B7B268AE" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanNameDomain_4371C0B093A49B0B61ABFE08B7B24614" xlink:to="loc_cdxs_A2016PSUPlanMember_4408E2FA45B4DC9F10F3FE08B7B268AE" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_A2015PSUPlanMember" xlink:label="loc_cdxs_A2015PSUPlanMember_1CBF033193D00390435FFE08B7B26F0D" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanNameDomain_4371C0B093A49B0B61ABFE08B7B24614" xlink:to="loc_cdxs_A2015PSUPlanMember_1CBF033193D00390435FFE08B7B26F0D" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_A2017PSUandPBOPlanMember" xlink:label="loc_cdxs_A2017PSUandPBOPlanMember_71C7DC42AAAD328F7F27FE08B7B2CED4" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanNameDomain_4371C0B093A49B0B61ABFE08B7B24614" xlink:to="loc_cdxs_A2017PSUandPBOPlanMember_71C7DC42AAAD328F7F27FE08B7B2CED4" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_A2017PSUPlanMember" xlink:label="loc_cdxs_A2017PSUPlanMember_9F8CB2E192148E4D7148FE08B7B27837" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_A2017PSUandPBOPlanMember_71C7DC42AAAD328F7F27FE08B7B2CED4" xlink:to="loc_cdxs_A2017PSUPlanMember_9F8CB2E192148E4D7148FE08B7B27837" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_A2017PBOPlanMember" xlink:label="loc_cdxs_A2017PBOPlanMember_EB32C4AFBCAB8A4E5A9BFE08B7B230C3" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_cdxs_A2017PSUandPBOPlanMember_71C7DC42AAAD328F7F27FE08B7B2CED4" xlink:to="loc_cdxs_A2017PBOPlanMember_EB32C4AFBCAB8A4E5A9BFE08B7B230C3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeAxis" xlink:label="loc_us-gaap_RangeAxis_9A7EF2418423682A06C2FE08B7B2334D" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_07DA916D258830CCB5C3FE08B7B2AA79" xlink:to="loc_us-gaap_RangeAxis_9A7EF2418423682A06C2FE08B7B2334D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_D46A70F3FB27701453CAFE08B7B21C7B_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RangeAxis_9A7EF2418423682A06C2FE08B7B2334D" xlink:to="loc_us-gaap_RangeMember_D46A70F3FB27701453CAFE08B7B21C7B_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_D46A70F3FB27701453CAFE08B7B21C7B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RangeAxis_9A7EF2418423682A06C2FE08B7B2334D" xlink:to="loc_us-gaap_RangeMember_D46A70F3FB27701453CAFE08B7B21C7B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MaximumMember" xlink:label="loc_us-gaap_MaximumMember_B3BE7E42E75BFA267558FE08B7B24D7D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_D46A70F3FB27701453CAFE08B7B21C7B" xlink:to="loc_us-gaap_MaximumMember_B3BE7E42E75BFA267558FE08B7B24D7D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MinimumMember" xlink:label="loc_us-gaap_MinimumMember_2AB1197EF2C8C505D203FE08B7B2A47B" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_D46A70F3FB27701453CAFE08B7B21C7B" xlink:to="loc_us-gaap_MinimumMember_2AB1197EF2C8C505D203FE08B7B2A47B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AwardTypeAxis" xlink:label="loc_us-gaap_AwardTypeAxis_06057C8064E415CD6868FE08B7B254AF" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_07DA916D258830CCB5C3FE08B7B2AA79" xlink:to="loc_us-gaap_AwardTypeAxis_06057C8064E415CD6868FE08B7B254AF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_A8B0028CBA202F4E7A6AFE08B7B23A6F_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_06057C8064E415CD6868FE08B7B254AF" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_A8B0028CBA202F4E7A6AFE08B7B23A6F_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_A8B0028CBA202F4E7A6AFE08B7B23A6F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_06057C8064E415CD6868FE08B7B254AF" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_A8B0028CBA202F4E7A6AFE08B7B23A6F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EmployeeStockOptionMember" xlink:label="loc_us-gaap_EmployeeStockOptionMember_8C684BEEA2E0B0E95F53FE08B7B2AE96" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_A8B0028CBA202F4E7A6AFE08B7B23A6F" xlink:to="loc_us-gaap_EmployeeStockOptionMember_8C684BEEA2E0B0E95F53FE08B7B2AE96" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_IncentiveStockOptionsMember" xlink:label="loc_cdxs_IncentiveStockOptionsMember_4CD19C7DFC9AAD37935AFE08B7B27171" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EmployeeStockOptionMember_8C684BEEA2E0B0E95F53FE08B7B2AE96" xlink:to="loc_cdxs_IncentiveStockOptionsMember_4CD19C7DFC9AAD37935AFE08B7B27171" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_NonStatutoryStockOptionsMember" xlink:label="loc_cdxs_NonStatutoryStockOptionsMember_75E83D2EC8F085F3018AFE08B7B2D03E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EmployeeStockOptionMember_8C684BEEA2E0B0E95F53FE08B7B2AE96" xlink:to="loc_cdxs_NonStatutoryStockOptionsMember_75E83D2EC8F085F3018AFE08B7B2D03E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestrictedStockUnitsRSUMember" xlink:label="loc_us-gaap_RestrictedStockUnitsRSUMember_41AB2579CE4A9715A3A0FE08B7B25D7E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_A8B0028CBA202F4E7A6AFE08B7B23A6F" xlink:to="loc_us-gaap_RestrictedStockUnitsRSUMember_41AB2579CE4A9715A3A0FE08B7B25D7E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PerformanceSharesMember" xlink:label="loc_us-gaap_PerformanceSharesMember_A9765BA0E7B71C73BDD1FE08B7B2965F" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_A8B0028CBA202F4E7A6AFE08B7B23A6F" xlink:to="loc_us-gaap_PerformanceSharesMember_A9765BA0E7B71C73BDD1FE08B7B2965F" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_RSAsandRSUsMember" xlink:label="loc_cdxs_RSAsandRSUsMember_2158AC459B3F4F2A01B8FE08B7B2D135" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_A8B0028CBA202F4E7A6AFE08B7B23A6F" xlink:to="loc_cdxs_RSAsandRSUsMember_2158AC459B3F4F2A01B8FE08B7B2D135" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_PerformanceStockUnitsMember" xlink:label="loc_cdxs_PerformanceStockUnitsMember_A2FB00F834D57092A81EFE08B7B27094" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_A8B0028CBA202F4E7A6AFE08B7B23A6F" xlink:to="loc_cdxs_PerformanceStockUnitsMember_A2FB00F834D57092A81EFE08B7B27094" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_PerformanceBasedOptionsPBOsMember" xlink:label="loc_cdxs_PerformanceBasedOptionsPBOsMember_31A90564CDAE83A0CBE8FE08B7B20C9D" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_A8B0028CBA202F4E7A6AFE08B7B23A6F" xlink:to="loc_cdxs_PerformanceBasedOptionsPBOsMember_31A90564CDAE83A0CBE8FE08B7B20C9D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_VestingAxis" xlink:label="loc_us-gaap_VestingAxis_3CD8C19273571FE8833CFE08B7B261F7" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_07DA916D258830CCB5C3FE08B7B2AA79" xlink:to="loc_us-gaap_VestingAxis_3CD8C19273571FE8833CFE08B7B261F7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_VestingDomain" xlink:label="loc_us-gaap_VestingDomain_1389272EA5D49B1A6B19FE08B7B2BC4F_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_VestingAxis_3CD8C19273571FE8833CFE08B7B261F7" xlink:to="loc_us-gaap_VestingDomain_1389272EA5D49B1A6B19FE08B7B2BC4F_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_VestingDomain" xlink:label="loc_us-gaap_VestingDomain_1389272EA5D49B1A6B19FE08B7B2BC4F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_VestingAxis_3CD8C19273571FE8833CFE08B7B261F7" xlink:to="loc_us-gaap_VestingDomain_1389272EA5D49B1A6B19FE08B7B2BC4F" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_SharebasedCompensationAwardTrancheSixMember" xlink:label="loc_cdxs_SharebasedCompensationAwardTrancheSixMember_7793CA35957B6C39BB6BFE08B7B2543E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_VestingDomain_1389272EA5D49B1A6B19FE08B7B2BC4F" xlink:to="loc_cdxs_SharebasedCompensationAwardTrancheSixMember_7793CA35957B6C39BB6BFE08B7B2543E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationAwardTrancheOneMember" xlink:label="loc_us-gaap_ShareBasedCompensationAwardTrancheOneMember_58087E924A0F433C4188FE08B7B29008" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_VestingDomain_1389272EA5D49B1A6B19FE08B7B2BC4F" xlink:to="loc_us-gaap_ShareBasedCompensationAwardTrancheOneMember_58087E924A0F433C4188FE08B7B29008" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationAwardTrancheTwoMember" xlink:label="loc_us-gaap_ShareBasedCompensationAwardTrancheTwoMember_D15A50F61EC006179A61FE08B7B2D873" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_VestingDomain_1389272EA5D49B1A6B19FE08B7B2BC4F" xlink:to="loc_us-gaap_ShareBasedCompensationAwardTrancheTwoMember_D15A50F61EC006179A61FE08B7B2D873" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationAwardTrancheThreeMember" xlink:label="loc_us-gaap_ShareBasedCompensationAwardTrancheThreeMember_75069F091E9444433AF0FE08B7B297EF" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_VestingDomain_1389272EA5D49B1A6B19FE08B7B2BC4F" xlink:to="loc_us-gaap_ShareBasedCompensationAwardTrancheThreeMember_75069F091E9444433AF0FE08B7B297EF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DeferredCompensationArrangementWithIndividualSharesAuthorizedForIssuance" xlink:label="loc_us-gaap_DeferredCompensationArrangementWithIndividualSharesAuthorizedForIssuance_F539DE9062724EA6C061FE08B7C22795" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_BB377292EFDC230117D4FE08B7C23A28" xlink:to="loc_us-gaap_DeferredCompensationArrangementWithIndividualSharesAuthorizedForIssuance_F539DE9062724EA6C061FE08B7C22795" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardPurchasePriceOfCommonStockPercent" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardPurchasePriceOfCommonStockPercent_9F1C11BD726724E15D72FE08B7C2A84D" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_BB377292EFDC230117D4FE08B7C23A28" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardPurchasePriceOfCommonStockPercent_9F1C11BD726724E15D72FE08B7C2A84D" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_PercentofVotingInterestsThresholdtotriggerhigherexerciseprice" xlink:label="loc_cdxs_PercentofVotingInterestsThresholdtotriggerhigherexerciseprice_E715E0CF274828791E2BFE08B7C23C10" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_BB377292EFDC230117D4FE08B7C23A28" xlink:to="loc_cdxs_PercentofVotingInterestsThresholdtotriggerhigherexerciseprice_E715E0CF274828791E2BFE08B7C23C10" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_ShareBasedCompensationArrangementByShareBasedPaymentAwardPurchasePriceOfCommonStockAboveMinimumThresholdPercent" xlink:label="loc_cdxs_ShareBasedCompensationArrangementByShareBasedPaymentAwardPurchasePriceOfCommonStockAboveMinimumThresholdPercent_843BECC6ED9D5B2916CBFE08B7C2D5BF" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_BB377292EFDC230117D4FE08B7C23A28" xlink:to="loc_cdxs_ShareBasedCompensationArrangementByShareBasedPaymentAwardPurchasePriceOfCommonStockAboveMinimumThresholdPercent_843BECC6ED9D5B2916CBFE08B7C2D5BF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod_20A703A0370A40A47713FE08B7C26139" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_BB377292EFDC230117D4FE08B7C23A28" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod_20A703A0370A40A47713FE08B7C26139" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1_39CA8559FABFC0C6FAEDFE08B7C2891D" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_BB377292EFDC230117D4FE08B7C23A28" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1_39CA8559FABFC0C6FAEDFE08B7C2891D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardAwardVestingRightsPercentage" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardAwardVestingRightsPercentage_3EC9EAB6CE103CE431A4FE08B7C2F289" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_BB377292EFDC230117D4FE08B7C23A28" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardAwardVestingRightsPercentage_3EC9EAB6CE103CE431A4FE08B7C2F289" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_SharebasedCompensationArrangementBySharebasedPaymentAwardAwardFutureVestingRightsPercentage" xlink:label="loc_cdxs_SharebasedCompensationArrangementBySharebasedPaymentAwardAwardFutureVestingRightsPercentage_43F476387152B6C54DF4FE08B7C293B7" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_BB377292EFDC230117D4FE08B7C23A28" xlink:to="loc_cdxs_SharebasedCompensationArrangementBySharebasedPaymentAwardAwardFutureVestingRightsPercentage_43F476387152B6C54DF4FE08B7C293B7" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_SharebasedCompensationArrangementbySharebasedPaymentAwardEstimatedPerformanceGoalAchievementRate" xlink:label="loc_cdxs_SharebasedCompensationArrangementbySharebasedPaymentAwardEstimatedPerformanceGoalAchievementRate_0D17D15C2A44AA4309D3FE102C5335C9" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_BB377292EFDC230117D4FE08B7C23A28" xlink:to="loc_cdxs_SharebasedCompensationArrangementbySharebasedPaymentAwardEstimatedPerformanceGoalAchievementRate_0D17D15C2A44AA4309D3FE102C5335C9" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_SharebasedCompensationArrangementbySharebasedPaymentAwardPerformanceAwardsThresholdLevelNumberofSharesMultiplier" xlink:label="loc_cdxs_SharebasedCompensationArrangementbySharebasedPaymentAwardPerformanceAwardsThresholdLevelNumberofSharesMultiplier_55D1664CE57D3AE0BF34FE08B7C29141" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_BB377292EFDC230117D4FE08B7C23A28" xlink:to="loc_cdxs_SharebasedCompensationArrangementbySharebasedPaymentAwardPerformanceAwardsThresholdLevelNumberofSharesMultiplier_55D1664CE57D3AE0BF34FE08B7C29141" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_F6626F0EFCC17642DAE3FE08B7C22C23" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_BB377292EFDC230117D4FE08B7C23A28" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_F6626F0EFCC17642DAE3FE08B7C22C23" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedStockOptions" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedStockOptions_27D2CCDD03CB5ADCDDD5FE08B7C24C5B" xlink:type="locator" />
    <link:definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_BB377292EFDC230117D4FE08B7C23A28" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedStockOptions_27D2CCDD03CB5ADCDDD5FE08B7C24C5B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedShareBasedAwardsOtherThanOptions" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedShareBasedAwardsOtherThanOptions_7AF76AA2D9B57FB3730FFE08B7C28151" xlink:type="locator" />
    <link:definitionArc order="13" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_BB377292EFDC230117D4FE08B7C23A28" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedShareBasedAwardsOtherThanOptions_7AF76AA2D9B57FB3730FFE08B7C28151" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.codexis.com/role/StockBasedCompensationValuationAssumptionsDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_9018EB2152435A5C3D28418778D0CF81" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_8A2E65AE44E58EF4B5A6418778D00BC9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_9018EB2152435A5C3D28418778D0CF81" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_8A2E65AE44E58EF4B5A6418778D00BC9" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AwardTypeAxis" xlink:label="loc_us-gaap_AwardTypeAxis_0B96FAB723FFADCED7C6418778D089C3" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_8A2E65AE44E58EF4B5A6418778D00BC9" xlink:to="loc_us-gaap_AwardTypeAxis_0B96FAB723FFADCED7C6418778D089C3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_CEEBCA433F8BB97073FE418778D0ACCC_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_0B96FAB723FFADCED7C6418778D089C3" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_CEEBCA433F8BB97073FE418778D0ACCC_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_CEEBCA433F8BB97073FE418778D0ACCC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_0B96FAB723FFADCED7C6418778D089C3" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_CEEBCA433F8BB97073FE418778D0ACCC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EmployeeStockOptionMember" xlink:label="loc_us-gaap_EmployeeStockOptionMember_BD0478E839F2AF328299418778D0E7F2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_CEEBCA433F8BB97073FE418778D0ACCC" xlink:to="loc_us-gaap_EmployeeStockOptionMember_BD0478E839F2AF328299418778D0E7F2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardFairValueAssumptionsExpectedTerm1" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardFairValueAssumptionsExpectedTerm1_87E7E0709BAF0E442290418778D0ED0D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_9018EB2152435A5C3D28418778D0CF81" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardFairValueAssumptionsExpectedTerm1_87E7E0709BAF0E442290418778D0ED0D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsWeightedAverageVolatilityRate" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsWeightedAverageVolatilityRate_0CD17B7DA4020A69FEE1418778D0B250" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_9018EB2152435A5C3D28418778D0CF81" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsWeightedAverageVolatilityRate_0CD17B7DA4020A69FEE1418778D0B250" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsRiskFreeInterestRate" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsRiskFreeInterestRate_BBC967EF0DB8A29F4D4D418778D10DF7" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_9018EB2152435A5C3D28418778D0CF81" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsRiskFreeInterestRate_BBC967EF0DB8A29F4D4D418778D10DF7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedDividendRate" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedDividendRate_121761A22D948EF969AE418778D12CC8" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_9018EB2152435A5C3D28418778D0CF81" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedDividendRate_121761A22D948EF969AE418778D12CC8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageGrantDateFairValue" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_36E4020B73BE4357A59F418778D1F069" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_9018EB2152435A5C3D28418778D0CF81" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_36E4020B73BE4357A59F418778D1F069" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.codexis.com/role/SubsequentEvents" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.codexis.com/role/SubsequentEventsTextualDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SubsequentEventLineItems" xlink:label="loc_us-gaap_SubsequentEventLineItems_A3D58A49799FC79590964664D3DF3AA8" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SubsequentEventTable" xlink:label="loc_us-gaap_SubsequentEventTable_2A82261D0575C158387D4664D3DF2832" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SubsequentEventLineItems_A3D58A49799FC79590964664D3DF3AA8" xlink:to="loc_us-gaap_SubsequentEventTable_2A82261D0575C158387D4664D3DF2832" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SubsidiarySaleOfStockAxis" xlink:label="loc_us-gaap_SubsidiarySaleOfStockAxis_121B8B908D5B312E1F85466C3056D042" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_SubsequentEventTable_2A82261D0575C158387D4664D3DF2832" xlink:to="loc_us-gaap_SubsidiarySaleOfStockAxis_121B8B908D5B312E1F85466C3056D042" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SaleOfStockNameOfTransactionDomain" xlink:label="loc_us-gaap_SaleOfStockNameOfTransactionDomain_2732E1783AB3B5833E43466C3056EA52_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_SubsidiarySaleOfStockAxis_121B8B908D5B312E1F85466C3056D042" xlink:to="loc_us-gaap_SaleOfStockNameOfTransactionDomain_2732E1783AB3B5833E43466C3056EA52_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SaleOfStockNameOfTransactionDomain" xlink:label="loc_us-gaap_SaleOfStockNameOfTransactionDomain_2732E1783AB3B5833E43466C3056EA52" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_SubsidiarySaleOfStockAxis_121B8B908D5B312E1F85466C3056D042" xlink:to="loc_us-gaap_SaleOfStockNameOfTransactionDomain_2732E1783AB3B5833E43466C3056EA52" xlink:type="arc" />
    <link:loc xlink:href="cdxs-20180331.xsd#cdxs_UnderwrittenPublicOfferingMember" xlink:label="loc_cdxs_UnderwrittenPublicOfferingMember_590D76B9B4F2680E8648466D25BC283A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SaleOfStockNameOfTransactionDomain_2732E1783AB3B5833E43466C3056EA52" xlink:to="loc_cdxs_UnderwrittenPublicOfferingMember_590D76B9B4F2680E8648466D25BC283A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OverAllotmentOptionMember" xlink:label="loc_us-gaap_OverAllotmentOptionMember_3F773F261287AB25635A46798EBF70A1" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SaleOfStockNameOfTransactionDomain_2732E1783AB3B5833E43466C3056EA52" xlink:to="loc_us-gaap_OverAllotmentOptionMember_3F773F261287AB25635A46798EBF70A1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SubsequentEventTypeAxis" xlink:label="loc_us-gaap_SubsequentEventTypeAxis_AD53F95B9BBEEA8595934664D3DFE00E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_SubsequentEventTable_2A82261D0575C158387D4664D3DF2832" xlink:to="loc_us-gaap_SubsequentEventTypeAxis_AD53F95B9BBEEA8595934664D3DFE00E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SubsequentEventTypeDomain" xlink:label="loc_us-gaap_SubsequentEventTypeDomain_E3A4474E0776E48316614664D3DF91DA_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_SubsequentEventTypeAxis_AD53F95B9BBEEA8595934664D3DFE00E" xlink:to="loc_us-gaap_SubsequentEventTypeDomain_E3A4474E0776E48316614664D3DF91DA_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SubsequentEventTypeDomain" xlink:label="loc_us-gaap_SubsequentEventTypeDomain_E3A4474E0776E48316614664D3DF91DA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_SubsequentEventTypeAxis_AD53F95B9BBEEA8595934664D3DFE00E" xlink:to="loc_us-gaap_SubsequentEventTypeDomain_E3A4474E0776E48316614664D3DF91DA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SubsequentEventMember" xlink:label="loc_us-gaap_SubsequentEventMember_04704A4272B9170865D24664D3DFDC65" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SubsequentEventTypeDomain_E3A4474E0776E48316614664D3DF91DA" xlink:to="loc_us-gaap_SubsequentEventMember_04704A4272B9170865D24664D3DFDC65" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SaleOfStockNumberOfSharesIssuedInTransaction" xlink:label="loc_us-gaap_SaleOfStockNumberOfSharesIssuedInTransaction_A66E6F10BDAAD719D6E4466BFD8ABEA6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SubsequentEventLineItems_A3D58A49799FC79590964664D3DF3AA8" xlink:to="loc_us-gaap_SaleOfStockNumberOfSharesIssuedInTransaction_A66E6F10BDAAD719D6E4466BFD8ABEA6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SaleOfStockPricePerShare" xlink:label="loc_us-gaap_SaleOfStockPricePerShare_CCA9421724759EB502E6466EDD069151" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SubsequentEventLineItems_A3D58A49799FC79590964664D3DF3AA8" xlink:to="loc_us-gaap_SaleOfStockPricePerShare_CCA9421724759EB502E6466EDD069151" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SaleOfStockConsiderationReceivedOnTransaction" xlink:label="loc_us-gaap_SaleOfStockConsiderationReceivedOnTransaction_C1DA12C4608680FFCC67466B22A8B3A6" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SubsequentEventLineItems_A3D58A49799FC79590964664D3DF3AA8" xlink:to="loc_us-gaap_SaleOfStockConsiderationReceivedOnTransaction_C1DA12C4608680FFCC67466B22A8B3A6" xlink:type="arc" />
  </link:definitionLink>
</link:linkbase>
