Initializing, please wait a moment

Paste one item per line, then click Sort A-Z or Sort Z-A; the reordered list appears in the output box, ready to copy.

  1. Type or paste your list into the input box, keeping one item on each line.
  2. Click Sort A-Z to order the lines ascending, or Sort Z-A to order them descending.
  3. Copy the sorted list from the output box below. Your original text stays in the input box, so you can click the other button any time to flip the order.

Sort Text Lines


Sort the lines of a text block alphabetically, right in your browser. Paste your list with one item on each line, then click Sort A-Z for ascending order or Sort Z-A for descending order; the reordered list appears in the output box below, ready to copy.

Because each line is treated as one item, this is the quickest way to alphabetize a list of names or email addresses, tidy a set of tags, keywords, or CSS classes, or order the lines of a config or word list before you run a diff so the two sides line up. Sorting uses the browser's built-in locale-aware comparison, so upper- and lower-case versions of the same word land next to each other.

One thing to know: lines are compared as text, not as numbers, so "10" and "100" sort before "2". For a list of plain numbers, pad them to the same width (02, 10, 100) to get the numeric order you expect. Your original text stays in the input box after a sort, so you can flip between Sort A-Z and Sort Z-A as often as you like.

Sorting runs entirely in this browser tab using plain JavaScript - nothing you type or paste is uploaded, sent to a server, or saved. Refreshing or leaving the page clears the box; there is no history and no account.

For other quick text jobs, see the word counter or the JSON parser, both of which run the same way - fully in your browser, with nothing uploaded. A step-by-step walkthrough lives in the Sort Text Lines guide.

← Back to Developer Tools

Related tools:

  • MD5 converter - Free online MD5 hash generator and MD5-to-text reverse lookup.
  • Convert PDF to TEXT online - Extract text from PDF online for copying and editing.
  • Text To HTML Editor - Text to HTML editor online - write in a WYSIWYG view and watch the generated HTML update live, with
  • CSS Gradient Animator Generator - CSS gradient generator - build animated linear gradients with live preview; copy ready-to-paste CSS
  • CSS Minifier - Minify CSS online for faster page loads.
  • CSS UnMinifier - CSS unminifier online - beautify minified CSS with proper indentation, line breaks, and readable
  • JavaScript Minifier - JavaScript minifier online free - paste your JS, click Minify, and copy the compressed code.
  • JSON Parser By Tree View - Paste JSON to validate, format, and view it in a tree.
  • JavaScript UnMinifier - JavaScript unminifier online - reformat minified JS with indentation and line breaks for
  • Keyboard Test - Keyboard test online - press each key to highlight it, spot non-working keys, and verify Num Lock,
  • Text Diff - Text diff online - compare two text blocks and highlight added, removed, and changed characters,
  • Developer Tools - Developer tools to parse JSON, minify or unminify CSS/JS, compare text, and generate MD5 hashes.

Tags: #developer

Related guides:

Loading reviews...

Frequently Asked Questions

What does Sort Text Lines do?

It reorders a block of text one line at a time. Paste your list with one item per line and click Sort A-Z for ascending order or Sort Z-A for descending order; the sorted list appears in the output box.

When should I reach for it?

Use it to alphabetize a list of names or email addresses, tidy a set of tags, keywords, or CSS classes, or order the lines of a config or word list before you run a diff.

Why did "10" sort before "2"?

Lines are compared as text, character by character, not as numbers, so "10" comes before "2" because "1" comes before "2". To sort plain numbers in numeric order, pad them to the same number of digits first (02, 10, 100).

Is my text uploaded or saved anywhere?

No. Sorting runs entirely in your browser using plain JavaScript. Nothing you type or paste is uploaded or sent to a server, and nothing is saved - refreshing or leaving the page clears the box.