Remove Extra Spaces Trim leading/trailing whitespaces from lines. Remove extra spaces. Remove all spaces. Enter your text here and click the "Remove" button above. Test by click the "Remove" button and watch leading/trailing/extra/all spaces disappear from each line of default text. Privacy of Data: This tool is built-with and functions-in Client Side JavaScripting, so only your computer will see or process your data input/output. Unix Dos.