TtFree
Tabs and spaces converter
Expand tabs at tab stops or replace leading indentation with tabs.
Expand tabs at tab stops or replace leading indentation with tabs. Choose a tab width to expand tab characters or compress leading indentation into tabs. Expansion advances to the next tab stop instead of replacing each tab with a fixed number of spaces.
How to use
- Enter your text, values, or image.
- Adjust the options and run the tool.
- Copy or download your result.
Worked example
Example input
Input: a b Tab width: 4 Action: expand
Example result
a b
Limitations and details
Tab widths must be 1–16 characters; compression only changes leading spaces and does not rewrite alignment inside a line.
Inputs and options
- Input
- Text
- Tab width
- Number · Minimum: 1 · Maximum: 16
- Action
- Tabs to spaces / Leading spaces to tabs
Frequently asked questions
Is this tool free and private?
Yes. All 300 tools are free in this phase. Processing happens in your browser; your input and files are not sent to our servers.