Indent Block Text

Add spaces, tabs, or a fixed prefix to every line — or outdent and dedent copied blocks. Useful for code snippets, Markdown quotes, comments, hanging indents, and bulk line prefixing.

Try:
Indented text

About this tool

Indent Block Text adds spaces, tabs, or any fixed prefix to selected lines of a text block. Use it to indent code snippets, create Markdown quotes, prefix lines with comment markers, make hanging indents, or normalize copied text by outdenting or dedenting it.

The default adds four spaces to every non-blank line. Switch style to custom and set prefix to values like > , # , or // when you need quotes, headings, or code comments. Use mode=outdent to remove a known indentation unit, or mode=dedent to remove the common leading whitespace shared by the block.

Worked example

Input:

alpha
beta

With mode=indent, style=custom, prefix=> , and count=1, the output is:

> alpha
> beta

Limits and edge cases

FAQ

How do I add a Markdown quote marker to every line?

Set style=custom, prefix=> , count=1, and keep mode=indent. The prefix is inserted exactly as written, including the space after the greater-than sign.

What is the difference between outdent and dedent?

outdent removes up to count copies of the selected unit, such as four spaces or one custom prefix. dedent measures the common leading whitespace across selected non-blank lines and removes that shared prefix.

Can I make a hanging indent?

Yes. Set lines=hanging. The first line stays unchanged and every following line receives the indent or prefix.

Will blank lines get trailing spaces?

Not by default. skip_blank_lines=true leaves whitespace-only lines unchanged. Turn it off if you intentionally need blank lines to carry the same prefix.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool indent-block-text "alpha
beta
gamma"

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/indent-block-text/?text=alpha%0Abeta%0Agamma&mode=indent&style=spaces&count=4&prefix=%3E%20&lines=all&skip_blank_lines=true

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.