# Sort Lines

> Sort A–Z, naturally, by length, or shuffle. Runs entirely in your browser — nothing you paste is sent anywhere.

Source: https://toffeekit.com/tools/sort-lines

**Category:** [Text](https://toffeekit.com/category/text) · **Price:** Free · **Runs:** in your browser, nothing is uploaded

Open the tool: https://toffeekit.com/tools/sort-lines

**Also useful for:** sort, alphabetical, shuffle, lines

## How it works

1. Paste your lines into the input box, one item per line, or click Sample.
2. Choose Sort by: Natural, A to Z, Length or Shuffle.
3. Turn on Reverse, Unique only or Ignore case as needed.
4. Copy the sorted list from the result box, or click Save to download it.

## FAQ

### How do I sort a list alphabetically?

Paste the list and choose A to Z under Sort by. Switch on Reverse for Z to A.

### What is natural sort?

Natural sort reads numbers inside text as numbers, so file2.txt comes before file10.txt. Plain alphabetical sorting would put file10.txt first because it compares character by character.

### How do I sort lines by length?

Choose Length. The shortest lines come first, and lines of equal length are ordered alphabetically. Turn on Reverse to put the longest first.

### How do I randomize the order of a list?

Choose Shuffle. The order is picked with the browser's secure random generator, and you can switch away and back to Shuffle to get a fresh order.

### Does sorting remove duplicates?

Only if you switch on Unique only. Otherwise repeated lines stay in the list, next to each other once sorted.

### Is Sort Lines free and private?

Yes. It's free with no sign-up or limits, and it runs entirely in your browser, so what you type or paste never leaves your device. It works on phones and computers alike.

## Privacy

Sort Lines runs entirely in your browser. Your files and text are processed on your device and are never uploaded.

## Related tools

- [Word Counter](https://toffeekit.com/tools/word-counter) — Words, characters, sentences and reading time, live.
- [Case Converter](https://toffeekit.com/tools/case-converter) — UPPER, lower, Title, camelCase, snake_case and more.
- [Remove Duplicate Lines](https://toffeekit.com/tools/remove-duplicate-lines) — Keep only unique lines, in order.
- [Text Cleaner](https://toffeekit.com/tools/text-cleaner) — Fix spaces, quotes, empty lines and stray HTML.
- [Find and Replace](https://toffeekit.com/tools/find-and-replace) — Replace words or regex patterns in bulk.
- [Slug Generator](https://toffeekit.com/tools/slug-generator) — Turn titles into clean URL slugs.

