Pairwise Sequence Alignment (Global & Local)
Align two sequences with Needleman-Wunsch or Smith-Waterman.
🔒 Nothing you paste is logged or stored
Align two DNA or protein sequences online with global (Needleman-Wunsch), local (Smith-Waterman) or semiglobal pairwise alignment. Semiglobal is a fitting alignment keyed to the boxes, not to length: Sequence B is consumed end to end while Sequence A's terminal overhangs are free, so put the read in Sequence B and the reference in Sequence A to place a partial read without smearing it across the reference. Set your own match, mismatch and affine gap scores, then read the score, percent identity, alignment length and gap count above a 60-column alignment with a match midline. Local and semiglobal runs also report the aligned coordinate range in each sequence, and the result copies out as FASTA.
Gaps are affine (Gotoh): every gap position costs the extend penalty and a gap's first position costs the open penalty on top, so score = match × identities + mismatch × mismatches + extend × gap positions + open × gap runs. Set open to 0 for a purely linear penalty.
Working on a whole construct rather than two sequences? Open SeqStudio — the full editor, with live feature annotation, plasmid maps, restriction and primer panels, undo/redo, multi-document tabs and GenBank / SnapGene import and export.
How to use the Pairwise Alignment tool
- 1Paste your two sequences into the Sequence A and Sequence B boxes; each label shows that sequence's current length.
- 2Choose "Global (Needleman-Wunsch)", "Local (Smith-Waterman)" or "Semi-global (fitting: B into A)" from the Mode dropdown.
- 3Set the Match, Mismatch, Gap extend and Gap open fields (defaults 1, -1, -2 and -3).
- 4Read the Score, Identity, Aln length and Gaps tiles, scan the alignment in 60-column blocks with its match midline, and click "Copy FASTA" to take the aligned pair away.
Frequently asked questions
What is the difference between global and local alignment?
Global (Needleman-Wunsch) aligns the sequences end to end. Local (Smith-Waterman) finds the best-matching subregion, which is better when only part of the sequences is similar.
Does it work for proteins?
Yes. It uses simple match/mismatch scoring, which works for DNA and protein. Substitution matrices such as BLOSUM are not yet supported.
How are gaps penalised?
Affinely (Gotoh), so one long gap is cheaper than several short ones. Gap extend is the per-position cost, charged for every position of a gap including its first, and Gap open is an extra one-off cost charged on that first position — with the form's defaults (-2 extend, -3 open) a k-base gap costs -2 x (k + 1.5). That is why the reported score is lower than multiplying the extend value by the gap count would suggest. Both are editable fields on the page and they are independent: set Gap open to 0 for a purely linear penalty, or raise Gap extend on its own and the 1.5x relationship between them no longer holds. Over the API, omitting gapOpen falls back to 1.5 x gap.
Is there a length limit?
Very long sequences are capped to keep the alignment responsive. Use shorter sequences if you hit the limit.