Sort Lines
Sort multiline text alphabetically or numerically.
Sort Lines orders one-item-per-line text by A to Z, Z to A, numeric value, or line length. Optional settings let you compare case-insensitively and remove duplicate lines first.
Tool area
Optional product discovery
You may also like
FunnyTools keeps its tools free to use.
If you are already shopping, these Amazon links may help support the site. We may earn from qualifying purchases at no extra cost to you.
How to use
- Paste multiline text into the input area.
- Choose A to Z, Z to A, numeric, or length sorting.
- Optionally ignore case and remove duplicate lines.
- Copy the sorted result.
Use cases
- Alphabetize keywords, tags, or to-do items.
- Sort numbers, scores, quantities, or prices.
- Find unusually long headings, labels, or snippets by length.
Content and verification review:
How to verify a Sort Lines result before relying on it
This section covers Sort Lines’ default alphabetical mode, since it is not numeric order, and what always happens to blank lines and duplicates regardless of settings.
“Ascending” is string order, not numeric order, by default
Paste three lines — 3, 1, 10 — keep the default “Ascending” mode, and click Sort: the result is 1, 10, 3, not the numerically expected 1, 3, 10, because ascending mode compares lines character-by-character as strings, and “10” sorts before “3” the same way it would in a phone book. Switch the mode dropdown to “Numeric” and re-sort the same three lines to get the numerically correct 1, 3, 10 instead.
Blank lines are removed before sorting even runs — there is no option to keep them
Every line is trimmed and any line that becomes empty is dropped before the sort logic runs at all, regardless of which checkboxes are set — unlike Remove Empty Lines elsewhere on this site, this tool has no “keep a single blank line” option, so a list with intentional blank separator lines loses every one of them once run through Sort Lines.
“Remove duplicates” keeps the first occurrence found in your original input, not in sorted order
Check “Remove duplicates” on a list with a repeated entry: whether two entries count as duplicates depends on the Case-insensitive checkbox, but the surviving copy is always whichever occurrence appeared first in the order you originally pasted the lines — deduplication happens before the sort step, using input order rather than the final sorted order, to decide which copy to keep.
Acceptance checklist
- The Numeric sort mode was selected whenever the lines contain numbers that need true numeric order, since the default Ascending mode sorts as text.
- It is expected that blank lines disappear from the output unconditionally — there is no setting on this tool to preserve them.
- Case-insensitive has been set to match whether entries differing only in capitalization should be treated as duplicates.
- The result’s line count has been checked against the expected count, accounting for both blank-line removal and any deduplication.
Who is it for
- Users organizing lists, codes, and small text datasets
- QA teams comparing alphabetical and numeric ordering
- Students and administrators cleaning pasted text
Real examples
Sort a list containing numbers
Decide whether values such as `2` and `10` should use numeric or lexical order, then choose the matching mode. Inspect the first and last results, especially leading zeros, negative values, decimals, and mixed text.
Create a stable list for comparison
Normalize case and surrounding whitespace before sorting, then remove duplicates if needed. This makes manual comparison easier but does not understand names, natural-language collation, or every locale-specific ordering convention.
Good to know
- Alphabetical results can vary with browser locale and case-sensitivity options.
- Sorting changes source order, so keep an untouched copy of important data.
- The tool works line by line and does not parse CSV quoting, columns, or multiline cells.
FAQ
- How does numeric sort handle non-numeric lines?
- The tool reads a number from the start of each line. Lines without a number are placed after numeric lines and sorted as text.
- Which duplicate is kept?
- The first matching line is kept before sorting runs.
- Are blank lines preserved?
- Blank lines are ignored so the output is easier to copy into lists or spreadsheets.
Privacy & local processing
🔒 This tool runs entirely in your browser. No data is uploaded to any server.
Text is sorted locally in your browser and is not uploaded.
Trust & usage note
This tool runs mainly in your browser. Your input is not actively uploaded to a server. Avoid entering highly sensitive data. Results are for reference only.
Last updated:
Get updates
New tools and practical tips, straight to your inbox. No spam, unsubscribe anytime.