Skip to main content Skip to complementary content


Removes excess leading or trailing white space.

If there are multiple spaces between words, they are reduced to one space. Any white space non-blank characters are removed.


Input string.


Expression Result
normalizeSpace(" Hello World! ") "Hello World!"

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!