Primer hairpin checker

Check a primer for hairpin (self-complementary stem-loop) potential by finding its longest self-folding stem, with the loop size. A fast base-run screen, not a ΔG model.

A, C, G, T or N only.

Hairpin risk

How it works

Formula

Scan for the longest run where the 5′ part of the primer is complementary (antiparallel) to a downstream part, separated by a loop of at least 3 unpaired bases. That run is the hairpin stem; longer, more G/C-rich stems fold more stably.

Worked example

GCGCAAAAGCGC: the 5′ GCGC pairs with the 3′ GCGC (its reverse complement) across a 4-base AAAA loop — a 4 bp stem, 4 nt loop hairpin.

When to use it

When designing or troubleshooting a primer that amplifies poorly. A stable hairpin sequesters the 3′ end so it cannot prime, lowering yield. Avoid stems of ~4+ strong bases, especially near the 3′ end.

Sensible defaults

The default GCGCAAAAGCGC is a deliberate hairpin so you can see a non-zero stem. Paste your own primer to screen it.

FAQ

Does this compute a hairpin melting temperature?
No. It is a fast base-pair-run heuristic, like the primer-dimer checker. For a thermodynamic ΔG/Tm of the hairpin, use a nearest-neighbour secondary-structure tool.
How long a stem is a problem?
There is no hard cutoff, but stems of about 4+ bp (more so if G/C-rich or close to the 3′ end) are worth avoiding. Short A/T stems near the 5′ end matter less.