This tool converts tab characters in your code into spaces. It provides flexible options to suit your needs: • Convert all tabs into a fixed number of spaces. • Convert only leading (indentation) tabs to spaces (preserving inline tabs). • Replace tabs with a custom replacement string. Simply paste your code, specify your settings, and choose the desired conversion mode.
Examples:
Convert All Tabs
Every tab in the code is converted to spaces.
Before:
function example() { // This line is indented with a tab. console.log("Hello"); }
After (Spaces per Tab = 4):
function example() { // This line is indented with a tab. console.log("Hello"); }
Convert Only Leading Tabs
Only the leading tabs (indentation) are converted to spaces; inline tabs remain.
Before:
function example() { // Leading tab converted; inline tab remains: Example }
After (Spaces per Tab = 4):
function example() { // Leading tab converted; inline tab remains: Example }
Custom Replacement
Each tab is replaced with a custom string.
Before:
function example() { // Tab before comment. console.log("Hello"); }
After (Custom Replacement "[TAB]"):
function example() { [TAB]// Tab before comment. [TAB]console.log("Hello"); }