List Tools

Sort Lines Online

Sort lines online, with options to keep blank lines and remove duplicates.

PrivateYour text is processed on your device and never uploaded.
Input
Result
0 chars · 0 lines

Sorting a list while preserving the blank lines that separate sections is awkward in a plain sort.

Sort Lines Online sorts your lines and can keep blank lines so section spacing survives.

How to use Sort Lines Online

  1. Paste the lines you want to sort into the input box.
  2. Choose direction and whether to keep blank lines, and Sort Lines Online orders them to match.
  3. Copy the sorted lines, or download them as a text file.

Use cases

Good to know

Sort Lines Online sorts lines with locale-aware comparison and offers options to keep blank lines and to remove duplicates. With keep-blank on, empty lines are retained so the overall spacing of the list is not lost.

Frequently asked questions

What does keep blank lines do?

It preserves empty lines in the output instead of discarding them, so spacing between groups is kept.

Can I remove duplicates while sorting?

Yes. Turn on dedupe and repeated lines are removed as the list is ordered.

Is the sort ascending or descending?

You choose; a direction control switches between A-to-Z and Z-to-A ordering.

Related List Tools