Multiple ways to Convert tabs with spaces in Notepad++


Example 1:

In order to convert tabs with spaces in Notepad++, go to Menu: Edit -> Blank Operations and select TAB to Spaces

Notepad++ Tab to Spaces


Example 2:

If you want to convert each tab in the file with single spaces, you can make use of the Find and Replace option with Search Mode Extended as follows,

  1. Open File in Notepad++
  2. Press Control + F to Open Find and move to Replace Tab,
  3. Make sure to select Search Mode as Extended,
  4. Add, Find What: \t
  5. Add, Replace With:    (a single space, or multiple if you want it that way!)
  6. Click on Replac All
Replace tab with single space
Replace tab with single space


Example 3:

If you want to replace TAB by space (4 spaces or more) as default permanent behavior, then you can do the changes in Preferences as follows,

  1. Go to Menu: Settings,
  2. Now select Preferences...,
  3. Select the Language tab,
  4. Now under tab settings check the Replace by space checkbox.
Replace tab by space
Advertisements
Try Out Code2care Dev Tools:

Advertisements

Advertisements
Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and software developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include learnings, tutorials, trouble-shooting steps, video tutorials, code snippets, how-to, blogs, articles, etc.

🎉 We are celebrating the 10th years of Code2care! Thank you for all your support!

We strongly support Gender Equality & Diversity.