DNA sequence converter

IUPAC DNA Code Converter

Convert ambiguous IUPAC DNA codes into possible bases, expand degenerate sequences, estimate primer diversity, and generate reverse complements for sequence analysis or primer design.

Working DNA code converter

Convert IUPAC DNA codes

Paste a degenerate DNA sequence to decode IUPAC ambiguity symbols, calculate sequence diversity, create a reverse complement, and expand small primer pools into exact DNA sequences.

Accepted symbols: A, C, G, T, R, Y, S, W, K, M, B, D, H, V, N. FASTA headers, spaces, line breaks, and numbers are ignored.

Convert base choices to one IUPAC code

Select possible bases at one position.

IUPAC codeRPurine: A or G
Sequence length15bases
Possible sequences64degenerate variants
Exact bases11
Ambiguous bases4
GC range40.066.7%
Expanded preview64all variants shown

Complement

TACCGNTGYAARCCN

Reverse complement

NCCRAAYGTNGCCAT

Search pattern

ATGGC[ACGT]AC[AG]TT[CT]GG[ACGT]

IUPAC codes found in your sequence

AAdenine only2
CCytosine only2
GGuanine only4
TThymine only3
RPurine: A or G1
YPyrimidine: C or T1
NAny base: A, C, G, or T2

Exact sequence expansion

All possible exact DNA sequences are shown below.

ATGGCAACATTCGGAATGGCAACATTCGGCATGGCAACATTCGGGATGGCAACATTCGGTATGGCAACATTTGGAATGGCAACATTTGGCATGGCAACATTTGGGATGGCAACATTTGGTATGGCAACGTTCGGAATGGCAACGTTCGGCATGGCAACGTTCGGGATGGCAACGTTCGGTATGGCAACGTTTGGAATGGCAACGTTTGGCATGGCAACGTTTGGGATGGCAACGTTTGGTATGGCCACATTCGGAATGGCCACATTCGGCATGGCCACATTCGGGATGGCCACATTCGGTATGGCCACATTTGGAATGGCCACATTTGGCATGGCCACATTTGGGATGGCCACATTTGGTATGGCCACGTTCGGAATGGCCACGTTCGGCATGGCCACGTTCGGGATGGCCACGTTCGGTATGGCCACGTTTGGAATGGCCACGTTTGGCATGGCCACGTTTGGGATGGCCACGTTTGGTATGGCGACATTCGGAATGGCGACATTCGGCATGGCGACATTCGGGATGGCGACATTCGGTATGGCGACATTTGGAATGGCGACATTTGGCATGGCGACATTTGGGATGGCGACATTTGGTATGGCGACGTTCGGAATGGCGACGTTCGGCATGGCGACGTTCGGGATGGCGACGTTCGGTATGGCGACGTTTGGAATGGCGACGTTTGGCATGGCGACGTTTGGGATGGCGACGTTTGGTATGGCTACATTCGGAATGGCTACATTCGGCATGGCTACATTCGGGATGGCTACATTCGGTATGGCTACATTTGGAATGGCTACATTTGGCATGGCTACATTTGGGATGGCTACATTTGGTATGGCTACGTTCGGAATGGCTACGTTCGGCATGGCTACGTTCGGGATGGCTACGTTCGGTATGGCTACGTTTGGAATGGCTACGTTTGGCATGGCTACGTTTGGGATGGCTACGTTTGGT

Educational sequence helper only. Verify critical primers, probes, and degenerate designs with your lab protocol or supplier before ordering.

IUPAC DNA Code Converter showing ambiguous base symbols, possible bases, sequence diversity, and reverse complement output

IUPAC DNA Code Converter for ambiguous bases

The IUPAC DNA Code Converter helps you read DNA sequences that contain ambiguity symbols. These symbols appear in degenerate primers, consensus sequences, sequencing reports, and database records when one position may represent more than one nucleotide.

The tool accepts standard DNA bases and IUPAC ambiguity codes. It then shows the possible bases for each symbol, total sequence diversity, GC content range, complement, reverse complement, and a search pattern that can help students understand how ambiguous positions work.

How to read IUPAC DNA ambiguity codes

A, C, G, and T represent exact DNA bases. Other symbols represent a set of possible bases. R means A or G. Y means C or T. M means A or C. K means G or T. S means G or C. W means A or T. N means any base.

Three-base ambiguity symbols are also common. B means C, G, or T. D means A, G, or T. H means A, C, or T. V means A, C, or G. These codes help keep a degenerate sequence short while still describing many exact DNA sequences.

