Reverse Complement Generator
Paste a DNA or RNA sequence — plain or FASTA, one record or many — and get its reverse complement, complement or reverse in one click. IUPAC ambiguity codes are complemented correctly, lower-case (soft-masked) bases keep their case, and the result can be copied or downloaded as FASTA. It runs in your browser; nothing is uploaded.
Spaces, line breaks and position numbers are removed. IUPAC ambiguity codes (R, Y, N…) and gaps (-) are kept; several FASTA records are all converted.
Results
18 nt
Length
1
Sequences
Both strands
5′ GAATTCATGGCCTTAAGC 3′ |||||||||||||||||| 3′ CTTAAGTACCGGAATTCG 5′
Your sequence, read 5′ to 3′ · Complement, read 3′ to 5′
| Sequence | Length (nt) | Reads the same as its reverse complement? |
|---|---|---|
| EcoRI | 18 | No |
How to Use the Reverse Complement Generator
- 1. Paste the sequence. Plain letters or FASTA both work. Spaces, line breaks and position numbers are removed; anything that is not a nucleotide code is dropped and listed in a notice.
- 2. Pick the operation. Reverse complement gives the opposite strand read 5′ to 3′. Complement swaps each base for its partner without reversing, and reverse only flips the order.
- 3. Set the output. Keep T or U as the input has it, or force DNA or RNA; keep the case, force upper or lower case; and choose a FASTA line length.
- 4. Copy or download. Every record is converted. For a short single sequence the tool also draws the two strands paired base by base.
Complement, Reverse and Reverse Complement
The two strands of a DNA double helix run in opposite directions: where one strand reads 5′ to 3′ left to right, its partner reads 3′ to 5′. To write the second strand the way a database or a primer order form expects, 5′ to 3′, you take the complement and then reverse it. That is the reverse complement, and it is what a reverse primer is, what a sequence on the minus strand looks like, and what an aligner reports when a read maps to the reverse strand. Taking the complement alone gives the partner strand but leaves it written 3′ to 5′, which is a common source of mistakes.
| Input | Complement | Reverse | Reverse complement |
|---|---|---|---|
5′-GAATTCATGG-3′ | 3′-CTTAAGTACC-5′ | 5′-GGTACTTAAG-3′ | 5′-CCATGAATTC-3′ |
Ambiguity Codes
The IUPAC nucleotide alphabet adds letters for a base that is not known exactly. Each code is complemented by the code for the complementary set of bases, so the result is always a valid sequence:
| Code | Stands for | Complement |
|---|---|---|
| R | A or G (purine) | Y |
| Y | C or T (pyrimidine) | R |
| K | G or T (keto) | M |
| M | A or C (amino) | K |
| B | C, G or T (not A) | V |
| V | A, C or G (not T) | B |
| D | A, G or T (not C) | H |
| H | A, C or T (not G) | D |
| S, W, N | G/C, A/T, any base | S, W, N (unchanged) |
The output matches Biopython's complement and reverse_complement for every code in both cases. In RNA, A pairs with U, so the tool writes U wherever the input used it, unless you choose DNA output.
Worked Example: A Reverse Primer
To amplify the end of the human insulin coding sequence (RefSeq NM_000207.3), the reverse primer is the reverse complement of the last bases of the coding strand, stop codon included. Take the final 24 nucleotides:
Reverse complement of the 3′ end of INS
Coding strand, 5′→3′: CAGCTGGAGAACTACTGCAACTAG
Reverse primer, 5′→3′: CTAGTTGCAGTAGTTCTCCAGCTG
The primer begins with CTA, the reverse complement of the TAG stop codon. Check how it will behave in a reaction with the primer Tm calculator and its base composition with the GC content calculator. A related curiosity is the palindromic site: GAATTC, the EcoRI recognition sequence, is its own reverse complement, which is why the table in the tool marks it. Restriction enzymes cut such sites on both strands; the restriction site finder locates them.
Frequently Asked Questions
- How do you find the reverse complement of a DNA sequence?
- Write the sequence backwards, then replace each base with its partner: A with T, T with A, C with G and G with C. For 5′-ATGC-3′ the reverse is CGTA and the reverse complement is GCAT. The result is the other strand of the double helix, read 5′ to 3′.
- What is the difference between a complement and a reverse complement?
- The complement only swaps bases and keeps the original order, so it reads 3′ to 5′ when the input reads 5′ to 3′. The reverse complement also reverses the order, so it is written 5′ to 3′ like any normal sequence. Use the reverse complement unless you want to see the strands lined up base by base.
- How do I get the reverse primer sequence?
- Take the bases at the 3′ end of the region you want to amplify, on the coding strand, and reverse-complement them. The reverse primer anneals to that strand and extends toward the forward primer. Add any restriction-site tail or tag to the 5′ end of the primer afterwards.
- How are ambiguity codes like R, Y and N complemented?
- Each code becomes the code for the complementary bases. R (A or G) becomes Y (T or C), K becomes M, B becomes V and D becomes H. S (G or C), W (A or T) and N (any base) are their own complements.
- Does it keep lower-case letters?
- Yes. Lower-case bases are complemented as lower case, which preserves soft-masking from genome browsers, unless you choose to force upper or lower case. A "-" gap passes through unchanged.
- Can I use it for RNA?
- Yes. If the input contains U and no T, the output uses U as well; you can also force DNA or RNA letters. Note that the reverse complement of an RNA is the sequence of the antisense RNA, not a DNA.