
Generate random DNA sequences with controlled length, GC content, and restriction sites. Learn more
Input
How to generate a random DNA sequence
Choose the number of sequences, their requested length, and a target GC percentage, then run DNAGenIQ to create DNA in FASTA format. It samples each base independently, so every run produces a new result. The page returns copyable sequence text and can download the same output as a .fasta file.
For example, one 12 bp sequence at a 50% GC target returns a FASTA record like this. This is a verified run of the generator, but a later run with the same settings will have different bases and can have a different measured GC percentage.
>DNA_Sequence_1 length=12bp GC=66.7%
GTCCGTGTCCGTTo place the same cloning site at both ends, enable restriction sites and choose the enzyme. With Number of sequences set to 2, Sequence length (bp) to 20, GC content (%) to 50, and EcoRI selected, a verified run produced:
>DNA_Sequence_1 length=20bp GC=45.0%
GAATTCGTCCGTGTGAATTC
>DNA_Sequence_2 length=20bp GC=50.0%
GAATTCCCGTGTCCGAATTCEach sequence begins and ends with GAATTC, the EcoRI recognition sequence. The bases between those sites are randomly sampled.
Input
DNAGenIQ is a generator, so it does not accept a sequence, FASTA file, or other upload.
| Input | Requirements |
|---|---|
| Existing sequence or file | None. Configure the settings and generate new DNA. |
| Alphabet in generated sequence | A, C, G, and T only. |
| Number of sequences | At least 1. |
Settings
| Setting | What it controls | Options and default |
|---|---|---|
Number of sequences | The number of separate FASTA records to generate. | Number setting. Use a whole number of at least 1, default 1. |
Sequence length (bp) | The requested total length for each record, including inserted restriction sites. | Number setting, default 200. |
GC content (%) | The probability that a sampled base is G or C rather than A or T. It is a target, not an exact composition constraint. | Number setting, default 50. |
Add restriction sites | Adds one copy of the selected recognition sequence to the beginning and another to the end of every record. | On or off, default off. |
Restriction sites | Selects the recognition sequence used when Add restriction sites is enabled. | EcoRI (GAATTC, default), BamHI (GGATCC), HindIII (AAGCTT), PstI (CTGCAG), XbaI (TCTAGA), or SalI (GTCGAC). This setting appears only when restriction sites are enabled. |
Results
| Result | Contents |
|---|---|
| FASTA text | One record per generated sequence, separated by a blank line. |
| FASTA header | DNA_Sequence_ followed by its one-based number, then length= in bp and the measured GC= percentage rounded to one decimal place. |
| Download | The generated FASTA text as a .fasta file. |
Choosing length and GC content
The generator samples G or C with probability GC content / 100; when it does, G and C are equally likely. Otherwise, it samples A and T with equal probability. As a result, shorter sequences naturally vary more around the target than longer ones. The FASTA header reports the actual composition of each sequence, which is the value to use when a downstream analysis needs an exact GC content.
Restriction sites also affect the measured value because their bases are fixed. The requested length includes the site at each end. Select a length at least twice the recognition-sequence length: at least 12 bp for EcoRI, BamHI, HindIII, PstI, XbaI, or SalI. If a shorter length is requested with restriction sites enabled, the generator still writes both sites and the returned sequence is longer than the requested length.
For a biologically plausible control, use the GC content of the sequences being compared and assess the generated output after creation. DNAGenIQ does not enforce a precise GC percentage, avoid motifs, remove repeats, or predict secondary structure. For a random rearrangement that preserves the composition of an existing sequence, use DNA shuffle instead.
Which DNA generator should I use?
| Goal | Best tool |
|---|---|
| Make new A/C/G/T sequences with a chosen length and approximate GC content | DNAGenIQ, the random DNA generator |
| Randomize the order of an existing DNA sequence while retaining its composition | DNA shuffle |
| Introduce substitutions, insertions, deletions, or a variant library into an existing sequence | DNA mutation generator |
| Make a synthetic RNA sequence rather than DNA | random RNA generator |
| Find the reverse-complement strand of a sequence already in hand | reverse complement |
FAQ
Does the random DNA generator make the same sequence every time?
No. Bases are sampled randomly each time the generator runs. Re-run it to produce a fresh set of sequences, and save the FASTA output when a particular sequence must be reused.
Is the GC content exactly the value I enter?
No. The setting controls the sampling probability for the random portion of each sequence. Read the GC= value in each FASTA header to see the actual percentage, especially for short sequences or sequences with fixed restriction sites.
Where are restriction sites placed in generated DNA?
The selected recognition sequence is placed at both termini, once at the start and once at the end. It is not inserted at an internal position.
Can I use a random DNA sequence directly for cloning?
Treat it as a starting sequence, not a validated construct. Check the final sequence for unwanted internal restriction sites, repeats, open reading frames, secondary structure, and the requirements of the vector and host before ordering or cloning it.
Related tools

DNA mutation generator
Mutate DNA online and generate reproducible substitution, insertion, deletion, or mixed variant libraries from plain sequences or FASTA.

ProtGenIQ - Random protein sequence generator
Generate random protein sequences with customizable length, composition, and amino acid properties

RNAGenIQ - Random RNA sequence generator
Generate random RNA sequences with customizable types and structural features

DNA Shuffle
Shuffle DNA sequences while preserving nucleotide, dinucleotide, or k-mer composition for generating randomized control sequences

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

DNA to Protein Converter
Translate DNA sequences to protein sequences using genetic code

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

FASTA splitter
Split FASTA files into record-based chunks by sequence count, target file count, maximum residues per file, or one file per sequence.

FASTA to FASTQ Converter
Convert FASTA sequence files to FASTQ format with mock quality scores

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