A complete IUPAC ambiguity code table is available from the Sequence Manipulation Suite reference page.IUPAC nucleotide code reference

IUPAC DNA code formula for sequence diversity

Sequence diversity is the number of exact DNA sequences represented by one ambiguous sequence. The formula is simple. Multiply the number of possible bases at each ambiguous position.

For example, the sequence ATGN has one N. N can be A, C, G, or T. So the diversity is 4. The sequence ATGNN has two N positions. Its diversity is 4 × 4 = 16 exact sequences.

Mixed symbols multiply in the same way. A sequence with R, Y, and N has 2 × 2 × 4 = 16 possible combinations. This matters because a high diversity primer pool can reduce the amount of each useful primer variant in a PCR reaction.

Worked example using a degenerate primer

Imagine you have the primer sequence ATGGCNACRTTYGGN. The tool reads N as A, C, G, or T. It reads R as A or G. It reads Y as C or T. The exact A, T, G, and C positions stay unchanged.

The diversity calculation is 4 × 2 × 2 × 4 = 64 possible exact primer sequences. The GC range changes because some ambiguous positions can become G or C, while others can become A or T. The reverse complement keeps ambiguity logic by converting R to Y, Y to R, K to M, and M to K.

This example helps students see why a short degenerate primer can actually represent a large primer mixture. It also helps lab workers decide whether primer degeneracy is acceptable before synthesis.

Use case 1: checking degenerate PCR primers

Degenerate primers are useful when you want to amplify related genes from different organisms or unknown variants of a conserved sequence. The IUPAC DNA Code Converter helps you check how many exact primer molecules are hidden inside one written primer sequence.

Use the diversity output before ordering the primer. A primer with 8 variants is usually easier to handle than a primer with 1,024 variants. The best limit depends on the assay, target abundance, primer length, concentration, and polymerase conditions.

After checking diversity, you can review the same design with aDegenerate Primer Generator if you are starting from a protein sequence.

Use case 2: decoding consensus DNA sequences

Consensus sequences often use ambiguity codes when samples differ at one position. For example, a consensus sequence may contain R when some reads show A and other reads show G. This is common in sequence alignment, variant summaries, and teaching examples.

The converter makes those symbols easier to explain. Students can see the exact base choices, count ambiguous sites, and estimate how many possible sequences the consensus pattern represents.

For broader sequence checks, use aDNA Sequence Analyzer to calculate length, GC content, reverse complement, and other sequence properties.

Practical problem: reducing primer degeneracy

Suppose a primer has four N positions. Its diversity is 4 × 4 × 4 × 4 = 256 variants. If you can replace two N positions with R symbols, the diversity becomes 4 × 4 × 2 × 2 = 64 variants. That is a fourfold reduction.

This matters in real PCR planning. A lower-diversity primer pool gives each variant a larger share of the total primer concentration. It can improve the chance that the correct variant is present at an effective amount, although assay performance still depends on template quality, annealing temperature, and primer specificity.

What to verify before using IUPAC DNA codes

Confirm that the sequence is DNA, not RNA or protein. This page uses T for thymine and does not treat U as a DNA base. Also confirm the 5′ to 3′ direction before interpreting the reverse complement.

Check synthesis limits, primer degeneracy, GC range, melting temperature range, and target specificity before ordering. For important experiments, verify the final design with your lab protocol, supervisor, or supplier design software.

Related tools

Student and lab questions

Questions About IUPAC DNA Codes

What does an IUPAC DNA Code Converter do?

It converts ambiguous DNA symbols such as R, Y, M, K, S, W, B, D, H, V, and N into their possible A, C, G, and T base choices.

Can I use this tool for degenerate primers?

Yes. The tool helps you decode degenerate primer positions, estimate total primer diversity, generate reverse complements, and preview exact sequence variants when the pool is small enough.

What does N mean in a DNA sequence?

N means any DNA base. It can represent A, C, G, or T at that position, so one N increases sequence diversity by four possible choices.

Why does sequence diversity grow so fast?

Each ambiguous position multiplies the number of possible exact sequences. For example, one N gives 4 choices, while three N positions give 4 × 4 × 4 = 64 possible sequences.

Should I verify degenerate primer designs before ordering?

Yes. Verify the final primer pool, degeneracy, GC range, melting temperature range, target specificity, and synthesis limits before ordering or using the primer in PCR.