Sort Lines Tool

Sort pasted lists quickly in natural, numeric, or dictionary order.

Blank-line removal, dedupe, and locale-aware sorting all run locally in your browser.

Your input stays in the browser

How to use

  1. Paste your list into the left box, one item per line.
  2. Choose natural, numeric, or dictionary order and pick ascending or descending.
  3. Adjust locale, blank-line removal, dedupe, or trimming if needed.
  4. Click Sort, then copy or download the result.

Samples

Natural order (filenames)

Input

file10
file2
file1

Output

file1
file2
file10

Numeric order (`de-DE`)

Input

10,5
2,75
1.234,5

Output

2,75
10,5
1.234,5

Dictionary order (`sv`)

Input

Öga
Zebra
Äpple
Ål

Output

Zebra
Ål
Äpple
Öga

Glossary

Natural order

A human-friendly comparison mode that places `2` before `10` instead of comparing digit strings literally.

Dictionary order

A lexical string comparison. The exact order depends on language and locale rules.

Locale

The language and regional rules used for collation and number parsing, such as `ja`, `en`, `sv`, or `de-DE`.

FAQ

What is the difference between natural and dictionary order?

Natural order treats embedded numbers as numbers, so `file2` comes before `file10`. Dictionary order compares text as text, which can place `file10` before `file2`.

Can numeric order handle `1,234.56` and `1.234,56`?

Yes. The tool interprets decimal and grouping separators according to the selected locale. If a line does not fit that locale, it is handled as non-numeric according to your setting.

How should I choose a locale?

Use `Auto` in most cases. Switch to `Custom` only when you need another language's collation or numeric formatting rules, such as `sv` or `de-DE`.

How does duplicate removal work?

The default mode removes only exact matches. In advanced settings you can switch to `Equal under current sort rules`, which can merge lines that compare the same under the active collation or numeric rules.

Is my data sent to a server?

No. Sorting happens entirely in the browser and your input is not sent to a server.

Can I use this with Japanese, Arabic, or European languages?

Yes. The UI is localized and sorting relies on `Intl.Collator` plus locale-aware number parsing. The final order still depends on the selected locale and the browser's implementation.

Notes

  • Numeric order depends on the selected locale for decimal and grouping symbols. If the result looks wrong, check the locale first.
  • `Equal under current sort rules` can merge lines that look different if case, accents, or numeric formatting are treated as equivalent.
  • Only options can be stored locally. Input and output text are not saved.

Privacy and notes

This tool runs locally in the browser. Multilingual ordering can vary slightly depending on the selected locale and browser engine.