Remove extra spaces
Trim lines, collapse repeated spaces and remove blank lines.
Bookmark this page
Keep this page handy for next time.
- On a computer
- Press Ctrl + D, or Command + D on a Mac.
- On a phone or tablet
- Open your browser's menu or Share menu and look for Add Bookmark, Bookmark or Add to favourites.
A bookmark saves the page link. Save any tool results separately.
How to use this tool
- Select the whitespace operations to apply.
- Line trimming does not join separate lines.
- Copy the cleaned result, which updates as you type.
Things to know
- Processing happens on your device. Check the result before replacing your original data.
- Each text input accepts up to 5 MiB. Output is limited to 25 MiB and combined text settings to 1 MiB.
- Line-based modes accept up to 100,000 lines, including a trailing empty line.
You might also need
More in text & listsInvisible character generator
Copy blank spaces or zero-width characters with their exact Unicode code point and character count.
Remove duplicate lines
Remove repeated lines while retaining their original order.
Unicode inspector and normalisation
Reveal code points, invisible characters and Unicode normalisation differences.
Text repeater
Repeat text a chosen number of times, with line breaks, spaces or your own separator.
URL slug generator
Create URL-friendly slugs from titles while choosing ASCII or Unicode output.
Line filter
Keep or remove lines containing text, matching a pattern or meeting a length.
Prefix and suffix editor
Add or remove literal prefixes and suffixes on every line.
Text diff
Compare two texts and produce a readable unified line diff.
Text-column extractor
Extract numbered columns from delimited lines without damaging quoted fields.