<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0203</schemaVersion>

    <documentType>3</documentType>

    <periodOfReport>2011-06-01</periodOfReport>

    <noSecuritiesOwned>0</noSecuritiesOwned>

    <issuer>
        <issuerCik>0001200375</issuerCik>
        <issuerName>CODEXIS INC</issuerName>
        <issuerTradingSymbol>CDXS</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001521163</rptOwnerCik>
            <rptOwnerName>Raizen Energia Participacoes S.A.</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>AVENIDA PRESIDENTE JUSCELINO KUBITSCHECK</rptOwnerStreet1>
            <rptOwnerStreet2>1327 6 O ANDAR</rptOwnerStreet2>
            <rptOwnerCity>SAO PAULO</rptOwnerCity>
            <rptOwnerState>D5</rptOwnerState>
            <rptOwnerZipCode>04543-011</rptOwnerZipCode>
            <rptOwnerStateDescription>BRAZIL</rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>1</isTenPercentOwner>
            <isOther>0</isOther>
            <officerTitle></officerTitle>
            <otherText></otherText>
        </reportingOwnerRelationship>
    </reportingOwner>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001517347</rptOwnerCik>
            <rptOwnerName>Ispagnac Participacoes Ltda.</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>AVENIDA DAS AMERICAS 4200 BLOCO 6,</rptOwnerStreet1>
            <rptOwnerStreet2>1 O ANDAR, (PART) BARRA DA TIJUCA</rptOwnerStreet2>
            <rptOwnerCity>RIO DE JANEIRO, RJ CEP</rptOwnerCity>
            <rptOwnerState>D5</rptOwnerState>
            <rptOwnerZipCode>22640-102</rptOwnerZipCode>
            <rptOwnerStateDescription>BRAZIL</rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>1</isTenPercentOwner>
            <isOther>0</isOther>
            <officerTitle></officerTitle>
            <otherText></otherText>
        </reportingOwnerRelationship>
    </reportingOwner>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001306965</rptOwnerCik>
            <rptOwnerName>Royal Dutch Shell plc</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>30, CAREL VAN BYLANDTLAAN</rptOwnerStreet1>
            <rptOwnerStreet2></rptOwnerStreet2>
            <rptOwnerCity>THE HAGUE</rptOwnerCity>
            <rptOwnerState>P7</rptOwnerState>
            <rptOwnerZipCode>2596 HR</rptOwnerZipCode>
            <rptOwnerStateDescription>NETHERLANDS</rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>1</isTenPercentOwner>
            <isOther>0</isOther>
            <officerTitle></officerTitle>
            <otherText></otherText>
        </reportingOwnerRelationship>
    </reportingOwner>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001430162</rptOwnerCik>
            <rptOwnerName>Cosan S.A. Industria e Comercio</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>AVENIDA PRESIDENTE JUSCELINO KUBITSCHEK,</rptOwnerStreet1>
            <rptOwnerStreet2>1327, 4 O ANDAR</rptOwnerStreet2>
            <rptOwnerCity>SAO PAULO, SP CEP</rptOwnerCity>
            <rptOwnerState>D5</rptOwnerState>
            <rptOwnerZipCode>04543-011</rptOwnerZipCode>
            <rptOwnerStateDescription>BRAZIL</rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>1</isTenPercentOwner>
            <isOther>0</isOther>
            <officerTitle></officerTitle>
            <otherText></otherText>
        </reportingOwnerRelationship>
    </reportingOwner>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001402902</rptOwnerCik>
            <rptOwnerName>Cosan Ltd.</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>AVENIDA PRESIDENTE JUSCELINO KUBITSCHEK,</rptOwnerStreet1>
            <rptOwnerStreet2>1726 6TH FLOOR</rptOwnerStreet2>
            <rptOwnerCity>SAO PAULO, SP</rptOwnerCity>
            <rptOwnerState>D5</rptOwnerState>
            <rptOwnerZipCode>04543-000</rptOwnerZipCode>
            <rptOwnerStateDescription>BRAZIL</rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>1</isTenPercentOwner>
            <isOther>0</isOther>
            <officerTitle></officerTitle>
            <otherText></otherText>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable>
        <nonDerivativeHolding>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>5573319</value>
                    <footnoteId id="F1"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
    </nonDerivativeTable>

    <derivativeTable></derivativeTable>

    <footnotes>
        <footnote id="F1">(1) Acquisition of Codexis Common Stock by Raizen Energia Participacoes S.A. (&quot;Raizen&quot;),  a joint venture company in which Royal Dutch Shell plc (&quot;RDS&quot;) and Cosan Limited are indirectly, through their respective subsidiaries Ispagnac Participacoes Ltda. (&quot;Ispagnac&quot;) and Cosan S.A. Industria e Comercio, joint venture partners, from Ispagnac was part of RDS's and its affiliates' contribution to such joint venture, and was made in exchange for Raizen capital stock.</footnote>
    </footnotes>

    <remarks></remarks>

    <ownerSignature>
        <signatureName>/s/  Pedro Isamu Mizutani for Raizen Energia Participacoes S.A as its COO</signatureName>
        <signatureDate>2011-06-01</signatureDate>
    </ownerSignature>

    <ownerSignature>
        <signatureName>/s/  Matias Lopes for Ispagnac Participacoes Ltda as an Officer</signatureName>
        <signatureDate>2011-06-01</signatureDate>
    </ownerSignature>

    <ownerSignature>
        <signatureName>/s/ Mark Edwards for Royal Dutch Shell plc as its Deputy Company Secretary</signatureName>
        <signatureDate>2011-06-01</signatureDate>
    </ownerSignature>

    <ownerSignature>
        <signatureName>/s/  Marcos Marinho Lutz for Cosan S.A. Industria e Comercio as its CEO</signatureName>
        <signatureDate>2011-06-01</signatureDate>
    </ownerSignature>

    <ownerSignature>
        <signatureName>/s/ Rubens Ometo Silveira Mello for Cosan Limited as its CEO</signatureName>
        <signatureDate>2011-06-01</signatureDate>
    </ownerSignature>
</ownershipDocument>
