Sort & Clean Lines

Sort a list alphabetically, numerically or by length — then clean it up with case changes, prefixes, quotes and numbering. Private — runs in your browser.

Input

Output

0in0out0removed

Options

How to use the sort & clean lines tool

  1. Paste your list. Drop in text or a file with one item per line (or change the input separator).
  2. Pick a sort order. Alphabetical, natural (so “Item 2” comes before “Item 10”), numeric, by length, reversed or shuffled randomly.
  3. Tidy the items. Trim spaces, remove empty lines and duplicates, change the case, add prefixes or suffixes, wrap items in quotes or number them.
  4. Copy the result. Copy it or download it as a text file, or use “Use output as input” to chain more clean-ups.

Common uses

Frequently asked questions

How do I sort lines alphabetically?

Paste the list and choose A → Z (or Z → A). Sorting ignores letter case so Apple and banana sort the way you expect.

What is natural sort?

Natural sort compares the numbers inside text as numbers, so “Item 2” comes before “Item 10” instead of after “Item 1”.

How do I sort numbers correctly?

Use “Numeric low → high” or “high → low”. Text lines that are not numbers are placed at the end.

Can I shuffle or randomise a list?

Yes, choose “Shuffle randomly”. Each change to the input or options produces a fresh shuffle.

Can I add numbers or quotes to each line?

Yes. “Number the items” adds 1., 2., 3. and “Wrap each item” adds quotes, brackets or backticks; combine with an output separator of comma to build code-ready lists.

Does it change my original text?

No. Your input is untouched; the sorted result appears in the output box.

More tools: Email Extractor · Compare Lists · Remove Duplicates · Sort Lines · List Converter

Related guides