Text Tools
Line Sorter & Duplicate Remover
Sort and clean one-item-per-line text without uploading it.
Result
6 input lines → 6 output lines
Release-1 release-2 release-2 release-10 release-20
About This Tool
Line-based lists often need more than a simple alphabetical sort. Version labels, filenames, IDs, copied spreadsheet columns, allowlists, inventories, and notes may contain duplicate rows, blank lines, mixed capitalization, or numbers that sort badly as plain text. This tool keeps each line as one item and lets you sort ascending or descending, reverse the existing order, apply natural numeric ordering, trim line edges, and optionally remove empty or duplicate lines. Processing stays in your browser.
How To Use It
- Paste or type one item per line.
- Choose ascending, descending, or Reverse order. Reverse preserves the items and simply flips their current sequence.
- Adjust case sensitivity and natural numeric ordering to match the list's meaning.
- Enable trimming, empty-line removal, or duplicate removal only when you intentionally want those transformations.
- Review the input/output counts and copy the transformed list.
Examples
Natural filename order
With natural numeric order enabled, file2 sorts before file10. Plain lexical sorting can place file10 before file2 because it compares characters rather than embedded number values.
Clean a copied list
Enable Trim each line, Remove empty lines, and Remove duplicates to clean a column copied from a document or spreadsheet before pasting it into another system.
Preserve capitalization differences
Enable case sensitivity before removing duplicates when Alpha and alpha should remain separate items rather than being treated as the same line.
Reverse a generated sequence
Reverse order flips the current line sequence without alphabetizing it, which is useful for logs, chronological notes, or lists already sorted elsewhere.
Useful Notes
Natural numeric sorting
Natural numeric ordering asks the browser's locale-aware collator to compare numeric-looking parts as numbers. This makes labels such as item2 and item10 sort in the order people commonly expect. Disable it when every character should participate in ordinary lexical ordering.
Case sensitivity affects sorting and duplicates
When case sensitivity is off, the comparator treats capitalization differences as equivalent for ordering and duplicate detection uses a lowercase comparison key. The first matching line is retained when duplicates are removed. Turn case sensitivity on when capitalization carries meaning.
Trimming is a destructive transformation
Trim each line removes leading and trailing whitespace before sorting or deduplication. That can intentionally merge lines that differed only by surrounding spaces, but it also changes exact text. Leave trimming off when whitespace is significant.
Line endings are normalized
Windows CRLF and older carriage-return line endings are normalized to newline characters in the output. The content within each line is otherwise preserved unless you enable trimming or removal options.
Local text processing
Sorting and cleanup happen in the browser. The tool does not need to upload the pasted list to a Hanakash API, making it suitable for ordinary local text cleanup. Avoid placing secrets into any web page unless doing so is appropriate for your environment.
FAQ
Can I remove duplicates without sorting alphabetically?
Yes. Choose Reverse order only if you also want to reverse the list; otherwise duplicate removal currently accompanies the selected ascending or descending sort. The first occurrence is retained before sorting.
Why does item10 sometimes appear before item2?
That is typical lexical ordering. Keep Natural numeric order enabled when embedded numbers should compare numerically so item2 precedes item10.
Are Alpha and alpha considered duplicates?
By default, yes when duplicate removal is enabled because case sensitivity is off. Enable Case sensitive if capitalization should make them distinct.
Does trimming remove spaces inside a line?
No. Trim each line removes whitespace only from the beginning and end of each line. Interior spaces remain unchanged.
Does the tool upload my list?
No. The sorting and cleanup operations are performed locally in the browser and do not require a Hanakash API request.
Related Tools
Word & Character Counter
PopularInstant word, character, line, and reading-time counts.
Case Converter
PopularConvert text into common writing and developer casing styles.
Text Difference Checker
Compare two texts and find line-by-line changes.
UTF-8 Byte Counter
Count UTF-8 bytes, Unicode code points, and UTF-16 code units.