Tab ↔ Spaces Converter

Convert between tabs and spaces in your code. Set custom tab width. Preserve indentation structure.

Frequently Asked Questions

What is the default tab width?

The default is 4 spaces per tab, which is the most common convention. You can change it to 2, 3, or 8 spaces.

Will it only convert leading whitespace?

You can choose to convert all occurrences or only leading indentation whitespace.

Which should I use — tabs or spaces?

It depends on your team's coding standards. Spaces are more common in web development, while tabs are preferred in some other languages.

Does it handle mixed indentation?

Yes — the tool normalizes mixed tab/space indentation to your chosen format.