Remove Extra Spaces
Remove doubled spaces, stray spaces at the start and end of lines, and blank lines. Choose the clean-up steps you want.
Questo contenuto è in inglese.
Esempi svolti
Tidying text pasted into a form
Hello there and welcome
Hello there and welcome
Leading and trailing spaces are removed and runs of spaces are reduced to one, which keeps a form field neat.
Removing blank lines from a list
One, a blank line, another blank line, then Two, with blank line removal turned on
One Two
Blank line removal suits one continuous list, but should stay off for text that uses blank lines to separate paragraphs.
Informazioni su Remove Extra Spaces
Extra spaces are easy to pick up and hard to notice. A double space after a full stop, a stray space at the end of a line or a run of blank lines can come from a word processor, a web form or a copy from a spreadsheet. They make text look untidy and can throw off a word count or a comparison. Finding them by hand is slow, especially in a long document or a list of entries. This tool cleans up the spacing for you in one step and shows how many characters were removed.
You choose which clean-up steps to apply. Reduce runs of spaces turns any run of two or more spaces into a single space, trim spaces at the start and end of each line removes the gaps at the edges, and remove blank lines takes out lines that are empty or contain only spaces. The steps work line by line, so the line breaks in your text stay where they are unless you choose to remove blank lines. The summary above the result shows the character count before and after, so you can check the change.
Come usare Remove Extra Spaces
- Paste the text with uneven spacing into the box.
- Leave the first two options on, or change them to suit your text.
- Turn on remove blank lines if you want one continuous list.
- Copy the cleaned result from the box below.
Usi comuni
- Tidying text copied from a web page or word processor
- Cleaning a list of names or addresses before importing it
- Removing stray spaces before comparing two versions of a document
- Fixing the spacing in a text message or caption
Domande frequenti
How do I remove extra spaces from text?
Paste your text into the box. By default the tool reduces any run of two or more spaces to a single space and removes spaces at the start and end of each line. The cleaned text appears in the result box straight away. If you also want blank lines gone, turn on Remove blank lines, then copy the result.
Will removing spaces change the words in my text?
No. The tool only changes spacing. It does not alter letters, numbers, punctuation or capital letters, and single spaces between words are kept. A line that contained only spaces is either tidied to an empty line or removed, depending on the blank line option, so the wording of your text stays exactly as it was.
What is the difference between trimming and collapsing spaces?
Collapsing reduces a run of spaces in the middle of a line to one space, so two spaces between words become one. Trimming removes spaces at the very start and end of each line altogether. Use collapsing to tidy gaps inside sentences and trimming to clean up the edges of lines, such as the spaces left behind after copying from a table.
Why would I keep indentation?
Indentation helps code, notes and lists that use it to show structure. Turn off trimming to keep the spaces at the start of each line. Collapsing still reduces a longer run of indentation to one space, so the indent becomes smaller but stays visible. If indentation matters for your text, keep trimming off and check the result carefully.
Can I use this to clean up a list before importing it?
Yes. Paste the list with one entry on each line, turn on trimming and remove blank lines, and you get a clean list with no stray spaces or empty rows. Many import tools stop at extra blank rows or spaces around names, so a quick clean-up first can prevent errors and save time when you move the list somewhere else.