Reverse complement generator icon

Reverse complement generator

1.0.0

Generate reverse, complement, or reverse-complement sequences from raw, FASTA, or FASTQ DNA and RNA input. Learn more

Input

Output

Configure inputs to begin

Set options on the left, then click “Convert”.

How to find the reverse complement of a DNA or RNA sequence?

Paste a DNA or RNA sequence, or upload a FASTA or FASTQ file containing one or more records. Select the matching sequence type, choose Reverse complement, and run the conversion. ProteinIQ writes the opposite strand in the 5' to 3' direction and returns a result that can be copied or downloaded. The conversion runs in the browser.

With the default settings, this DNA sequence:

Text
>BRCA1_fragment
TTAGCTGATGTATTGCTTTG

returns:

Text
>BRCA1_fragment_reverse_complement
CAAAGCAATACATCAGCTAA

To convert a sequence:

  1. Paste a raw sequence or upload a .txt, .fasta, .fa, .fas, .seq, .fastq, or .fq file.
  2. Leave Sequence type on Auto-detect, or select DNA or RNA to require one alphabet.
  3. Leave Operation set to Reverse complement, or choose another transformation.
  4. For multiple raw sequences, choose where each new sequence starts; then choose the output case, format, and FASTA line wrapping.
  5. Select Convert, then copy the preview or download the result.

No account or credits are required. Uploaded files may contain up to 50 MB of sequence data. Because All operations creates three complete outputs, that operation accepts up to 16.7 MB of input so the generated sequence data stays within the 50 MB conversion output budget.

Worked examples

DNA reverse complement

For 5'-ATGCAGTC-3', the reverse complement is 5'-GACTGCAT-3'. With the default FASTA output setting, raw input receives a FASTA header:

Text
>seq_reverse_complement
GACTGCAT

Choose Same as input or Plain text when a headerless raw-sequence result is preferred.

RNA reverse complement

Auto-detect recognizes this as RNA because it contains uracil. This input also includes IUPAC ambiguity codes:

Text
>rna_oligo
AUGCRYSWKMBDHVN

The exact output is:

Text
>rna_oligo_reverse_complement
NBDHVKMWSRYGCAU

RNA output uses U, not T. Selecting DNA explicitly for this record would report U as invalid.

Compare every operation

All operations returns reverse, complement, and reverse complement in that order. With Preserve original case enabled, this input:

Text
>mixed_case_region description
AtGcRynN

returns:

Text
>mixed_case_region_reverse description
NnyRcGtA
>mixed_case_region_complement description
TaCgYrnN
>mixed_case_region_reverse_complement description
NnrYgCaT

The suffix is added to the record identifier. Any description after the first space stays unchanged.

FASTQ reverse complement with quality scores

FASTQ output keeps one quality character aligned with each nucleotide. This input has distinct quality characters so their movement is visible:

Text
@read1 description
AtGC
+read1 description
!#5I

With lowercase output selected, the reverse complement is:

Text
@read1_reverse_complement description
gcat
+read1_reverse_complement description
I5#!

The sequence and quality string are both reversed, while only the sequence is complemented. If the + line repeats the read header, its operation suffix is updated too.

Input reference

Input methodAccepted inputLimit and behavior
PasteRaw DNA or RNA, FASTA, or FASTQSpaces and tabs inside raw or FASTA sequences are removed before conversion. By default, line breaks stay within a raw sequence; change Start a new sequence to split on lines or empty lines. FASTQ structure is validated.
Upload.txt, .fasta, .fa, .fas, .seq, .fastq, or .fqMaximum file size is 50 MB (52,428,800 bytes).
Batch FASTAOne or more records beginning with > headersRecords are processed in their original order. Each record is validated independently.
Batch FASTQOne or more records beginning with @ headersWrapped sequence and quality sections are accepted. Sequence and quality lengths must match.

For plain-text batches, choose At each non-empty line when every pasted line is one sequence, or After an empty line when a wrapped sequence should continue until a blank line. Choose At FASTA headers only when only > headers should create records. FASTA and FASTQ input always use their native record structure.

Sequence letters are case-insensitive during validation. DNA mode accepts A, T, C, G, all supported IUPAC ambiguity codes, -, and .. RNA mode accepts the same set with U in place of T.

