Remove Spaces
How This Converter Works
Applies the checked whitespace options in order: collapse repeated literal spaces to one or two, remove blank lines, then optionally remove all whitespace characters.
Formula or rule
Single-space option: replace / +(?= )/g with empty text. Double-space option: replace the same pattern with one space. Empty-line option uses /^\s*[\r\n]/gm. Remove-all option uses /\s+/g.
Example
- Input
- a b c (default single-space option enabled)
- Calculation
- The repeated literal spaces are reduced to one space between each pair of letters.
- Result
- a b c