Unstructured Text
Remove Extra Spaces
Replace runs of spaces and tabs with a single space and trim the start and end of every line.
When to use it
Typical uses: Cleaning product names or addresses before importing them into a database; Removing the double space after full stops in older documents; Tidying text pasted from spreadsheets that contains tab characters.
In a pipeline
Text InputRemove Extra SpacesText Output
Settings
| Setting | Type | Required | Default or hint |
|---|---|---|---|
| Text column | select | — | Text |
| Generate New Column | checkbox | — | false |
| New Column Name | text | — | Default: <column> Result |
| Insert After | select | — | After the column |
| When a value cannot be converted | select | — | stop |
Example
Remove Extra Spaces: an example
| Text |
|---|
| This sentence has too many spaces. Second line here. |
| Text |
|---|
| This sentence has too many spaces. Second line here. |
Worth knowing
- Does this remove line breaks as well? No. It only changes spaces and tabs within each line. Your line breaks stay as they are.
- What is a non-breaking space? A non-breaking space looks like a normal space but stops a line from wrapping at that point. Web pages often use it, and it can cause problems when text is compared or imported. This tool converts it to a normal space.
- Can I remove all spaces completely? This tool keeps one space between words so that text stays readable. To remove characters entirely, try Remove Special Characters or Find and Replace.
- Works on any text column, not only Text Input's: pick it under Text column. Tick Generate New Column to keep the original next to the result.