Skip to content

Text cleaner & line tools. One click, one clean list.

0 lines 0 words 0 chars

Runs entirely on your device, nothing is uploaded anywhere.

sort & order
remove & clean
change case
line numbers & affixes
join & split
Join with
Split by

Split turns each delimiter into a new line. Use \t for tab, \n for newline.

find & replace
§ · written guide

How to use the Text Cleaner & Line Tools

This tool applies one cleanup operation at a time to the text in its editor: sorting, removing duplicates, trimming, changing case, numbering, adding a prefix or suffix, joining, splitting, and find and replace. Most operations work line by line, and every change can be undone. It suits anyone tidying lists, CSV columns, keyword sets or copied text.

Step by step

  1. Paste your text

    Paste or type into Your text. The counters below it show lines, words and characters. Reset brings back the box as it was after your first change: the whole text if you pasted it, but only the first character if you typed it.

  2. Sort and order lines

    Use Sort A→Z or Sort Z→A for alphabetical order that ignores case, Sort numeric to sort by the number each line starts with, Reverse to flip the order, or Shuffle for a random order.

  3. Clean up lines

    Remove duplicates keeps the first copy of each identical line. Remove empty lines drops blank ones, Trim each line strips spaces at both ends, Collapse spaces turns runs of spaces or tabs into one space, and Collapse blank lines leaves at most one blank line in a row.

  4. Change case

    Press UPPER, lower, Title Case or Sentence case. Each works on the whole text, including letters with accents. Title Case and Sentence case lowercase every other letter first, so an acronym such as NASA becomes Nasa or nasa.

  5. Number and wrap lines

    Add line numbers puts 1., 2., 3. at the start of each line, padded so they line up. Type a Prefix, a Suffix or both and press Apply to add them to every line.

  6. Join or split

    Join turns all lines into one, separated by the text in Join with, a single space by default. Split starts a new line at every match of Split by, a comma by default. Type \t for a tab or \n for a new line in either box. Split keeps any space that followed the comma, so run Trim each line afterwards.

  7. Find and replace

    Type in Find… and Replace with…, then press Replace all. Ignore case is on by default. Tick Regex to use a JavaScript regular expression, where $1 in the replacement inserts the first captured group.

  8. Undo, copy or save

    Undo steps back through your last 50 operations and Reset returns to your first text. Copy puts the result on the clipboard, Download .txt saves cleaned-text.txt, and Clear all empties the editor.

Reading the result

  • The counters show lines, words and characters for the current text. An empty editor counts 0 lines, and any text counts at least 1.
  • When an operation changes nothing, the text stays as it is and nothing is added to the undo history. Replace all also shows No matches found when the search text is not there.
  • Sort numeric reads the number at the start of each line, so 10 apples sorts after 9 pears. Lines that do not start with a number go to the end in alphabetical order.

Tips and common mistakes

  • Remove duplicates only removes exact copies, so Apple and apple, or a line with a trailing space, count as different. Run Trim each line and lower first for a stricter cleanup.
  • Operations act on the whole text, not on a selection. To change only part of it, clean that part separately and paste it back.
  • Plain find treats dots, brackets and other symbols literally. Only tick Regex when you mean to use a pattern; an invalid pattern shows an error and changes nothing.
  • Shuffle uses the browser's ordinary random function. It is fine for mixing a list but not for draws that must be provably fair.
  • Clear all also forgets your original text and the undo history, so use Undo or Reset first if you might want something back.

Privacy and limits

Every operation runs in your browser. Your text is not uploaded or saved, and the undo history lives only in the open tab, so closing it clears everything.

Back to the tool

§ 02 · what you can do

One editor, every text chore.

Sort & reorder linesAlphabetical A→Z or Z→A, true numeric sort, reverse, or shuffle, one click each.
Dedupe & cleanRemove duplicate lines, strip empty lines, trim whitespace, and collapse runs of spaces or blank lines.
Change caseUPPERCASE, lowercase, Title Case or Sentence case, Unicode-aware, works on names and accents.
Find & replace with regexPlain or regular-expression search across the whole document, with an optional case-insensitive match.
Number, prefix & suffixAdd padded line numbers, or wrap every line with your own prefix and suffix text.
Join, split & undoJoin lines with any separator, split on any delimiter (incl. \t), then undo up to 50 steps or reset to your original.
§ 04 · faq

Frequently asked questions.

Is the Text Cleaner free?
Yes, completely free for everyone. No sign-up, no account and no usage limits.
Is it private? Is my text uploaded anywhere?
No upload, ever. Every operation runs in your browser on your own device, your text never leaves your computer and nothing is sent to a server.
Does it work offline?
Yes, once the page has loaded, every operation works without a connection, because all the logic runs locally in JavaScript.
How does find & replace with regex work?
Leave the Regex box unchecked for a plain text search, or tick it to use a JavaScript regular expression, capture groups like $1 work in the replacement. Ignore case is on by default; untick it for an exact-case match.
Can I undo an operation I didn't mean to run?
Yes. Undo steps back through your last 50 operations, and Reset restores the very first text you entered this session, so you can experiment freely.
How do I split on a tab or newline?
Type \t in the Split-by box for a tab, or \n for a newline. The same escapes work in the Join-with box, so you can join lines with tabs to build TSV.

Published · Last updated .

Priya sent you a message Online now

Talk to a Developer Now

Share your name and email to reply.

Reply