Skip to content
DevTools

Sort Lines Alphabetically Online

Sort lines of text A–Z, Z–A, naturally (file2 before file10), by length, reversed or shuffled. Optionally remove empty and duplicate lines.

Input

Output

Ready

Runs locally in your browser — your data is never uploaded.

About the Sort Lines

Sort lines of text alphabetically (A–Z or Z–A), with natural ordering that puts file2 before file10, by line length, in reverse order or randomly shuffled. Sorting is locale-aware, so accented characters sort as people expect.

Options remove empty lines and duplicates, and toggle case sensitivity.

How to use it

  1. Paste your lines.
  2. Choose the order and options.
  3. Copy the sorted result.

Features

  • Alphabetical, natural, length, reverse and shuffle
  • Locale-aware comparison
  • Remove empty and duplicate lines

Frequently asked questions

What is natural sorting?

Natural sort compares numbers inside text by value, so item9 comes before item10. Plain alphabetical sorting would put item10 first.

Is my data uploaded anywhere?

No. All processing happens in JavaScript inside your browser tab. Your input is never sent to a server, logged or stored, so it is safe to use with internal or sensitive data.