Text Toolsavailable

Sort Lines

Arrange text lines alphabetically or in reverse order.

Input

Type or paste one item per line. Sorting happens only in this browser.

OutputRead-only

Read-only, selectable sorted output.

Options

Turn off case-sensitive sorting for case-insensitive comparison. Output always keeps the original line text, including outer whitespace.

Sorting mode
Direction

Sort statistics

Input lines
0
Output lines
0
Duplicate lines removed
0
Input characters
0
Output characters
0
Input UTF-8 bytes
0 B
Output UTF-8 bytes
0 B

What this tool does

Sort a list of text lines alphabetically, naturally, or by numeric value. Results update live in this browser tab and remain selectable for review.

Sorting and duplicates

Equal comparison values keep their source order during sorting. If duplicate removal is enabled, sorting happens first and the first matching sorted line is retained. Matching respects the case and whitespace options while the displayed output preserves each retained line's original formatting.

How to use

  1. Paste or type one item per line.
  2. Choose alphabetical, natural, or numeric sorting and a direction.
  3. Review the live output, then copy, download, or reuse it as input.

Privacy

Your text never leaves your browser.

Limitations

Natural sorting follows your browser's locale collation rules. Numeric mode places valid finite numbers before non-numeric lines and compares the latter alphabetically. Line endings are normalized to LF in the output.

Frequently asked questions

What is natural sorting?

It compares number runs as numbers, so Line2 comes before Line10.

Does ignoring whitespace trim my output?

No. It affects comparison only; retained lines keep their original spaces.

How are duplicates removed?

The list is sorted first, then the first matching sorted line is retained using the selected case and whitespace rules.

Practical guide

When to use it

Use it to organize one-item-per-line lists such as package names, domains, environment keys, or test data.

Three steps

  1. Paste each item on its own line.
  2. Select alphabetical, natural, or numeric ordering and the desired direction.
  3. Review the sorted output before using it in a file or spreadsheet.

Example and a common mistake

Natural order places file2 before file10, which is often more useful than simple character order.

Numeric sort treats valid numbers specially; values such as 1.2.3 are text and should be reviewed as such.

Text

Available

Line Number Tool

Add, remove, and format line numbers in copied text.

Text

Available

Text Diff

See differences between two blocks of text at a glance.