Tooleux

Text Line Tools

Text (3)

Sort, dedupe, reverse, shuffle, trim, and clean lines of text.

Runs in your browser. Nothing leaves your device.
Sort, dedupe, reverse, trim, and shuffle lines of text. Natural sort, case options. Runs entirely in your browser. Read more Show less

What are line operations?

Line operations are the small transformations applied to a list of lines: sorting alphabetically, removing duplicates, stripping blank lines, trimming whitespace, reversing the order. They come up when working with logs, CSV exports, contact lists, config files, and any text that is really a set of lines.

All operations run in your browser. Nothing is uploaded.

Operations

Seven operations, each toggleable. The application order is fixed and shown in the panel on the right:

  1. Trim whitespace - strip leading and trailing whitespace from each line.
  2. Remove blank lines - drop lines that are empty after trim.
  3. Remove duplicates - keep the first occurrence, drop later ones. Case handling follows the Case setting.
  4. Sort - None, A to Z, Z to A, Natural, or Natural descending. Natural sort orders item2 before item10.
  5. Reverse - flip the line order.
  6. Shuffle - random permutation, deterministic per input.

How to use

Paste your text in the left box. Toggle operations on the right. The result updates live.

Operations run in a fixed order regardless of which checkbox you click first. That order is the numbered list in the panel. If you want to dedupe while keeping the last occurrence instead of the first, reverse first, then dedupe.

FAQ

What line endings does it handle?

LF (Unix), CRLF (Windows), and CR (classic Mac). Input is normalized to LF on the way in and LF on the way out.

Is the shuffle stable?

Yes, but with a caveat. The shuffle is deterministic per input: the same text always produces the same shuffled order. Change one character and it re-rolls completely. This means a shared link reproduces the exact same output, and auto-update does not re-shuffle on every keystroke. It also means the shuffle is not cryptographic - do not use it where an adversary could infer the output from the input.

Do blank-line operations consider whitespace-only lines blank?

Yes, if Trim is enabled first. Trim runs before the other operations, so a line of spaces becomes empty and is removed by Remove blank lines. If Trim is disabled, a line of spaces is not treated as blank.

Does "Remove duplicates" keep the first or the last?

The first occurrence. There is no built-in way to keep the last, because operations run in a fixed order and Reverse is later in that order than Dedupe. To keep the last occurrence, reverse the input text manually before pasting it, run the tool, then reverse the output manually.

Does case sensitivity affect sorting?

Yes. Case-sensitive sorting (default) uses character codes: uppercase letters sort before lowercase, so Banana comes before apple. Case-insensitive sorting treats Banana and banana as equal and keeps their relative order. The same setting also affects dedupe.

Is my text sent anywhere?

No. Everything runs in your browser.

Command line equivalent
# Sort lines
sort input.txt

# Sort descending
sort -r input.txt

# Natural sort (numbers aware)
sort -V input.txt

# Remove duplicates (requires sorted input)
sort input.txt | uniq

# Remove duplicates, preserving first occurrence
awk '!seen[$0]++' input.txt

# Remove blank lines
grep -v '^[[:space:]]*$' input.txt

# Trim whitespace around every line
sed 's/^[[:space:]]*//;s/[[:space:]]*$//' input.txt

# Reverse line order
tac input.txt

# Shuffle lines (nondeterministic, unlike this tool)
shuf input.txt
Loads a test value into the form
Input
Output