Skip to content
K Knidox Search…
Biology · Sequence tools

Reverse Complement

Reverse complement, complement or reverse a DNA or RNA sequence, with IUPAC codes supported.

DNA or RNA, 5′ → 3′. FASTA headers, spaces, line breaks and numbering are ignored; IUPAC ambiguity codes are supported.
Output
Output alphabet
Reverse complement — 5′ → 3′

AAGCTTAACC GGTTACGCAT

Length
20 nt
GC content
45.0%
Input, cleaned
ATGCGTAACC GGTTAAGCTT

The reverse complement is the sequence of the opposite DNA strand read in its own 5′ → 3′ direction. Complement each base (A↔T, G↔C) and reverse the order: ATGC becomes GCAT. It is the single most-used operation in molecular biology.

Why reverse as well as complement

DNA is antiparallel. The two strands run in opposite directions, so where one reads 5′ → 3′ left to right, its partner reads 3′ → 5′ across the same page. Sequences are always written 5′ → 3′ by convention, so writing down the partner strand means doing two things: swapping each base for its pair, and then reversing the whole string to put it back in the standard direction.

Doing only one of the two is the classic error. The complement of ATGC is TACG, but that is the partner strand written backwards, 3′ → 5′. Reversed, it becomes GCAT, which is what you would actually order from a synthesis company or find in a database.

Where it gets used

Designing the reverse primer for a PCR is the commonest case: the forward primer matches the top strand directly, and the reverse primer is the reverse complement of the region at the other end. It also comes up in reading a gene on the minus strand, checking whether a restriction site is present, finding the partner of an siRNA, and verifying that a sequencing read matches a reference in either orientation.

  1. 1
    Write the sequence out 5′ → 3′. Start from ATGCGTAA.
  2. 2
    Complement each base. A pairs with T and G with C, giving TACGCATT.
  3. 3
    Reverse the result. Read it backwards to get TTACGCAT.
  4. 4
    Check the ends. The first base of the answer pairs with the last base of the original — here T against the final A.
  5. 5
    Confirm by doing it twice. The reverse complement of TTACGCAT is ATGCGTAA again, which is a quick way to catch a slip.

Base pairing

RNA uses uracil in place of thymine; adenine on a DNA template pairs with U in the RNA transcript.

BasePairs with (DNA)Pairs with (RNA)
A — adenineTU
T — thymineAA
U — uracilAA
G — guanineCC
C — cytosineGG

IUPAC ambiguity codes

Used where a position is uncertain or deliberately degenerate; each has its own complement.

CodeMeansComplement
RA or G (purine)Y
YC or T (pyrimidine)R
SG or C (strong)S
WA or T (weak)W
KG or T (keto)M
MA or C (amino)K
NAny baseN

Palindromes and other things worth noticing

Some sequences are their own reverse complement. GAATTC, the EcoRI recognition site, reads identically on both strands — which is exactly why restriction enzymes recognise sequences of this kind, since the enzyme binds as a symmetric dimer. GGATCC for BamHI behaves the same way. If a tool returns the sequence you put in, that is usually the reason rather than a bug.

Two practical notes. GC content is unchanged by the operation, because every G becomes a C and vice versa — so the value the tool reports applies equally to both strands. And the ambiguity codes complement in pairs that are easy to get wrong by hand: R and Y swap, K and M swap, while S, W and N are their own complements.

What is a reverse complement?
The opposite DNA strand written in the standard 5′ → 3′ direction. You complement each base and then reverse the order, so ATGC becomes GCAT.
Why not just complement the sequence?
Because the complement alone is written 3′ → 5′, which is backwards from how sequences are recorded. Reversing puts it into the conventional direction, and that is the form you would order or search a database with.
How do I use this to design a reverse PCR primer?
Take the sequence at the far end of your target region as it appears on the top strand, then reverse complement it. That gives the primer that anneals to the bottom strand and extends back towards the forward primer.
What changes for RNA?
Uracil replaces thymine, so adenine pairs with U instead of T. The reversing step is identical; only the letter changes in the output.
Why did the tool return the same sequence I typed in?
Because it is a palindrome — a sequence that is its own reverse complement. Restriction sites such as GAATTC and GGATCC are deliberately of this kind, since the enzymes that cut them bind as symmetric dimers.
Does the reverse complement change the GC content?
No. Every G becomes a C and every C a G, so the total count of the two is unchanged. GC content is a property of the double-stranded molecule rather than of one strand.
What are the letters other than A, T, G and C?
IUPAC ambiguity codes, used where a position is uncertain or deliberately degenerate. N means any base, R means a purine (A or G), Y means a pyrimidine (C or T), and each has a defined complement.