Text/Clean

A text cleanup tool that stacks several cleanup steps and runs them in one go

TextClean is a free web tool that brings together common text cleanup tasks: trimming spaces, removing blank and duplicate lines, sorting, find and replace, stripping HTML tags and emoji, converting between full-width and half-width characters, and repairing line breaks in text copied from PDFs. Instead of running each task separately, you build a pipeline of the steps you need in order, and the moment you paste your input, every step is applied in sequence and the result appears. Pipelines you use often can be saved as recipes and loaded again with one click. All processing happens inside your browser, and the text you enter is never sent to any server.

Key features

01

A pipeline you build step by step

Stack any of the 19 cleanup operations in the order you want. Each step can be switched on or off, moved or removed, and every step shows its line count after processing, so you can see at a glance which step changed what.

02

Results as you type

The whole pipeline reruns the moment you paste text or change an option. Even tens of thousands of lines are processed instantly in the browser.

03

Save and share recipes

Give a pipeline you use often a name and save it in your browser. A share link contains only the step configuration, never your text.

04

PDF line break repair

Rejoins the mid-sentence line breaks you get when copying from a PDF while keeping paragraph breaks. It also repairs English words split with a hyphen at the end of a line.

05

Built for multilingual text

Language-specific details are handled, such as Korean alphabetical order (ganada) sorting, joining Chinese, Japanese and Korean lines, full-width/half-width conversion and Unicode NFC normalization.

06

Nothing sent to a server

All processing is done by JavaScript in your browser. The text you enter is never stored or transmitted; only your recipe configurations and display settings are saved.

How to use

  1. Paste the text you want to clean up into the input box.
  2. Click an operation in the list to add it to the bottom of the pipeline, or load a built-in recipe from the recipe menu.
  3. Adjust each step's options, reorder steps with the arrows, or switch a step off temporarily to compare results.
  4. Copy the result or save it as a .txt file. To refine the result further, click 'Use output as input'.
  5. If you do the same cleanup often, click 'Save' to keep it as a recipe and load it in one click next time.

Built-in recipes

RecipesFix PDF line breaks
  1. Clean invisible characters and quotes
  2. Repair PDF line breaks
  3. Collapse repeated spaces and tabs
  4. Trim leading and trailing spaces
Open the tool with this recipe
RecipesClean a list (spaces, blank lines, duplicates, sort)
  1. Trim leading and trailing spaces
  2. Remove blank lines
  3. Remove duplicate lines
  4. Sort
Open the tool with this recipe
RecipesHTML → plain text
  1. Strip HTML tags
  2. Clean invisible characters and quotes
  3. Trim leading and trailing spaces
  4. Remove blank lines
  5. Collapse repeated spaces and tabs
Open the tool with this recipe
RecipesList → SQL IN values
  1. Trim leading and trailing spaces
  2. Remove blank lines
  3. Remove duplicate lines
  4. Add text to the start and end of lines
  5. Remove line breaks (join into one line)
Open the tool with this recipe
RecipesRemove emoji and tidy up
  1. Remove emoji
  2. Clean invisible characters and quotes
  3. Collapse repeated spaces and tabs
  4. Trim leading and trailing spaces
  5. Remove blank lines
Open the tool with this recipe

Frequently asked questions

Is the text I enter stored on a server?

No. All processing happens only inside the browser you are using, and your text is not sent anywhere. The only things kept in browser storage (localStorage) are your pipeline configuration, saved recipes and display theme; the input text itself is never saved.

Does the order of steps affect the result?

Yes. The pipeline is applied from top to bottom, one step at a time. For example, if you put 'Trim leading and trailing spaces' before 'Remove duplicate lines', lines that differ only in surrounding spaces are treated as the same line. Numbering usually belongs after sorting, and removing line breaks usually comes last.

What regex syntax is used?

The browser's JavaScript regular expression syntax. Find and replace runs with the global (g) and multiline (m) flags, so ^ and $ match the start and end of each line. In the replacement you can refer to capture groups with $1, $2. If a regex is invalid, that step shows an error and is skipped.

PDF line break repair merges or splits paragraphs incorrectly.

PDF text carries no paragraph information, so paragraphs are estimated from line lengths and punctuation. If paragraphs get merged, turn on 'Treat short lines ending in punctuation as paragraph ends'; if they are split too finely, turn it off. If headers or page numbers are mixed in, add a line filter in an earlier step to remove them first.

Does case conversion only offer the basics?

It offers four modes only: uppercase, lowercase, sentence case and capitalize each word. Programming notations such as camelCase or snake_case are outside the scope of this tool.

How much text can it handle?

It depends on your device, but a typical PC processes hundreds of thousands of lines within a few seconds. With very large input, the result updates shortly after you stop typing.

Can I use my saved recipes on another device?

Recipes are saved only in the current browser. To use one on another device, copy its address with 'Share link' and open it on that device. The link contains only the step configuration.