Text Cleaner
About this tool
Clean pasted content from the web, PDFs, or spreadsheets with configurable options: trim each line, merge repeated spaces, delete empty lines, strip HTML markup, normalize CRLF/LF endings, and apply custom find/replace including regex.
How to use
- Trim leading and trailing whitespace per line
- Collapse multiple spaces or tabs into one
- Remove blank lines or HTML tags
- Normalize Windows/Mac/Unix line endings
- Find and replace with plain text or regex
- Paste or import: Add messy text or load a local .txt file.
- Select cleaners: Check the operations you need—options stack together.
- Apply and copy: Run Apply, review the output, then copy or download.
Examples
- Strip HTML when copying articles from websites
- Normalize CSV exports with inconsistent spacing
- Remove empty lines from log dumps before diffing
- Bulk replace smart quotes or non-breaking spaces
Limitations
- Regex find/replace uses JavaScript RegExp syntax
- HTML stripping is tag-based; removal does not replace a full HTML security review
- Very large files may take noticeable time
- The entered text and imported text files are processed directly in your browser and are not sent to a server.
FAQ
- Can I combine multiple cleaning options?
- Yes. Enabled options run in sequence on each Apply click.
- Does regex replace support capture groups?
- Yes. Use standard JavaScript replacement patterns like $1 for groups.
- Will HTML stripping keep link text?
- Tags are removed; inner text content is preserved unless you also strip specific patterns.