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, by shortest or longest line, and random shuffle. Combine with duplicate removal and whitespace trimming. All processing runs locally in your browser.

Input

Sorted output

SORT OPTIONS

How it works

The input is split on newlines to produce an array of lines. Trim whitespace applies String.trim() to each line. Remove duplicates uses a Set keyed on the lowercased line to preserve the first occurrence. Sort modes use Array.sort() with localeCompare() for alphabetical ordering or a length comparison 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?
A–Z (alphabetical ascending), Z–A (alphabetical descending), 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.
Is my data sent to a server?
All text processing runs locally in your browser. No data is sent to our servers.

Related tools

Find & replace
Find and replace text with plain search or regular expressions. Supports case-sensitive and whole-word matching.
Text diff
Inline or side-by-side comparison. Handles plain text and structured diffs.
Word counter
Count words, characters, sentences, and paragraphs. All processing runs in your browser.
Case converter
Convert text between camelCase, snake_case, kebab-case, PascalCase and more.