← All nodes
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

Settings

SettingTypeRequiredDefault or hint
Text columnselect—Text
Generate New Columncheckbox—false
New Column Nametext—Default: <column> Result
Insert Afterselect—After the column
When a value cannot be convertedselect—stop

Example

Remove Extra Spaces: an example

    Text arriving
    Text
    This sentence has too many spaces. Second line here.
    The text after this node
    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.

    Others in Unstructured Text