Indent Adjuster
Adjust text indentation in bulk. Add or remove indentation, and convert between tabs and spaces.
Last updated:
How to Use
Expand how to useCollapse how to use
- 1
Enter your text
Paste the text you want to adjust into the input area. Works with code, config files, and more.
- 2
Choose mode and style
Select from 3 modes: Add Indent, Remove Indent, or Tab ⇔ Spaces conversion, along with your preferred indent style (2 spaces, 4 spaces, or tab).
- 3
Copy the result
Review the converted result in real time and click 'Copy' to copy it to your clipboard.
Input Text
Result
About Indent Adjuster
Indent Adjuster lets you adjust text and code indentation in bulk with three operation modes: add indentation, remove indentation, and convert between tabs and spaces. Choose from 2-space, 4-space, or tab indent styles to match your team's coding standards — whether that's 2 spaces for JavaScript, 4 spaces for Python, or tabs for Go. It's perfect for normalizing code pasted from Stack Overflow or GitHub, fixing mixed indentation before committing to a shared repository, and reformatting YAML or JSON configuration files. Results update in real time with a one-click copy button.
Key Features
- Three operation modes (add, remove, convert)
- Indent style selection (2 spaces, 4 spaces, tab)
- Tab and space interconversion
- Real-time conversion preview
- One-click copy to clipboard
Use Cases
- Convert tabs to spaces to match your team's style guide (e.g., 2 spaces for JavaScript, 4 for Python)
- Fix mixed indentation in code pasted from Stack Overflow or GitHub
- Add consistent indentation to YAML, JSON, or config files
- Normalize indentation before committing to a shared repository
- Adjust Markdown code block indentation for correct rendering
FAQ
How does tab-space conversion work?
In 'Tab ⇔ Spaces' mode, tabs and spaces are interconverted based on the selected indent style. For example, selecting '4 Spaces' converts each tab to 4 spaces. Selecting 'Tab' converts leading spaces to tabs.
Why would I need to convert tabs to spaces?
Many code editors and style guides (such as Prettier for JavaScript or PEP 8 for Python) enforce spaces over tabs. If you copy code from a source that uses tabs, this tool lets you normalize it instantly.
How are empty lines handled?
Empty lines are preserved as-is. Even in Add Indent mode, indentation is not added to empty lines.
What if the indentation is less than the specified amount?
If a line has fewer spaces than the specified indent width, only the existing spaces are removed. No text content is lost.
Is my data sent to a server?
No. Indentation adjustments run as JavaScript in your browser. Text data is not transmitted externally.
