Document and Entity Information (USD $)
In Millions, except Share data, unless otherwise specified
12 Months Ended
Dec. 31, 2012
Mar. 22, 2013
Jun. 29, 2012
Document and Entity Information [Abstract]      
Entity Registrant Name CODEXIS INC    
Entity Central Index Key 0001200375    
Document Type 10-K    
Document Period End Date Dec. 31, 2012    
Amendment Flag false    
Document Fiscal Year Focus 2012    
Document Fiscal Period Focus FY    
Current Fiscal Year End Date --12-31    
Entity Filer Category Accelerated Filer    
Entity Common Stock, Shares Outstanding   38,009,688  
Entity Well-known Seasoned Issuer No    
Entity Public Float     $ 102.4
Entity Current Reporting Status Yes    
Entity Voluntary Filers No