Skip to content
Tesserae

Keyboard shortcuts

Focus search
/
This help dialog
?
Run the current tool
Ctrl/⌘ +Enter
Copy the output (when an output is focused)
Ctrl/⌘ +C

Shortcuts are ignored while you are typing in an input, a textarea or a select.

Text & Strings

Indent / Dedent Text

Prefix each line with a chosen number of spaces or tabs, or strip up to that much leading indentation back off. Blank lines can be left untouched.

On-device No network Offline-ready

🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.

Try:

Options

Your result will appear here

Type or paste your input above, adjust the options, then press Run. Tip: press Ctrl+Enter to run, and ? for every shortcut.

How it works

Shifting a block left or right

In indent mode every line is prefixed with the chosen number of spaces or tabs, which is what you want when pasting a snippet into a nested block. Dedent is the reverse: it strips up to the chosen amount of the same leading unit from the start of each line, so a block copied out of a function can be lifted back to column zero.

Spaces or tabs

The unit selector decides the character that is added or removed. With spaces, the count is how many space characters prefix the level; with tabs, one unit is a single tab character and the count is how many tabs. Dedent only removes the selected unit, so a file that mixes both will stop at the first character that does not match.

Blank lines can be skipped

With the blank-line option on, empty or whitespace-only lines are left exactly as they are instead of gaining trailing indentation, which keeps diffs clean. Turn it off when you need strictly uniform leading whitespace on every line, including the empty ones.

Runs as you type

The transformation is a line-by-line string operation performed in this tab. Nothing is uploaded, no request is made, and there is no saved state, so pasting private source or configuration here exposes it to nobody but you.

Questions

What does dedent do if a line has less indentation than requested?

It removes whatever leading indentation is there, up to the requested amount, and leaves the rest of the line alone. It never removes non-whitespace characters.

Does dedent mix spaces and tabs?

No. It removes only the selected unit from the start of each line, stopping at the first character that is not that unit.

How are blank lines handled?

By default blank lines are left untouched in both modes. Turn "Leave blank lines untouched" off to indent or dedent them like any other line.

See category