Add Text to Every Line
Add a prefix or suffix to each line and insert sequence numbers with the {n} format token. Original line order is preserved.
Start using
Add Text to Every Line
Add a prefix or suffix to each line and insert sequence numbers with the {n} format token. Original line order is preserved.
Add Text to Every Line
Four controls shape each output line: text placed before the original line, text placed after it, a starting sequence number defaulting to 1, and an optional number format. Numbering appears only when the format contains the literal token {n}; every occurrence of that token is replaced.
Line endings from Windows CRLF, older CR or Unix LF input are normalized to LF before processing. The tool maps every line in order, including empty lines, then joins the results with LF. It does not trim, sort, deduplicate, filter or skip blank lines.
Verified example: input Alpha, Beta and Gamma on separate lines, prefix [, suffix ], start 7 and format "{n}: " (including the trailing space) produces [7: Alpha], [8: Beta] and [9: Gamma] on separate lines. Input A, an empty line and B still produces three numbered output lines.
The starting value is converted to a finite whole number by truncating any decimal; zero and negative starts are accepted. A blank or nonnumeric start falls back to 1. There is no built-in zero-padding, alphabetic numbering, per-line condition, regular-expression replacement or file upload on this page. When the number format contains {n}, both the truncated starting number and the last line number must be within ±9007199254740991; otherwise processing stops with an error. Blank lines count toward the last number. Without {n}, the unused starting number is not subject to this range check.
Paste the source lines, enter only the prefix, suffix and optional numbering you need, press Start processing, inspect blank lines and the first and last number, then copy the result. Processing occurs in browser memory; very large input or long additions can increase memory use, so split unusually large lists and keep a source copy before replacing data.
Input is limited to 500,000 UTF-16 code units and output to 1,000,000. Emoji may occupy two code units. Spaces are inserted only if you include them in a field. Without {n}, other text in the number format is still inserted literally.
Processing takes place locally in your browser.