How to use remove extra spaces
Trim horizontal whitespace and collapse runs of spaces while preserving line breaks.
Enter or paste your text, adjust any available options, then copy the result you need.
What to check before using the result
Indentation will be changed, so avoid using this on indentation-sensitive source code.