Auto-detects indent depth
Reads each line's leading whitespace, converts tabs to columns, and infers the indent level even when spacing is inconsistent.
Fix messy, mixed-up indentation in one pass. Normalize every line to tabs or spaces, trim trailing whitespace, and collapse extra blank lines—with live before and after stats.
Reads each line's leading whitespace, converts tabs to columns, and infers the indent level even when spacing is inconsistent.
Re-emit every line using tabs or a configurable 1-8 space width, matching your project's style guide.
Optionally trim trailing whitespace and collapse runs of 3 or more blank lines in the same pass.
Mixed indentation is one of the most common sources of quiet bugs and messy diffs. When some lines use tabs and others use two, three or four spaces, editors render the same logical depth differently depending on tab-width settings, which makes nested blocks hard to scan and can even change behavior in whitespace-sensitive languages. Version control makes the problem worse: a single reformat can turn a one-line change into a hundred-line diff, burying the actual edit under noise and making code review far harder than it needs to be. This formatter solves the root cause rather than papering over it. Instead of blindly replacing tabs with spaces or vice versa, it measures each line's true indentation depth in columns, accounting for how tabs expand, and then re-emits every line at a consistent level using the unit you choose. Combined with trailing-whitespace trimming and blank-line collapsing, a single pass turns a document that has been edited by multiple people, tools or editors back into something clean, predictable and easy to diff.
Consistent indentation means future edits show up as the actual change, not a whitespace reflow.
Fixed indentation renders the same regardless of a teammate's tab-width setting.
Only leading and trailing whitespace is touched; the meaningful content of every line is preserved exactly.
It reads each line's leading whitespace, converts tabs to columns, auto-detects the smallest common space unit used in your text, and rounds the result to the nearest indent level so mismatched tabs and spaces line up consistently.
The tool only rewrites leading whitespace and optional trailing whitespace or blank lines. It never touches the visible content of a line, so code logic and text stay intact.
Yes. Pick Spaces as the indent unit and set how many spaces represent one indent level, from 1 to 8, and every line is re-emitted using that unit.
When enabled, any run of three or more consecutive blank lines is reduced to a single blank line, tidying up excess vertical whitespace without removing intentional single blank-line breaks.
Yes. It runs entirely in your browser with no account or upload required, so your text and code never leave your device.