Quecko Logo

Free tool • Runs in your browser

Remove extra spaces

Clean up text by removing double spaces, leading and trailing spaces, and blank lines.

Loading tool...

Quick answer

Text copied from PDFs and emails often has stray spaces and line gaps. This tool collapses repeated spaces and tabs to one space, trims each line and can remove empty lines.

How to use it

  1. Paste the messy text.
  2. Choose what to clean.
  3. Copy the cleaned result.

Example

Input
  Too    many   spaces  
Output
Too many spaces

Common errors and how to fix them

My code indentation disappeared
Turn off trimming and collapsing when indentation matters.

Frequently asked questions

How do I remove extra spaces from text online?

Paste your text here, choose what to clean, and copy the result.

How do I remove extra spaces in Microsoft Word?

Open Find and Replace, search for two spaces, replace them with one, and repeat until no matches remain.

How do I remove extra spaces in Excel?

Use =TRIM(A1). It removes leading and trailing spaces and reduces repeated spaces between words to one.

What is the shortcut for removing spaces in Excel?

Press Ctrl+H, enter a space in Find what, leave Replace with empty, and replace. This removes all spaces, so use TRIM to keep single spaces.

How do I remove extra spaces in Google Docs?

Open Edit, then Find and replace. Search for two spaces and replace them with one until no matches remain.

How do I remove extra space between lines in Word?

Select the text, open the Line and Paragraph Spacing menu on the Home tab, and choose single spacing.

How do I remove extra space between paragraphs in Word?

Select the paragraphs, open the Paragraph settings, and set the spacing before and after to 0.

Why does text from a PDF have so many spaces?

PDFs store text by position, so copying can add spaces and line breaks. This tool helps clean them up.

Will it remove my blank lines?

Only if you turn on that option. You can keep your paragraph breaks by leaving it off.

Is my text uploaded?

No. Cleaning happens in your browser and your text is not sent to Quecko.

More text tools

Need something built for your business?

Quecko designs and builds AI, Web3 and custom software products.

Start a Project