Indent every line

Indent prefixes every line with a run of whitespace (or a custom character). Pick the Length of the indent, the Indent With kind (spaces, tabs, or a custom char), whether to Indent Empty blank lines, and whether to indent only the first line of each paragraph. To strip the indent again use unindent text.

Input
Line 1:1 LF cloud_done Saved locally
Result Indent Text
0 lines 0 chars

Add a fixed indent, with empty-line and paragraph rules

Length is the number of indent units to insert. Indent With picks the unit: Spaces uses a literal space (the default), Tabs uses \t, Custom uses the first character of the Custom field. Length is bounded 1 through 40 in the registry.

Indent Empty on (the default) prefixes blank lines too, so an empty line in the input becomes a line of pure indent characters in the output. Turn it off to leave blank lines exactly as they were. Paragraphs on switches to paragraph-only mode: only the first line of each paragraph (split on two-or-more line breaks) gets the indent, like a typeset book paragraph.

Common uses: nesting a code block under another scope (Length 4, Indent With Spaces), converting tabs to a different unit by combining with unindent first, or producing email-style quoted replies (Indent With Custom, Custom > ... use add prefix for multi-character markers).

How to use indent every line

  1. 1Paste your text into the input panel on the left.
  2. 2Set Length to the number of indent units (1 to 40).
  3. 3Pick Indent With: Spaces, Tabs, or Custom.
  4. 4If Custom, type a character into the Custom field.
  5. 5Decide whether Indent Empty stays on (blank lines indented) and whether Paragraphs mode is enabled.

Keyboard shortcuts

Drive TextResult without touching the mouse.

Shortcut Action
Ctrl FOpen the find & replace panel inside the input Plus
Ctrl ZUndo the last input change
Ctrl Shift ZRedo
Ctrl Shift EnterToggle fullscreen focus on the editor Plus
EscClose find & replace, or exit fullscreen
Ctrl KOpen the command palette to jump to any tool Plus
Ctrl SSave current workflow draft Plus
Ctrl PRun a saved workflow Plus

What this tool actually does

Three indent units, one default

Spaces uses a single space character per unit. Tabs uses \t per unit (so Length 1 is one tab, length 4 is four tabs). Custom reads Custom, takes the first character if any, and falls back to space if the field is empty.

Indent Empty controls blank-line behaviour

On (the default), every line including blank ones is prefixed with the indent string. Off, lines whose value is exactly empty (after the split on \r?\n) pass through unchanged.

Paragraphs indents only the first line

In paragraph mode the input is split on two-or-more line breaks. Each paragraph chunk gets the indent prepended once at its very start; the inner lines of the paragraph are not indented. Useful for typeset-style first-line indents.

Length is bounded 1 to 40

The registry caps Length between 1 and 40 to keep indents reasonable. Common picks: 2 for two-space code, 4 for four-space code, 1 with Indent With Tabs for one tab.

Reverse with the unindent tool

Unindent text is the natural inverse. Use Remove N Levels with the same indent symbol to strip exactly the indent you added.

Worked example

Length 4, Indent With Spaces, Indent Empty on, Paragraphs off. Every line gains four spaces at the start.

Input
function greet(name) {
console.log('hello ' + name);
return name.toUpperCase();
}
Output
    function greet(name) {
    console.log('hello ' + name);
    return name.toUpperCase();
    }

Settings reference

Behaviour Effect on output
Length (1-40) Number of indent units inserted at the start of each line.
Indent With = Spaces Each unit is a space character.
Indent With = Tabs Each unit is a tab (\t).
Indent With = Custom Each unit is the first character of Custom; falls back to space when blank.
Indent Empty on (default) Blank lines are also indented (line of pure indent chars).
Indent Empty off Empty lines pass through unchanged.
Paragraphs off (default) Every line is indented.
Paragraphs on Only the first line of each paragraph is indented (paragraphs split on 2+ line breaks).

FAQ

How do I indent with two spaces?
Set Length to 2 and Indent With to Spaces. Every line will gain two leading spaces.
Can I indent with a hyphen, asterisk, or other character?
Yes. Set Indent With to Custom and put the character into Custom. Only the first character is used. For multi-character markers (like > for quotes) use add prefix to each line.
What does Paragraphs mode do exactly?
It splits on two-or-more consecutive line breaks. Each paragraph (the chunk between separators) gets the indent inserted once at its start. Inner lines of the paragraph are not indented. This is the typeset-paragraph style.
How do I remove the indent later?
Use unindent text. Remove All mode strips every leading whitespace character; Remove N Levels removes a fixed indent symbol N times.
Does anything upload?
No. The transform runs in your browser. Your text stays on your device.