Skip to main content

Convert Tabs to Spaces

Convert tabs to spaces instantly in your browser.

Tool workspace

Conversion runs in your browser. Nothing you paste is sent to our servers.

How many spaces replace each tab (default 4).

Leading only converts indentation; All tabs converts every tab.

How it works

Paste or type tab-indented text into the input. Choose a tab width (2, 4, or 8 spaces; default 4) and a scope.

Leading only (default) converts only tabs at the start of each line—like a simple Unix expand of indentation. Each tab becomes tab-width spaces. Conversion stops at the first non-tab character. Line endings (CRLF, CR, LF) are preserved.

All tabs replaces every ASCII tab with tab-width spaces anywhere in the text. Spaces already present, newlines, and Unicode space characters (such as non-breaking spaces) are left unchanged. This tool does not use column-aware tab-stop padding: each tab expands to a fixed number of spaces.

Results update as you type (light debounce) or when you press Convert. Empty input produces an empty result—no error. Processing runs entirely in your browser.

Examples

  • ⇥hello → hello (leading, width 4)
  • ⇥⇥hello → hello (leading, width 4)
  • hello⇥world → hello world (all tabs, width 4)
  • ⇥a ⇥b → a / b (leading, both lines)
  • (empty) → (empty)

Privacy

Privacy: this tool processes text locally in your browser. We do not log or store what you paste. Login is not required.

FAQ

Is my text uploaded to a server?

No. Tabs-to-spaces conversion runs entirely in your browser. Pasted content is not sent to Nova Engine.

Do I need an account?

No. All published tools work for guests without login.

What is tab width?

Tab width is how many ASCII spaces replace each tab. Choose 2, 4, or 8. The default is 4.

Leading only vs All tabs?

Leading only converts tabs at the start of each line. All tabs converts every tab anywhere in the text, including between words.

Does this pad to tab stops by column?

No. In v1 each tab becomes a fixed number of spaces (the tab width). It does not align to the next column stop.