Auto-detection runs independently for each raw, FASTA, or FASTQ record:

  • A record containing U but no T is RNA.
  • A record containing T but no U is DNA.
  • A record containing neither T nor U defaults to DNA because the alphabet cannot be inferred. Select RNA explicitly when such a sequence should complement A to U.
  • A record containing both T and U is rejected and named in a warning.

This allows one FASTA batch to contain separate DNA and RNA records without applying the wrong complement alphabet to either record.

For raw and FASTA input, numbers, punctuation other than - and ., and non-nucleotide letters are not silently removed. An invalid FASTA record is skipped and named in a warning. If every record is invalid, the conversion fails without returning a sequence file.

FASTQ quality characters are not interpreted as nucleotide text. They must be printable Phred+33 ASCII characters, with exactly one character for each nucleotide. A malformed FASTQ file, including a record with invalid nucleotide symbols, fails validation rather than returning a partial file.

Settings

SettingOptionsDefaultWhat it controls
Sequence typeAuto-detect, DNA (A, T, C, G), RNA (A, U, C, G)Auto-detectDetects DNA or RNA independently for each record, or requires the selected alphabet.
OperationReverse complement, Reverse only, Complement only, All operationsReverse complementChooses which transformation is returned. All operations creates three outputs per valid input record and accepts up to 16.7 MB of input.
Start a new sequenceDetect from input format, At each non-empty line, After an empty line, At FASTA headers onlyDetect from input formatControls plain-text record boundaries. FASTA headers and FASTQ records always retain their native boundaries.
Output caseUppercase, Lowercase, Preserve original caseUppercaseChanges sequence letters only. FASTA and FASTQ header capitalization is not changed.
Output formatSame as input, FASTA, Plain textFASTAReturns FASTA by default; keeps raw text, FASTA, or FASTQ input in its original format when selected; or returns sequence-only text.
FASTA line wrappingNo wrapping, 60 characters, 80 characters80 charactersControls FASTA sequence line width. It does not change FASTQ or plain-text output.
Add operation suffix to headersOn or offOnAdds _reverse, _complement, or _reverse_complement to each FASTA or FASTQ identifier. It has no visible effect with plain-text output.

The defaults auto-detect each record and produce an uppercase reverse complement in FASTA format. Raw input receives a generated FASTA header, and FASTQ quality scores are omitted with a warning. Select Same as input when FASTQ output and aligned quality scores should be preserved. The _reverse_complement suffix is added when the selected output format includes identifiers.

Results and downloads

ResultWhat it contains
PreviewThe complete converted output, with a copy action.
FASTA downloadReturned when Output format is FASTA, or when FASTA input uses Same as input. The selected line wrapping is applied.
FASTQ downloadReturned when FASTQ input uses Same as input. It contains transformed reads and aligned quality strings.
Text downloadReturned when Output format is Plain text, or when raw input uses Same as input. It contains sequences without headers or FASTQ quality lines.
WarningsThe header and invalid characters for any skipped batch record. Valid records are still returned.

Plain-text output contains one sequence line for each valid input record. All operations produces three lines per record in reverse, complement, and reverse-complement order. FASTQ quality scores are omitted from FASTA or plain-text output, and the result includes a warning so the loss is explicit.

FASTA line wrapping

FASTA wrapping changes only where line breaks appear. It does not alter sequence length or content. Choose 80 characters for the conventional default, 60 characters for tools or reports that expect shorter lines, or no wrapping to place each sequence on one line. FASTQ remains one sequence line plus one matching quality line per output record.

Which operation should I choose?

GoalOperationWhat happens to ATGCAGTC
Write the opposite strand from 5' to 3'Reverse complementGACTGCAT
Read the same sequence from right to leftReverse onlyCTGACGTA
Replace each base with its pairing base without changing orderComplement onlyTACGTCAG
Inspect all three transformationsAll operationsReturns the three results above as separate records or lines.

For most primer, cloning, and strand-orientation tasks, Reverse complement is the intended operation. Complement only writes the paired strand in the opposite orientation, so it is not the same sequence that would be ordered or reported 5' to 3'.

