inyourbrowser.com

Sort list online

Sort any list of items quickly and easily. Paste your list, choose a sort mode, and get instant results. Options include alphabetical, reverse alphabetical, numeric, by shortest or longest line, and random shuffle. Combine with duplicate removal and whitespace trimming. All processing runs locally in your browser.

Input

Output

SORT OPTIONS

How it works

The input is split on newlines to produce an array of lines; a final newline does not add an empty line. Trim whitespace applies String.trim() to each line. Remove duplicates uses a Set keyed on the lowercased line to preserve the first occurrence. Keep original order skips sorting. The other sort modes use Array.sort() with an Intl.Collator for alphabetical ordering, the number each line starts with for numeric ordering, or a character count from Intl.Segmenter for length-based modes. Shuffle uses the Fisher-Yates algorithm with Math.random(). The result array is joined back with newlines. All processing runs in JavaScript in your browser.

Processing runs in your browser

All processing happens locally in your browser tab. Our servers are not involved at any point.

Related operations

For swapping recurring substrings across the list, try find and replace. To compare two sorted lists side by side, use text diff. For checking item counts after deduplication, see the word counter.

Frequently asked questions

What sort modes are available?
Keep original order (no sorting), A–Z (alphabetical ascending), Z–A (alphabetical descending), Numeric (by the number each line starts with), Shortest first (by character count), Longest first (by character count), and Shuffle (random order).
Can I remove duplicate lines?
Yes. Enable the 'Remove duplicates' toggle to keep only the first occurrence of each unique line. Duplicates are identified after any whitespace trimming, so ' hello ' and 'hello' are treated as the same line when trimming is enabled.
Can I sort comma-separated values?
This tool sorts line by line: one item per line. If you have comma-separated values, paste each value on its own line first (use a find-and-replace tool to convert commas to line breaks), then sort.
Does the output keep a trailing newline?
Yes. If your list ends with a line break, the sorted output ends with one too, so it pastes back into a file unchanged. The final line break never adds an empty line to the sort.

Last reviewed September 30, 2026

Other pages for this tool

Related tools

Find & replace
Find and replace text with plain search or regular expressions. Supports case-sensitive and whole-word matching.
Text diff
Compare two texts in word, side-by-side, or git-style views. The word and side-by-side views highlight changed words.
Case converter
Convert text between camelCase, snake_case, kebab-case, PascalCase and more.
CSV ↔ JSON
Convert CSV to JSON and JSON back to CSV. Handles quoted fields and downloads.