Sort & Dedupe Lines

Sort lines and remove duplicates like sort and uniq

Input

One item per line. CSV files are read as plain lines; columns are not parsed.

Options

Copy to keep
Advanced
Line endings

Output

Paste lines, open a .txt or .csv file, or load an example.
About Sort & Dedupe Lines

Sort & Dedupe Lines works like the sort and uniq commands in your browser. Paste a list or open a .txt or .csv file, then sort it alphabetically, naturally, numerically, by length, in reverse or in a reproducible shuffle, and remove duplicate lines by exact, case-insensitive or normalized comparison. Line statistics and a list of removed duplicates show exactly what changed.

How to use
  1. 1.Paste one item per line, open a .txt or .csv file, or load an example.
  2. 2.Choose a sort order and how duplicates are detected.
  3. 3.Choose whether the first or last copy of a duplicate is kept, and whether lines are trimmed and blank lines removed.
  4. 4.Check the line statistics and the Removed duplicates tab.
  5. 5.Copy or download the result.
Order of operations

Every run follows the same order: line endings (CRLF, CR or LF) are normalized, each line is trimmed if enabled, blank lines are removed if enabled, duplicates are removed, and finally the remaining lines are sorted. Because trimming happens first, "apple" and "apple " count as duplicates when Trim each line is on.

Sorting details

A → Z and natural order use locale-aware comparison, so accented letters sort next to their base letter and natural order places file2 before file10. Numeric order reads the leading number of each line, including negatives, decimals and exponents; lines without a leading number go last in their input order. Every sort is stable: lines that compare equal keep their input order. Shuffle uses a seeded generator, so the same input gives the same order until you select Reshuffle.

Privacy and limits

Lines are processed in your browser and are not uploaded. Only your option choices are remembered on this device. Inputs up to 20,000,000 characters are supported; large inputs update after typing pauses, and the preview shows the first 20,000 lines while Copy and Download include every line. CSV files are treated as plain lines, so quoted fields that span several lines are not merged.

CodingTool is officially live on

Launched on StartupBaseCodingTool.dev - Free, Fast & Easy Developer Tools in One Place | Product HuntCodingTool - Featured on Startup FameFazier badgeListed on Turbo0Featured on Twelve ToolsFeatured on Findly.toolsLaunchpadly Startup DirectoryCodingTool.dev — Featured on Smol Launch