FASTA Cleanup Tool
Paste a messy sequence and this tool automatically fixes line wrapping, whitespace, and header formatting into tidy FASTA. Headerless sequences get an auto-generated name, and duplicate headers are automatically disambiguated.
| Name | Length (nt) | Status |
|---|
Why does FASTA need cleaning up?
Sequences copied from papers, databases, or sequencer software often carry small but disruptive problems: inconsistent line-wrap widths, stray position numbers, spaces, or tabs mixed into the sequence, missing headers, or the same header name repeated more than once. This tool automatically finds and fixes these issues, then outputs a standard, clean FASTA file.
What this tool fixes automatically
- Sequence body cleanup: strips whitespace, tabs, digits (leftover position numbers, for example), and any other unrecognized characters from the sequence body.
- Auto-naming headerless sequences: a sequence block with no
>header gets a numbered name automatically, such assequence_1. - Duplicate header disambiguation: when the same header name appears more than once, it's automatically suffixed with
_2,_3, and so on so every record stays distinguishable. - Dropping empty records: records that consist of a header with no actual sequence are automatically excluded from the output.
Options you control
- Line wrap width: choose 60, 70, 80, or 100 characters, or output each sequence on a single line. 60 characters is the most widely used FASTA convention.
- Letter case: convert everything to uppercase or lowercase, or leave the original case untouched.
- Keep alignment gap characters (-): if you're pasting in alignment output, this preserves hyphens instead of stripping them.
- Replace spaces in headers with underscores: header names with spaces can get truncated by some tools, so this converts spaces to underscores for a safer identifier.
How to use it
- Paste the sequence you want to clean up (FASTA, multi-FASTA, or headerless — all supported) into the input box above.
- Choose the line wrap width, letter case, and any extra options you need.
- Check the results table for any records that were auto-named or had a duplicate name fixed.
- Copy the cleaned FASTA, or download it as a file.
Frequently asked questions
What problem does the FASTA cleanup tool solve?
Sequences copied from different sources often have inconsistent line-wrap widths, stray whitespace, tabs, or leftover position numbers mixed into the sequence, missing headers, or duplicate header names. This tool detects and fixes these issues automatically, producing standard FASTA output.
What happens to sequences without a header?
A sequence block with no header line (starting with >) is automatically given a numbered name, such as sequence_1, and flagged with an "Auto-named" badge in the results table.
Can I keep alignment gap characters (-)?
Yes. Turning on the "Keep alignment gap characters (-)" option preserves hyphens found in sequence alignment output instead of stripping them.
Can it clean up sequences with digits or spaces mixed in?
Yes. Any non-letter character in the sequence body — spaces, tabs, digits such as leftover position numbers — is automatically removed, and the count of removed characters is shown in the results.
Is my sequence data sent to a server?
No. All cleanup happens locally in your browser using JavaScript. Nothing is transmitted to or stored on any server.