Codon Optimizer: free, open codon optimization with constraints
Free codon optimization with real constraints — no IDT/Twist account needed
Gene synthesis prices have collapsed, but the codon optimizers that turn a protein into a synthesis-ready DNA sequence still live behind vendor logins at IDT, Twist, and GenScript. That’s fine if you’re already ordering from them, less fine if you’re benchmarking quotes or just want to see what the optimizer is actually doing.
This widget runs entirely on open-source tooling — paste a CDS or protein, pick a host, set constraints, and you get a synthesis-ready sequence with the codon changes highlighted.
Use it now
What it does
Inputs. A CDS (DNA) or protein sequence. Auto-detect picks the right interpretation; you can override it. FASTA headers are stripped.
Host organisms. 11 common hosts: E. coli, S. cerevisiae, human, CHO, HEK293 (uses the human table), mouse, Pichia pastoris, B. subtilis, Drosophila, Arabidopsis, and Sf9.
Constraints. Each toggle is a real DNA Chisel constraint, not a hint:
- Restriction sites — avoid BsaI, BsmBI, EcoRI, BamHI, HindIII, XhoI, NotI, SapI (covers the common Golden Gate, MoClo, and classic cloning enzymes).
- Homopolymers — no runs of 7 or more A/T/G/C in a row.
- GC content — keep GC between your chosen bounds across an 80 nt sliding window.
- Direct repeats — optional; useful for Twist-style synthesizability filters.
- Hairpins — optional; useful for IVT templates and primer regions.
Output. The optimized DNA, line-wrapped at 60 nt with every changed base highlighted in pink. Before/after stats: length, GC%, number of codon swaps, number of synonymous changes, number of restriction sites removed. Plus Download FASTA and Copy DNA buttons.
How it works
The widget POSTs your sequence and constraints to our hosted service that wraps DNA Chisel — an MIT-licensed constraint solver from the Edinburgh Genome Foundry. DNA Chisel formulates the problem as “minimize codon-usage distance from the host organism, subject to every constraint above,” then runs a localized search until everything checks out. We hard-cap the solver at 10 seconds; if a constraint set is genuinely impossible, you get a clean error back instead of a hang.
Embed it on your site
The widget is just three lines of HTML — stylesheet, mount div, and script (plus a one-line config block).
<link rel="stylesheet" href="https://37degrees-website.s3.us-east-2.amazonaws.com/Interactive+tools/codon-optimizer/styles.css" />
<div id="codon-widget-embed"></div>
<script>
window.CODON_API_ENDPOINT = "https://dd7e4gsiki.execute-api.us-east-2.amazonaws.com/codon/optimize";
// Optional: window.CODON_THEME = "light";
</script>
<script src="https://37degrees-website.s3.us-east-2.amazonaws.com/Interactive+tools/codon-optimizer/widget.js"></script>
That’s it. The widget calls our hosted service for the optimization — free for typical research use. Heavy / production use? Get in touch.
Credits
Built on DNA Chisel (Zulkower & Rosser, Bioinformatics 2020, doi:10.1093/bioinformatics/btaa566) with python_codon_tables for organism-specific codon-usage data and Biopython for the genetic-code plumbing. All MIT-licensed.