Remove Extra Spaces
Fix text pasted from PDFs, emails and spreadsheets by collapsing runs of spaces and tabs and removing leading/trailing whitespace on each line. Everything stays in the browser.
How it works
- Paste the text that contains extra spacing.
- Choose Collapse spaces or Trim line edges.
- Copy or download the cleaned text.
Supported input and limits
| Input | Plain text |
|---|---|
| Output | Cleaned text |
| Size limit | Not applicable |
| Offline | Verified after the page and its script are cached |
- Collapsing spaces is not safe for code indentation.
- Line endings are normalized to LF.
- Maximum input is 1 MiB.
Privacy
This tool runs entirely in your browser. Your input is not uploaded, logged or stored by TinkerFern. Read the privacy policy.
Frequently asked questions
Does collapsing spaces affect line breaks?
No. Spaces and tabs within each line are collapsed to one space, but line breaks are preserved. Blank lines remain unless you remove them separately.
What is the difference between collapse and trim?
Collapse reduces repeated spaces and tabs anywhere in a line. Trim removes only leading and trailing whitespace, leaving interior spacing untouched.
Are non-breaking spaces removed?
The collapse operation targets regular spaces and tabs. Non-breaking spaces are preserved to avoid breaking intentional formatting; replace them explicitly if needed.
Can I clean code with this?
Be careful. Collapsing spaces can destroy indentation and string literals. Use it on prose or plain lists, not source code.
Is the text uploaded?
No. Cleaning is local; no text is stored or sent anywhere.
Related tools
Continue with a task that often follows this one.
Text Toolkit
Change case, clean up, sort and count lines and characters.
Case Converter
Convert text to uppercase, lowercase, title case or sentence case.
Word Counter & Character Counter
Count words, characters, sentences and reading time as you type.
Text Diff Checker
Compare two texts and see added, removed and unchanged lines.