Text Indent Formatter

Convert text indentation between spaces and tabs and normalize alignment

How to Use the Text Indent Formatter

Paste any indented text, choose the conversion direction (spaces to tabs or tabs to spaces) and indent size, then click Convert. Great for normalizing indentation in code files, config files, and markdown documents.

Spaces vs Tabs

StyleProsCons
SpacesConsistent visual appearanceSlightly larger file size
TabsSmaller file size, configurable widthVaries by editor settings

Frequently Asked Questions

How do I set the indent size?

Select 2, 4, or 8 from the dropdown. With size 4, every 4 leading spaces become one tab (and vice versa).

Does it handle mixed indentation?

Yes, each line's leading whitespace is converted independently.

Are non-indented lines changed?

No, lines without leading spaces or tabs are left unchanged.