Sort, deduplicate, shuffle, and filter lines of text. Free online line manipulation tool with regex filter, custom prefix/suffix, JSON/CSV/SQL output, and live stats.
A multi-purpose line manipulation tool that sorts, deduplicates, reverses, shuffles, and filters lines of text in real time. Apply operations in sequence — trim, drop empty lines, dedupe with case-sensitivity choice, sort alphabetically or numerically or by length, filter with substring or regex, then optionally wrap each line with a prefix or suffix and join with any separator. One-click presets handle the most common workflows: SQL IN clause, JSON array, CSV row, or simple "clean & dedupe and sort". Shows input vs output line counts, removed empties, removed duplicates, and reduction percentage. Handles 50,000+ lines with debounced processing — runs entirely in your browser, no upload.
'apple', 'banana', 'cherry' — drop into a SQL query inside parentheses.The regex filter accepts standard JavaScript regular expressions and applies them line by line. Common recipes: ^\\d+ keeps only lines starting with a digit, @example\\.com$ keeps lines ending with a specific domain, (?i)error case-insensitively keeps any line containing "error". Pair the regex filter with "does not contain" mode to invert — for example, drop every comment line in a config file with regex ^#. Invalid regex shows an inline error rather than crashing the tool.
Excel can sort and dedupe a column, but every preset operation here is a separate Excel formula or a multi-step UI dance. For one-off lists — server hostnames, email addresses you copy-pasted from a Slack message, slugs you need to wrap as a SQL IN clause, a list of duplicate row IDs you need to investigate — pasting into a single web tool is faster than opening Excel and faster than writing a Python one-liner. The presets cover 95% of what people actually do; the toggle panel covers the rest.
The numerical sort modes look for the first numeric value in each line — so "Item 12 — apples" sorts after "Item 2 — pears". If a line has no number it falls to the end (ascending) or start (descending). For strict alphabetical sort regardless of numbers, use the A→Z mode instead.
Keep first: when a line repeats, keep the first occurrence and drop the rest. Keep last: keep the last occurrence. Unique only: drop every line that appears more than once, keeping just the lines that appear exactly once. Show duplicates: invert the filter — display only lines that repeat, useful for finding the duplicate offenders rather than removing them.
On. "Apple" and "apple" are treated as different lines unless you toggle case sensitivity off, in which case they are deduplicated together (the kept version preserves the casing of whichever copy met the keep-first / keep-last rule).
Yes — by line length (ascending or descending), random shuffle (Fisher-Yates), or simple reverse. Locale-aware sort uses your browser locale, so accented characters sort correctly for European languages (é next to e instead of after z).
It comfortably handles 50,000 lines on a typical laptop, with input debounced to keep typing responsive. For lists over 100k lines, processing may take a second or two on each toggle change. Everything runs in your browser, so no server limits apply.
Related: remove duplicate lines, sort lines, dedupe lines, unique lines, sort text, shuffle lines, reverse lines, sort alphabetically, sort numerically, remove empty lines, list to sql in clause, list to json array, csv row generator, line filter, sort and deduplicate, text line tool, unique line extractor