Text Line Tools

Updated July 2026

Paste a list and clean it up in seconds — sort it alphabetically or numerically, remove duplicates, reverse or shuffle the order, trim whitespace, delete blank lines and switch case. Everything runs privately in your browser.

Paste a list and instantly sort it alphabetically or numerically, remove duplicates, reverse or shuffle the order, trim whitespace and delete blank lines — all in your browser.
0 lines
0 lines
Input lines
0
Output lines
0

How these text line tools work

Each tool treats your text as a list of lines, split on line breaks. The transforms fall into two groups. Reordering operations — sort, reverse and shuffle — change the order of the lines without changing their contents. Clean-up operations — trim, remove blank lines, remove duplicates and change case — change or drop lines. You pick one reorder option and any combination of clean-up checkboxes, and the result updates live.

Order matters, so the tool applies clean-up steps in a sensible sequence: it trims each line first, then changes case, then removes blank lines, then removes duplicates, and finally reorders what remains. That way trimming exposes hidden blanks and duplicates before they are dropped, and the chosen sort is applied to the already-cleaned list.

The key distinction to understand is text sorting versus numeric sorting. A text (alphabetical) sort compares lines character by character. Numbers written as text therefore sort by their first digit, so 10 comes before 2. A numeric sort instead reads each line as a number and orders by value.

Worked example: the list banana / apple / banana / cherry with Trim each line, Remove duplicates and Sort A→Z enabled becomes apple / banana / cherry — three lines, with the repeated "banana" dropped. And the numbers 2 / 10 / 1 sort as 1 / 2 / 10 under Sort numerically, but as 1 / 10 / 2 under Sort A→Z.
OperationWhat it does
Sort A→ZOrders lines alphabetically (ascending), comparing text character by character.
Sort Z→AOrders lines in reverse alphabetical order (descending).
Sort numericallyReads each line as a number and orders by value, so 2 comes before 10.
ReverseFlips the existing order so the last line becomes the first.
ShuffleRandomises the order using a Fisher–Yates shuffle.
Remove duplicatesKeeps the first occurrence of each line and drops later exact repeats.
Remove blank linesDeletes empty lines and lines containing only whitespace.
Trim each lineStrips leading and trailing whitespace from every line.
lowercase / UPPERCASEConverts every line to lower or upper case.
Case-insensitive sortIgnores capitalisation when sorting, so "Apple" and "apple" group together.

Reference note: lines are split on both Windows (CRLF) and Unix (LF) line endings, and the result uses newline (LF) separators. All processing happens locally in your browser.

Frequently asked questions

How do I sort a list alphabetically?
Paste your list and select Sort A→Z (or Sort Z→A for reverse). The lines are ordered alphabetically and shown instantly. Enable the case-insensitive option to group "apple" and "Apple" together regardless of capitalisation.
How do I remove duplicate lines?
Tick Remove duplicates. The tool keeps the first occurrence of each line and drops later exact repeats. Turn on Trim each line first so lines differing only by trailing spaces still count as duplicates.
How do I sort numbers correctly?
Use Sort numerically rather than Sort A→Z. A text sort compares characters, so 10 would land before 2. Numeric sort reads each line as a number, giving the correct order 2, 9, 10, 100.
How do I remove blank lines?
Enable Remove blank lines. Any empty line, or one containing only whitespace, is deleted. Pair it with Trim each line to also clean up lines padded with spaces or tabs.
How do I randomize or shuffle a list?
Turn on Shuffle to put the lines in a random order, reshuffled with the Reshuffle button. Shuffle and sort are mutually exclusive because they impose opposite kinds of ordering.
Is my text uploaded anywhere?
No. Everything runs locally in your browser. Your text is never sent to a server, stored or logged — closing or refreshing the page clears it completely.
⚡ Sort Text Lines — by larely ↗

Related tools

JSON to CSV Converter

Convert a JSON array to CSV and CSV back to JSON.

URL Encoder / Decoder

Percent-encode and decode text, and parse a URL into its parts.

Word Frequency Counter

Find the most-used words and keyword density in any text.

Image to Base64 Converter

Encode an image to a Base64 data URI for HTML or CSS, in your browser.

What Is My Browser?

Detect your browser, OS, screen resolution, window size and more.

Chmod Calculator

Convert file permissions between octal , symbolic and the chmod command.

Password Strength Checker

Estimate password entropy and crack time, entirely in your browser.

UTM Link Builder

Build campaign tracking URLs with UTM parameters for Google Analytics.

Meta Tag Generator

Generate HTML meta, Open Graph and Twitter Card tags for any page.

HTTP Status Codes

Searchable reference of every HTTP status code and what it means.

Data Transfer Rate Converter

Convert between Mbps, MB/s, Gbps and more, with the bits-vs-bytes rule.

ASCII Table

Full ASCII table with decimal, hex, octal, binary and character lookup.

Browse all 251 free tools →