Runs locally in your browser
Remove Extra Spaces
Collapse extra spaces, trim edges, and clean text pasted from Word or PDFs. Whitespace cleanup runs entirely in your browser.
Paste copy that picked up double spaces, stray tabs, or wrapping from a PDF. This cleaner targets whitespace, not duplicate rows.
Trim, collapse, and line-break options apply instantly in this tab with no upload.
How to use
- Paste the messy text.
- Toggle trim ends, collapse spaces, and whether to keep line breaks.
- Copy the cleaned result.
How it works
Collapse turns runs of spaces and tabs into a single space. Trim drops whitespace at the start and end of the block, or of each line if breaks are kept.
Preserve breaks keeps paragraphs intact while still tightening spaces inside each line. Turn it off to squash the whole paste into one line.
Examples
Word paste
A paragraph copied from Word with double spaces after periods collapses to single spaces.
PDF wrap
A line-wrapped PDF extract can keep breaks while each line loses leading and trailing padding.
FAQ
Are tabs removed?
When collapse is on, tabs become part of the whitespace that shrinks to one space.
Can I keep paragraph structure?
Yes. Turn on preserve breaks so only spaces inside each line change.
Does this delete duplicate lines?
No. Use the duplicate-lines tool for unique rows.
Is the paste uploaded?
No. Cleanup stays in this browser tab.
Related tools
- Remove Duplicate LinesRemove duplicate lines from lists, logs, and exports. Keep the first or last match, optionally sort, and copy a clean list locally.
- Case ConverterSwitch headlines and identifiers between uppercase, lowercase, title case, camelCase, PascalCase, snake_case, and kebab-case without uploading.
- Word CounterCount words, characters, sentences and paragraphs instantly.
- Character CounterCount characters with and without spaces for Twitter bios, SMS captions, meta descriptions, and form limits. Counting runs in your browser.
- Slug GeneratorTurn a page title into a URL slug: lowercase, accents stripped, words joined with hyphens. The conversion stays in your browser.