Use the free Indent Text Lines below: your data never leaves your browser — all work happens on your device, and nothing is uploaded to any server.
Why indent a whole block at once
Indentation shows structure. In code it marks nesting: what belongs inside a block, a loop or a function. In plain text it marks a quotation, a sub-list or a subordinate point. In a document it sets a block apart from the surrounding text. When you move a block into a deeper context, or quote a whole passage, every line needs one more level of indentation, and doing that by hand means editing each line individually and hoping you do not miss one.
Indenting all lines at once is faster and exact. Every line gets the same treatment, the block keeps its internal relative indentation, and the result is consistent from the first line to the last.
How this tool works
Paste your text, choose the indent unit, and set the number of levels. The units cover the common cases: two spaces, four spaces, a tab, or your own custom text, such as a greater-than sign and a space for a quoted passage, or a dash for a sub-list. Choosing two levels of four spaces adds eight spaces to each line; choosing one level of a tab adds one tab. The indent is prepended to each line, in front of whatever indentation the line already had, so nested structure inside the block is preserved.
Empty lines are skipped by default, so blank lines between paragraphs do not collect trailing spaces or tabs that would show up as whitespace-only lines in a diff or a file. Turn that off if you need every line indented, including blank ones, for example when the output must line up exactly with another file. The tool never changes anything inside a line: it only adds characters at the front.
When to use it
Use it when pasting code into a nested block, such as moving a snippet inside a function or a conditional, where the whole block needs one more level. Use it to quote a passage in plain text or Markdown, where each line gains a quote marker. Use it to demote a list or an outline by one level, or to prepare a block for inclusion in a document where indented text marks an example or an aside.
Writers use it to set off quoted material. Support staff use it to indent pasted logs inside a formatted message. Students use it to indent a block quotation in an essay draft. Anyone who rearranges outlines will indent and outdent blocks repeatedly, and a one-click tool makes that painless.
What indenting does not do
Indenting only adds; it does not remove indentation, align text to a column, or reformat code. If a block already has inconsistent indentation, adding a uniform level preserves the inconsistency, shifted right. To fix that, normalise the block first, for example by converting tabs to spaces, and then indent. Also note that indenting with a tab while the rest of your document uses spaces, or vice versa, creates a mixed-indentation file, which some tools reject; match the unit to the document you are working in.
Custom indents deserve a quick check too: a custom string is repeated per level, so two levels of “> ” give “>> “, which is what you want for nested quotes, but two levels of a word would repeat the word, which may not be what you meant. Check the first line of the result before copying a large block.
Tips for clean indentation
Indent as the last step of a transformation sequence, after cleaning, wrapping and wrapping lines, so that earlier steps measure the unindented text. For code, match the project’s indent unit exactly: most projects use either two or four spaces, and mixing them is the most common indentation complaint in reviews. Everything runs in your browser, so code and private text never leave your device.
