Loading…
Sort lines alphabetically and remove duplicates. Use when cleaning lists; for comparing two texts use text-diff-visual. Input: text lines ≤10MB. Returns sorted unique lines. 100% client-side.
Text Sorter & Deduplicator is loading — interactive editor will appear here. Use examples below to try instantly once loaded.
Press ? for keyboard shortcuts
Text line sorter with 8 modes: A-Z, Z-A, length ascending, length descending, numeric sort, natural sort (human-friendly), reverse order, and randomize. Supports deduplication, empty line removal, trimming whitespace per line, case-sensitive toggle, and a paste button for quick input from clipboard.
Sorting lines of text manually is slow and error-prone. This tool provides a variety of sort orders and preprocessing options so users can organize any list-based text in one click.
This tool is part of the DevStackIO platform — a collection of free online developer tools from DevStackIO. Browse more free developer resources on DevStackIO.
Anyone who works with lists, CSV extracts, keyword collections, code imports, or any line-delimited text that needs ordering or deduplication.
Paste or type text (one item per line) into the input area; use the paste button to quickly load clipboard content.
Select a sort mode: A-Z, Z-A, Length ↑, Length ↓, Numeric, Natural, Reverse, or Randomize.
Toggle case-sensitive sorting on or off — when off, all lines are compared case-insensitively.
Enable Remove Duplicates, Remove Empty Lines, and Trim Each Line as needed via checkboxes.
Click Sort to process the text; the output appears in the result area with line count shown.
Use the copy button to copy the sorted output to your clipboard.
Input: lines "banana", "Apple", "cherry", "Banana", "" with A-Z sort, case-insensitive, remove duplicates, remove empty → Output: ["Apple", "banana", "cherry"] (4 lines → 3 lines)Input: lines "file2.txt", "file10.txt", "file1.txt", "file20.txt" with Natural sort → Output: ["file1.txt", "file2.txt", "file10.txt", "file20.txt"] (numeric-aware ordering)What is the difference between Numeric and Natural sort?
Numeric treats each line as a number; Natural sorts by text but recognizes numeric sequences within text (e.g., file2 < file10).
Does Randomize produce the same order every time? No
each click produces a fresh random order using a cryptographically secure PRNG.
How large an input can the tool handle?
Up to 100,000 lines or 5MB of text; larger inputs may cause performance degradation.
Can I sort by a specific column or delimiter? Not in this tool
each line is treated as a single item. Use a spreadsheet for columnar sorting.
Authoritative specifications, standards, and in-depth reading for Text Sorter & Deduplicator.
Visual side-by-side diff for two texts with char-level highlights. Use as default diff tool; for similarity score use string-comparison, for JSON use json-diff. Input: two texts ≤10MB. Returns visual diff. 100% client-side.
Remove duplicate lines from text while keeping first-seen order. Case and trim options.
Find and replace text with literal, regex, and case-insensitive modes. Shows replacement count.
Reverse text by characters (grapheme-safe for emoji), words, or lines.
Normalize line breaks to LF (Unix/Mac) or CRLF (Windows), or remove them entirely.
Count words, characters, and sentences. Get reading time and Flesch score as you type.
Preview rendered Markdown without editing. Use for quick read-only preview; for editing use markdown-editor, for HTML output copy use markdown-to-html. Input: Markdown ≤10MB. Returns rendered HTML preview. 100% client-side.
Generate URL slugs from titles with lowercase rules. Use as default slug tool; slugify-string is a noindex alias. Input: text ≤10MB. Returns slug string. 100% client-side.