Convert tabs to spaces or spaces to tabs instantly
Paste your code, set the tab size, and click "Tabs → Spaces". Each tab will be replaced with the specified number of spaces.
Common tab sizes: 2 spaces (Ruby, Go), 4 spaces (Python, Java, JS, C++), 8 spaces (Linux kernel). Default is 4.
Yes, click "Spaces → Tabs" to convert leading spaces into tab characters based on your chosen indent size.
It visualizes invisible characters: tabs appear as "→" and spaces as "·" so you can see exact whitespace in your code.
No. All processing happens locally in your browser. Your code never leaves your device.
Spaces → Tabs only converts leading whitespace at the start of each line. Interior spaces in your code are preserved.
Yes, the tool handles large files efficiently since all processing is done locally in your browser with no size limits.
Hard tabs are actual tab characters (\t). Soft tabs are spaces that visually indent like tabs. This tool converts between the two styles.