Trims and collapses extra whitespace from any block of text.
Input
This has extra spaces.
Output
This has extra spaces.
Input
Line one Line two
Output
Line one Line two
Text copied out of a PDF a web page or an old email often drags along extra whitespace that wasn't visible where it came from. This tool collapses repeated spaces and tabs down to a single space and optionally trims the start and end of every line so the result looks like it was typed cleanly from scratch.
The second part deals with vertical whitespace rather than horizontal. Paste something from a formatted document and you'll often get three or four blank lines where there should be one, and the collapse blank lines option shrinks any run of empty lines down to a single blank line, which keeps paragraph breaks without the extra padding.
This one gets used a lot as a cleanup step before something else, pasting a job description into a form field, prepping a chunk of scraped text for a spreadsheet cell, or just making a block of pasted text readable again before sending it somewhere. Running a paste through it before it goes into an email or document catches formatting problems early.
Both toggles are on by default since that's what most people want most of the time, but turning trimming off keeps intentional indentation if that's something your text actually relies on, like a code snippet or a block quote. Everything runs in your browser as you type, so there's no button to click and nothing gets uploaded anywhere.
More Text Tools