Remove All Spaces in a File using Notepad++

If you do not want any spaces in a file using Notepad++ you can make use of the Replace option with Regular Expression as follows,

  1. Open File in Notepad++
  2. Now go to Menu: Search -> Replace... (keyboard shortcut: Ctrl + H)
  3. Now in "Find What" add regular expression \s
  4. Keep the "Replace With" option blank.
  5. Click on Replace All.
  6. All spaces in the file will be removed.
Replace all Spaces using Notepad++

This is not an AI-generated article but is demonstrated by a human with Notepad++ running on Windows 11 PC.

Please support independent contributors like Code2care by donating a coffee.

Buy me a coffee!

Buy Code2care a Coffee!

Comments & Discussion

Facing issues? Have questions? Post them here! We're happy to help!