How reverse complements work

DNA strands are antiparallel. If one strand is written from 5' to 3', its paired strand runs from 3' to 5'. Finding the reverse complement has two steps:

  1. Complement every nucleotide: A pairs with T, and C pairs with G.
  2. Reverse the complemented sequence so the result is written from 5' to 3'.

For RNA, A pairs with U instead of T. Complement and reversal can be applied in either order because each base is transformed independently, but the final orientation must be 5' to 3'.

A reverse primer is normally written in its ordered 5' to 3' form. Its sequence is therefore the reverse complement of the downstream target region used when designing PCR primers.

IUPAC ambiguity code complements

Ambiguity codes represent sets of possible bases. The complement is the code representing the paired set, not automatically N.

CodeBases representedComplement
AAT in DNA, U in RNA
TTA
UUA
CCG
GGC
RA or GY
YC or T/UR
SG or CS
WA or T/UW
KG or T/UM
MA or CK
BC, G, or T/UV
DA, G, or T/UH
HA, C, or T/UD
VA, C, or GB
NAny baseN
- or .Alignment gapUnchanged

Batch FASTA behavior

Each FASTA record is cleaned, validated, and transformed separately. This makes partial success possible. For example:

Text
>valid_dna
ATGCRY
>invalid_dna
AUGC

In DNA mode, the first record returns:

Text
>valid_dna_reverse_complement
RYGCAT

The second record is skipped with the warning Skipped >invalid_dna: invalid DNA characters U.

When suffixes are enabled, they are inserted before a FASTA description. A header such as >sample human exon becomes >sample_reverse_complement human exon. Duplicate identifiers are not renamed, so identifiers should already be unique if downstream software requires uniqueness.

FASTQ quality score behavior

FASTQ stores a quality character for each sequence position. Reverse-complementing a read changes the position of every nucleotide, so its quality characters must move to the matching reversed positions.

OperationSequence actionQuality string action
Reverse complementReverse the sequence and complement every baseReverse
Reverse onlyReverse the sequenceReverse
Complement onlyComplement every base without changing positionKeep original order
All operationsReturn all three sequence transformationsReverse for _reverse and _reverse_complement; keep order for _complement

Quality values are preserved exactly. The tool does not recalculate, normalize, filter, or trim them. Wrapped FASTQ sequence and quality sections are joined during parsing, then written as one sequence line and one quality line per output record.

FASTQ record order and header descriptions are preserved. An empty + line remains empty. If the + line repeats the original header, the same _reverse, _complement, or _reverse_complement suffix is applied so it continues to match the transformed read identifier.

Case preservation and gaps

Uppercase and lowercase output modes normalize only sequence lines. FASTA headers retain their original case.

Preserve original case carries the case of each nucleotide through the transformation. Because reverse and reverse-complement operations change position, the capitalization moves with its nucleotide. For example:

InputOperationPreserved-case output
AtCgReversegCtA
AtCgComplementTaGc
AtCgReverse complementcGaT

Gap characters - and . are accepted and kept in place for complement-only output. They move with the sequence during reverse and reverse-complement operations. They are useful for aligned sequences, but the tool does not calculate or modify an alignment.

GC percentage

The conversion records GC percentage across valid input records. Only canonical bases contribute to this calculation:

DNA GC%=G+CA+T+G+C×100\text{DNA GC\%} = \frac{G + C}{A + T + G + C} \times 100DNA GC%=A+T+G+CG+C​×100 RNA GC%=G+CA+U+G+C×100\text{RNA GC\%} = \frac{G + C}{A + U + G + C} \times 100RNA GC%=A+U+G+CG+C​×100

IUPAC ambiguity codes, -, and . are excluded from both the numerator and denominator. The percentage describes the submitted sequence, not the expanded number of records created by All operations.

Troubleshooting

The tool says U is invalid

Change Sequence type to RNA if the input uses uracil. DNA mode deliberately rejects U so a DNA/RNA alphabet mismatch is not converted silently.

The tool says T is invalid

Change Sequence type to DNA if the input uses thymine. RNA mode deliberately rejects T.

A FASTA record was skipped

