Protein to DNA converter
v1.0.0Reverse translate protein sequences into DNA with codon optimization and GC-content controls.
Paste a protein or amino acid sequence, or upload a FASTA file. Choose a concrete coding sequence or a degenerate IUPAC consensus, select the genetic code and codon-usage options, then convert. Preview shows the FASTA and sequence-count summary; Files contains the sequence download and run.log, which also appears in Logs.
Protein to DNA conversion is also called reverse translation or back translation, the opposite of translating DNA to protein. It does not recover the original gene. Most amino acids have several synonymous codons, so many DNA sequences can encode the same protein. This tool makes those codon choices explicit and reproducible.
For example, the protein fragment GIVEQCC, using the human preset and the most frequent codon for each residue, produces:
>Converted Sequence
GGCATCGTGGAGCAGTGCTGCTGAThe final TGA is present because Add stop codon is enabled by default. With a fixed random seed, frequency-matched and random codon choices produce the same result again when the input and settings are unchanged.
For several proteins, give each sequence its own FASTA header. With the same human preset, Most frequent codon and Add stop codon enabled, this input:
>insulin_A_chain
GIVEQCC
>insulin_fragment
FVNQHproduces:
>insulin_A_chain
GGCATCGTGGAGCAGTGCTGCTGA
>insulin_fragment
TTCGTGAACCAGCACTGAFor a degenerate primer consensus, MKW with Add stop codon disabled produces:
>Converted Sequence
ATGAARTGGHere AAR represents the two lysine codons, AAA and AAG.
| Input | Description |
|---|---|
| Protein sequence | One raw protein sequence or one or more FASTA records. Paste text or upload .txt, .fasta, .fa, .faa, .fas, or .seq files up to 50 MB. |
| Document | .docx and .pdf uploads have their text extracted before conversion. Provide sequence text or FASTA, not a whole article or table. Scanned images without selectable text are not supported. |
The converter accepts the 20 standard one-letter amino acid codes, ambiguity codes B, Z, J, and X, the recoded residues U and O, and one terminal stop marker (*). An internal * is rejected because silently joining residues across a stop would change the requested protein. By default, ambiguous and recoded residues become NNN so uncertainty is preserved.
Lowercase, wrapped lines, indentation, invisible document characters and position numbers at the edges of sequence lines are accepted. Whitespace is removed from residues. These cleanups and ignored semicolon comment lines are recorded in run.log. Empty or invalid FASTA records are skipped with warnings; if none can be converted, the run fails. A bare > receives a generated identifier and a warning. Duplicate identifiers are preserved and flagged. Multiple unheaded list items are rejected so separate proteins are not silently joined.
Put names after >. Plain text is treated as one continuous protein sequence, so an unmarked name such as GFP would be read as residues. CSV, database records and alignments need their protein sequence extracted first with CSV to FASTA or TXT to FASTA. Alignment gaps and digits inside residues are rejected.
| Setting | Description |
|---|---|
Output mode | Single coding sequence is the default and chooses one codon per residue. Degenerate consensus combines all codons into IUPAC codes. Host usage, CAI and restriction/repeat reduction do not apply to degenerate output. |
Genetic code table | Selects one of 18 supported NCBI genetic codes. Standard (1) is appropriate for most nuclear genes. Choose a mitochondrial, plastid, bacterial, or alternative nuclear code only when it matches the intended biological system. |
Expression host | None (random synonymous codons) is the default. Presets are Human, Chinese hamster, Mouse, E. coli W3110, Yeast (S. cerevisiae), Pichia pastoris, Fall armyworm and Arabidopsis; Custom accepts pasted weights. Presets apply only to Standard (1) and Bacterial/Plastid (11). Chinese hamster and fall armyworm are species-level records, not CHO- or Sf9-cell-line tables. |
Custom codon usage table | Shown when Expression host is Custom. Accepts Kazusa-style output or codon value pairs, including RNA codons and scientific notation. At least 20 distinct codons with finite, nonnegative values are required. Conflicting duplicates are rejected. Invalid or missing tables produce a warning and no host weights. Missing amino-acid weights are reported. |
Codon selection | Match host frequency is the default. It samples synonymous codons by the selected weights; Most frequent codon chooses the highest weight. These two choices use seeded random codons when weights are unavailable. GC-rich and AT-rich work with or without a host table, using host weights only to break GC ties. Ignored for degenerate output. |
Reading frame offset | Frame 0 is the default. Frame +1 prepends N; Frame +2 prepends NN. This padding is excluded from coding-codon counts and GC content. |
Add stop codon | Adds one terminal stop when the input has no terminal *. Enabled by default. An existing terminal stop is preserved, not duplicated. |
Ambiguous amino acids | Preserve uncertainty as NNN is the default. Representative mode uses D for B, E for Z, L for J, C for U and K for O; X remains NNN. In degenerate mode, B, Z and J cover both possible standard residues. Remove the residue shortens the protein; records with no remaining protein residues are rejected. |
Ensure start codon (ATG) | Prepends ATG if the input does not begin with M, adding an N-terminal methionine. Disabled by default. |
Output type | DNA (default) uses T. RNA replaces T with U. RNA output is a coding sequence without untranslated regions, a cap, a poly(A) tail or modified nucleotides. |
Line length | Wrap FASTA sequences at 60, 80 (default), 100, or 120 characters, or use a single unwrapped line. |
Avoid restriction sites | Attempts synonymous substitutions to remove a curated set of common restriction sites on either strand. Any sites that remain are reported. Disabled by default. |
Avoid long repeats | Attempts synonymous substitutions to reduce long homopolymers and short tandem repeats. Any detected liabilities that remain are reported. Disabled by default. |
Random seed | An integer from 0 to 4,294,967,295. The default is 42. It makes random and frequency-matched codon selection reproducible. |
| Output | Description |
|---|---|
| DNA or RNA FASTA | The reverse-translated sequence, ready to copy or download as .fasta. |
run.log | A curated run record with the sequence count, output type, genetic code, selected settings, seed, length, GC content, CAI when applicable, warning count, and remaining restriction sites or repeat liabilities. It appears in the final Logs tab and remains downloadable from Files. |
Forward translation maps each coding codon to an amino acid. Reverse translation starts with the protein and must choose among synonymous codons. It therefore generates a possible coding sequence rather than reconstructing the natural genomic or transcript sequence.
Reverse translation is useful when preparing a coding sequence for gene synthesis, generating a host-aware design, or making a degenerate nucleotide sequence for primer design. For cloning primer design around a known DNA template, use Primer3.
The genetic code is degenerate: 61 sense codons encode only 20 amino acids, so most amino acids have more than one codon. Translation collapses several codons into one amino acid and discards which codon was used. Reverse translation has to put that choice back, once for every residue that has synonyms.
| Codons per amino acid | Amino acids | IUPAC consensus in degenerate mode |
|---|---|---|
| 1 | Met, Trp | ATG, TGG |
| 2 | Phe, Tyr, His, Gln, Asn, Lys, Asp, Glu, Cys | TTY, TAY, CAY, CAR, AAY, AAR, GAY, GAR, TGY |
| 3 | Ile | ATH |
| 4 | Gly, Ala, Val, Pro, Thr | GGN, GCN, GTN, CCN, ACN |
| 6 | Leu, Ser, Arg | YTN, WSN, MGN |
The counts follow the standard code and the three stop codons TAA, TAG and TGA add one more choice at the end. Multiply the options residue by residue and the numbers grow fast. The 21-residue insulin A chain, GIVEQCCTSICSLYQLENYCN, can be encoded by 3,057,647,616 different DNA sequences before a stop codon is added. The 147-residue beta-globin chain plus its stop has about .
Every one of those sequences is a correct answer, which is why the tool has a seed. With no host table, MKWLS gives ATGAAATGGCTATCC at the default seed 42 and ATGAAATGGCTATCG at seed 7. Both translate back to MKWLS; only the serine codon differs. The original gene used one specific set of codons, and nothing in the protein sequence records which.
Host tables decide which synonym wins. Reverse translate >insulin_A_chain with Most frequent codon and the Human (Homo sapiens) host gives:
>insulin_A_chain
GGCATCGTGGAGCAGTGCTGCACCAGCATCTGCAGCCTGTACCAGCTGGAGAACTACTGCAACTGASwitching the host to E. coli W3110 gives:
>insulin_A_chain
GGCATTGTGGAACAGTGCTGCACCAGCATTTGCAGCCTGTATCAGCTGGAAAACTATTGCAACTAASeven of the 22 codons differ, each at the third base: the human table favors ATC, GAG, TAC and TGA where the E. coli table favors ATT, GAA, TAT and TAA. The encoded protein is identical.
The eight presets use pinned organism-level records from the Kazusa Codon Usage Database methodology, which tabulated GenBank Release 160.0 in June 2007. The source taxonomy record and coding-sequence count are stored with each preset so results do not change silently. The presets cover Homo sapiens, Mus musculus, Cricetulus griseus, Escherichia coli W3110, Saccharomyces cerevisiae, Pichia pastoris, Spodoptera frugiperda, and Arabidopsis thaliana.
These preset tables use standard-code codon assignments. ProteinIQ applies them with Standard (1) and Bacterial/Plastid (11). If you select a genetic code with reassigned codons, provide a custom table built for that code; otherwise host-frequency and most-frequent selection fall back to seeded random synonymous codons, and GC-biased selection runs without preset frequency tie-breaking.
These aggregate organism records are useful heuristics, not expression guarantees. They do not model a specific strain or cell line unless the source record itself does. Expression also depends on promoter choice, RNA structure, transcript stability, translation kinetics, protein folding, and the experimental system. You can inspect predicted coding-RNA structure with RNAfold.
The Codon Adaptation Index (CAI) summarizes how strongly a concrete sequence favors the highest-weight synonymous codons in the selected table. ProteinIQ follows the relative-adaptiveness concept introduced by Sharp and Li. CAI is a comparative design metric, not a universal pass/fail threshold or a prediction of protein yield.
CAI is the geometric mean of codon weight divided by the highest synonymous weight. Stops and residues with only one codon are excluded. A chosen codon with zero weight gives CAI zero; no pseudocount is added. CAI is omitted when any coding residue is uncertain, relevant weights are missing, or no informative codons remain. A batch CAI pools informative codons across all emitted records.
The log reports GC content over unambiguous coding bases only. Ambiguity codes and reading-frame padding are excluded; no GC percentage is reported when every coding base is ambiguous. For degenerate consensus, this percentage describes known positions rather than the GC range of every possible nucleotide sequence.
Genetic-code mappings follow the supported NCBI genetic code tables. A codon-usage table changes which synonymous codon is preferred; it does not change which amino acid a codon encodes.
Use single-sequence output when you need one concrete coding sequence. Use degenerate output when a nucleotide position must represent every synonymous codon for the protein segment, such as an amino acid to nucleotide consensus for a degenerate primer.
For the insulin A chain with Add stop codon disabled, degenerate mode returns:
>insulin_A_chain
GGNATHGTNGARCARTGYTGYACNWSNATHTGYWSNYTNTAYCARYTNGARAAYTAYTGYAAYDegenerate consensus can grow highly complex for residues with many codons. It does not optimize for a host or guarantee that every combination encodes only the intended peptide.
One IUPAC string cannot list exactly the six codons of leucine, serine or arginine, so it covers extra ones. YTN spans eight codons, six for leucine and two for phenylalanine. MGN adds two serine codons to arginine. WSN is the widest: of its 16 codons only six encode serine, and the rest include threonine, arginine, cysteine, tryptophan and the stop TGA.
Every degenerate run displays a reminder about this limitation; restriction-site and repeat reduction are inactive. When you design degenerate primers, place them over residues with one or two codons, such as Met, Trp, Cys or Lys, and check primer properties before ordering oligonucleotides.
* is intentional.| Goal | Tool |
|---|---|
| Translate a coding DNA sequence to protein | DNA to protein |
| Find open reading frames in DNA | ORF Finder |
| Re-optimize existing coding DNA for a host | Codon optimization |
| Transcribe DNA to RNA | DNA to RNA |
| Calculate GC content | GC content calculator |
| Find the reverse complement | Reverse complement |
| Introduce controlled DNA changes | DNA mutator |
| Clean sequence text into FASTA | TXT to FASTA |
You can generate DNA that encodes the protein, but you cannot infer the unique original gene from the protein alone. Synonymous codons, untranslated regions, introns, regulatory sequences, and genomic context are not recoverable from an amino acid sequence.
Standard residues and a supported terminal stop are reverse translated according to the selected genetic code. Ambiguous or recoded residues need an explicit policy: the default NNN preserves nucleotide uncertainty, representative mode makes a stated biological substitution, and remove mode changes the sequence. Ensure start codon also adds a methionine when needed. Review these warnings before using the result.
Select RNA output to receive a coding sequence with U instead of T. This is suitable as a coding-RNA starting point, but it is not a full mature mRNA design because the converter does not add untranslated regions, a 5' cap, a poly(A) tail, or modified nucleotides.
Choose the preset that matches the intended organism-level system, or provide a custom table when you have a more relevant strain, tissue, cell line, or expression-specific dataset. Do not treat the Chinese hamster preset as a CHO-cell-line table or the fall armyworm preset as an Sf9-cell-line table.
The genetic code is degenerate: most amino acids are encoded by more than one codon, and the choices multiply along the chain. The 21-residue insulin A chain alone has more than 3 billion synonymous coding sequences.
Paste the amino acid sequence, keep Single coding sequence, choose an expression host if you have one and click Convert. The result is one DNA sequence that encodes your protein. For a primer-style consensus that covers every synonymous codon, choose Degenerate consensus (IUPAC) for primers.
No. The converter attempts synonymous substitutions while preserving the encoded standard residues. Some motifs cannot be removed because no suitable synonymous alternative exists or because changes create another liability. Remaining sites and repeat liabilities appear in the warnings and summary.
The affected FASTA record is rejected and reported. The converter never silently deletes an internal * and joins the surrounding residues.
Remove the residue can eliminate a record made entirely of ambiguous or recoded residues. That record is rejected rather than returned as an empty FASTA sequence or a lone added stop. Select Preserve uncertainty as NNN to retain it.
Convert CSV or TSV sequence tables to FASTA with automatic delimiter detection and column mapping.
Translate DNA sequences into proteins across reading frames and genetic code tables.
Paste or upload a sequence file in any common format and download FASTA. The format is detected automatically, and nothing leaves your browser.
Paste or upload FASTA and download a CSV or TSV table for spreadsheets, or a plain text file with one sequence per line.
Paste or upload DNA, RNA, or protein text and download FASTA. Sequence names, wrapped lines, and tables are detected automatically, and nothing leaves your browser.
Extract CDS, mRNA, gene, rRNA, and tRNA features from GenBank records into FASTA.
Convert coding-strand DNA to RNA notation by replacing thymine with uracil.
Convert FASTA sequences to FASTQ with configurable mock Phred quality scores.
Convert FASTQ sequencing reads to FASTA while preserving headers and sequence case by default.
Convert GenBank records to FASTA by extracting primary sequences, CDS, or translations.