Add Prefix or Suffix to Lines
TextEverything runs locally in your browser — nothing is uploaded
Add the same prefix, suffix, or both to every line — handy for indenting, adding quote markers (`> `), or turning a list into CSV fragments. Prefixes and suffixes support escapes such as `\t` and `\n`: a literal backslash plus letter becomes a tab or a newline, because a text box cannot produce a tab character — without this you could never add indentation. You can also add line numbers (`1. ` style) with an adjustable start and zero-padding. Blank lines are skipped by default, so a paragraph full of blank lines is not stuffed with the prefix, and blank lines do not consume a number. Everything runs in your browser; nothing is uploaded and nothing goes over the network.
Features
- Add the same prefix, suffix, or both to every line
- Prefixes and suffixes support \t \n \r \\ escapes for tabs and line breaks
- Add line numbers too, with adjustable start and zero-padding
- Blank lines are skipped by default; a switch turns it back on
- Blank lines are not numbered and do not consume a number
- Line numbers use the 1. style (number, dot, space)
- Copy any single line or the whole result
- Everything runs locally in your browser; nothing is uploaded
How to use
- Paste the lines you want to process
- Set a prefix / suffix (write \t for a tab, \n for a newline)
- Tick line numbers if you want them, and set the start and zero-padding
- The result updates as you type; click Copy to take it
FAQ
- How do I indent every line with a tab?
- Write `\t` (backslash plus t) in the prefix. A text box cannot produce a tab character, so the tool turns the literal `\t` into a real tab; likewise `\n` becomes a newline, `\r` a carriage return, and `\\` a single backslash.
- Why are blank lines skipped by default?
- Text copied from documents usually contains blank lines. Applying the prefix to those too stuffs them with the marker, leaving a row of odd characters on screen, and with line numbers it wastes a number. So they are skipped by default; turn on “Apply to blank lines too” if you want them included.
- What does the zero-padding do?
- A value of 3 pads the number to `001`, `002`, `010`; 0 means no padding. A number already longer than the width is left as-is, never truncated. Negative numbers are not padded (that would give `00-1`).
Related tools
Line Numbering
TextAdd line numbers in bulk or strip existing ones: six numbering styles, adjustable start and step, zero padding, and blank lines that need not count.
Decorated Text
TextTurn text into 18 Unicode styles — bold, italic, script, fraktur, double-struck, circled, fullwidth — and restore decorated text back to plain.
Merge Lines
TextMerge multiple lines into one: turn line breaks into a space, a comma, a semicolon or nothing, with blank lines handled first.
Text Diff
TextCompare two blocks of text online and highlight added, removed and unchanged lines, so only the lines that changed are marked. Runs in your browser.
Word Counter
TextCount Chinese characters and English words separately, alongside characters, lines, real UTF-8 bytes, reading and speaking time, and SMS segment counts.
Text Cleaner
TextClean up a column pasted out of a log or spreadsheet: deduplicate, sort, drop blank lines, trim whitespace and strip line numbers, all in your browser.