Read the warning for the record header and invalid characters. Remove numbers, unsupported punctuation, or non-nucleotide letters, then convert again. Other valid records in the same batch are still returned.

A FASTQ file reports different sequence and quality lengths

Each FASTQ record needs exactly one quality character per nucleotide. Check for truncated quality lines, accidental line breaks, or a missing + separator. Wrapped records are accepted, so wrapping itself does not cause an error when the joined lengths match.

The output has no headers or quality scores

Set Output format to Same as input or FASTA. Plain-text output intentionally removes FASTA and FASTQ headers, plus FASTQ quality and separator lines. FASTA output from FASTQ also omits quality scores and reports a warning.

The output header has _reverse_complement, _reverse, or _complement

These suffixes identify the operation that produced each record. Turn off Add operation suffix to headers to retain the original identifier unchanged.

FAQ

What is the reverse complement of a DNA sequence?

Replace A with T, T with A, C with G, and G with C, then reverse the result. For example, the reverse complement of ATCG is CGAT.

How do I reverse-complement an RNA sequence?

Leave auto-detection enabled or select RNA explicitly, then submit a sequence containing A, U, C, and G, with optional IUPAC ambiguity codes. RNA output uses U, so the reverse complement of AUGC is GCAU.

Is reverse complement the same as complement?

No. Complement changes each base but keeps the written order. Reverse complement also reverses that result so the paired strand is written in the conventional 5' to 3' direction.

Can I reverse-complement multiple FASTA sequences at once?

Yes. Paste or upload multi-record FASTA. Valid records are returned in their original order, while invalid records are skipped and identified in warnings.

Can I reverse-complement a FASTQ file without losing quality scores?

Yes. Upload .fastq or .fq input and leave Output format set to Same as input. Reverse and reverse-complement operations reverse the quality string so each score stays aligned with its original base; complement-only output keeps quality characters in their original order.

Does FASTQ reverse complement change Phred quality values?

No. Quality characters move with their nucleotide positions but are not recalculated. Their encoded quality values remain unchanged.

Does it support IUPAC degenerate bases?

Yes. The converter supports R, Y, S, W, K, M, B, D, H, V, and N, including lowercase forms. It also preserves - and . gap characters.

Can I keep lowercase bases in the result?

Yes. Select Preserve original case to carry each character's capitalization through the operation, or select Lowercase to normalize every output sequence letter.

Is my sequence uploaded to a compute server?

No compute server performs the sequence transformation. Conversion runs locally in the browser. Normal website requests still occur when the ProteinIQ page loads.

Table of contents

Related tools

GenBank Feature Extractor

GenBank Feature Extractor

Extract sequence features (CDS, mRNA, gene, etc.) from GenBank files in FASTA format with support for spliced features

sequence-manipulationDNA+4
FASTA to FASTQ Converter

FASTA to FASTQ Converter

Convert FASTA sequence files to FASTQ format with mock quality scores

format-conversionDNA+3
FASTQ to FASTA converter

FASTQ to FASTA converter

Convert standard FASTQ reads to FASTA with validation, IUPAC nucleotide support, average-quality filtering, and downloadable summaries

format-conversionDNA+3
CSV to FASTA

CSV to FASTA

Convert CSV and TSV files containing sequence data to FASTA format with flexible column mapping and automatic delimiter detection

format-conversionprotein+4
GenBank to FASTA Converter

GenBank to FASTA Converter

Convert GenBank files to FASTA format

format-conversionDNA+3
TXT to FASTA converter

TXT to FASTA converter

Convert TXT or pasted DNA, RNA, and protein sequences to FASTA locally in your browser, with cleanup, validation, and downloads.

format-conversionprotein+3
DNA to RNA converter

DNA to RNA converter

Convert DNA sequences to RNA (transcription) - replaces T with U

format-conversionDNA+1
RNA to DNA converter

RNA to DNA converter

Convert RNA sequences to DNA (reverse transcription) - replaces U with T

format-conversionDNA+1
DNA to Protein Converter

DNA to Protein Converter

Translate DNA sequences to protein sequences using genetic code

format-conversionDNA+1
Protein to DNA converter

Protein to DNA converter

Reverse translate protein sequences to possible DNA sequences

format-conversionprotein+1