↹ Tab / Space Converter

Convert tabs to spaces or spaces to tabs instantly

🐦 Twitter 📘 Facebook 🔗 Copy Link
Tabs: 0 Spaces: 0 Lines: 0
Output

Frequently Asked Questions

How do I convert tabs to spaces?

Paste your code, set the tab size, and click "Tabs → Spaces". Each tab will be replaced with the specified number of spaces.

What is the standard tab size?

Common tab sizes: 2 spaces (Ruby, Go), 4 spaces (Python, Java, JS, C++), 8 spaces (Linux kernel). Default is 4.

Can I convert spaces back to tabs?

Yes, click "Spaces → Tabs" to convert leading spaces into tab characters based on your chosen indent size.

What does 'Show Whitespace' do?

It visualizes invisible characters: tabs appear as "→" and spaces as "·" so you can see exact whitespace in your code.

Is my code sent to a server?

No. All processing happens locally in your browser. Your code never leaves your device.

Does it preserve non-leading whitespace?

Spaces → Tabs only converts leading whitespace at the start of each line. Interior spaces in your code are preserved.

Can I use this for large files?

Yes, the tool handles large files efficiently since all processing is done locally in your browser with no size limits.

What's the difference between hard tabs and soft tabs?

Hard tabs are actual tab characters (\t). Soft tabs are spaces that visually indent like tabs. This tool converts between the two styles.

Copied!