Tabs render at different widths in different editors, so code and tables that look aligned in one place fall apart in another.
Replace Tabs With Spaces converts each tab to a set number of spaces you choose, so the layout looks the same everywhere.
How to use Replace Tabs with Spaces
- Set how many spaces each tab should become.
- Paste tab-indented text such as code or a table.
- Copy the space-indented result that now renders consistently.
Use cases
- Converting tab indentation to spaces for a style guide that bans tabs.
- Making a pasted table line up the same in any editor.
- Preparing code for a tool that expects spaces, not tabs.
Good to know
Replace Tabs With Spaces expands every tab into the number of spaces you set, from one to sixteen, with four as a common default. Because the width is fixed in spaces, the result no longer depends on each editor tab-stop setting. Use the remove-tabs tool if you would rather delete tabs entirely.
Frequently asked questions
How many spaces should I use per tab?
Two and four are the most common widths. Pick the value your project or style guide expects.
Does it convert spaces back into tabs?
No. This tool goes from tabs to spaces. The replace-spaces-with-tabs tool does the reverse.
Will it change spaces that are already in the text?
No. Only tab characters are expanded; existing spaces are left untouched.