Written and maintained by CASRAI Editorial Board
Last updated
Short answer
The reverse complement of a DNA sequence is the sequence you get by replacing every base with its complement (A with T, C with G) and then reading the result in the opposite direction. Sequences are conventionally read 5′ to 3′, so the reverse complement is the form in which the opposite strand of a duplex is read in that same convention. For ATGGCGTTAC the reverse complement is GTAACGCCAT.
Definition and scope
DNA bases pair in a fixed way. The NHGRI Talking Glossary defines a base pair as “two complementary DNA nucleotide bases that pair together to form a ‘rung of the DNA ladder.'”, with A pairing with T and C pairing with G. The complement of a sequence applies that pairing one base at a time. The reverse of a sequence simply writes it back to front. The reverse complement does both.
Sequences are written 5′ to 3′ by convention (Biopython Tutorial, “Sequence objects”: “by convention nucleotide sequences are normally read from the 5’ to 3’ direction”). That convention is why the reversal matters: the complement of a sequence, written left to right in the same order, is not the same object as the sequence a second strand would be written as. For the underlying chemistry of nucleotides and strands, see DNA and nucleotides.
This page covers DNA text sequences and the operation applied to them. It does not cover RNA, protein sequences, or any wet-lab procedure.
How it is done in practice
The operation is two string steps, and the order of the two does not change the result. Worked example:
| Step | Result for the input ATGGCGTTAC |
|---|---|
| Input, 5′ to 3′ | ATGGCGTTAC |
| Complement only (same order) | TACCGCAATG |
| Reverse only | CATTGCGGTA |
| Reverse complement | GTAACGCCAT |
Applying the reverse complement twice returns the original sequence: the reverse complement of GTAACGCCAT is ATGGCGTTAC.
In practice nobody does this by hand for long sequences. The Biopython library exposes it as a built-in method on its Seq object (reverse_complement()), and the Sequence Manipulation Suite offers a web tool that “converts a DNA sequence into its reverse, complement, or reverse-complement counterpart”, with an input limit of 100,000,000 characters.
Related concepts: complement, reverse and reverse complement
The Sequence Manipulation Suite treats the three outputs as separate operations, which is the clearest way to keep them apart.
| Operation | What changes | Output for ATGGCGTTAC |
|---|---|---|
| Complement | Each base swapped for its pair; order unchanged | TACCGCAATG |
| Reverse | Order reversed; bases unchanged | CATTGCGGTA |
| Reverse complement | Both | GTAACGCCAT |
Ambiguity codes and case
Real sequences often contain IUPAC ambiguity codes. The Sequence Manipulation Suite supports “the entire IUPAC DNA alphabet” and maintains the case of each input character. Biopython complements ambiguity codes too: V (meaning A, C or G) complements to B. A character that is not a nucleotide code, such as E, is not complemented.
Where it matters for labs
Template strand and coding strand
The Biopython Tutorial notes that real transcription works from the template strand, which is the reverse complement of the coding strand; applying reverse_complement() to the coding DNA recovers the template strand. A script that looks for a sequence on “the other strand” is therefore searching for the reverse complement of the query.
Sequencing reads
When alignments are converted back to FASTQ, reads that aligned to the reverse strand are reverse-complemented. The Picard SamToFastq option RE_REVERSE does this, as described in converting BAM to FASTQ. Related background: FASTQ format explained and decoding SAM flags.
Primers and mutagenesis
Sequence-based work on both strands, including checking a primer against a template, requires keeping orientation straight. See NCBI BLAST primers and site-directed mutagenesis for the workflows in which a sequence has to be read against the opposite strand.
Common misunderstandings
Is the complement the same as the reverse complement?
No. The complement keeps the original order, so for ATGGCGTTAC it is TACCGCAATG, while the reverse complement is GTAACGCCAT. Pasting a complement into a search for the opposite strand returns the wrong sequence unless the order is also reversed.
Can the operation be applied to a protein sequence?
No. Biopython describes the result of applying it to a protein as “biologically meaningless”. The operation is defined for nucleotide sequences.
Does the order of reversing and complementing matter?
No, as long as both are done. Complementing then reversing gives the same output as reversing then complementing.
Frequently asked questions
What is the reverse complement of a DNA sequence?
It is the sequence obtained by swapping each base for its pair (A with T, C with G) and writing the result in reverse order. For ATGGCGTTAC it is GTAACGCCAT.
What is the difference between complement and reverse complement?
The complement keeps the original order (TACCGCAATG for the example); the reverse complement also reverses it (GTAACGCCAT).
Is there a tool that does it for me?
Yes. The Sequence Manipulation Suite converts a DNA sequence into its reverse, complement or reverse-complement counterpart, and Biopython offers reverse_complement() on its Seq object.
How are ambiguity codes handled?
Both tools handle IUPAC codes: the Sequence Manipulation Suite supports the entire IUPAC DNA alphabet and keeps the case of each character, and Biopython complements V (A, C or G) to B.
Why does the template strand matter?
Biopython notes that real transcription works from the template strand, which is the reverse complement of the coding strand.
Sources
- Biopython Tutorial, “Sequence objects”: https://biopython.org/docs/latest/Tutorial/chapter_seq_objects.html (checked 2026-10-29).
- NHGRI Talking Glossary, “Base Pair”: https://www.genome.gov/genetics-glossary/Base-Pair (checked 2026-10-29).
- Sequence Manipulation Suite, “Reverse Complement”: https://www.bioinformatics.org/sms2/rev_comp.html (checked 2026-10-29).







