Add Prefix to Lines
Add a prefix to every line of text instantly — prepend symbols, words, or auto-incrementing line numbers. Perfect for quoting text, commenting out code, and formatting lists. Free, and works entirely in your browser.
How to add a prefix to every line of text
Adding the same prefix to every line of a list, a code block, or a document by hand is slow and error-prone once you're past a handful of lines. This free line prefix tool does it instantly for text of any length — paste in your list, choose a prefix, and every line updates live as you type. It runs entirely in your browser, so nothing is uploaded to a server and there's no realistic limit on how much text you can process.
- Paste your list, code, or paragraph into the text box above — one entry per line.
- Type the prefix you want in the Prefix field, or click one of the quick presets below it.
- Turn on Skip empty lines if you want blank lines left untouched.
- Copy the result, or download it directly as a
.txtfile.
Add auto-incrementing line numbers
Type {n} anywhere inside the Prefix field and it will be replaced with a running line number instead of static text. For example, a prefix of {n}. turns a plain list into a numbered one (1. , 2. , 3. …), and Row {n}: is handy for labelling data rows. Use the Start numbering at field to begin counting from any number, not just 1.
Prefix every line with > to turn plain text into a Markdown or email-style blockquote.
Use // , # or -- to comment out an entire block of code in one click instead of line by line.
Use {n}. to convert a plain list into a numbered list, or Step {n}: for instructions.
Add consistent labels like [LOG] or ID-{n}: before importing text into a spreadsheet or log parser.
More text tools on ToolsBox
If you're cleaning up or reformatting text, a few other free tools on this site pair well with this one: use the Find & Replace tool to swap out repeated phrases before or after adding your prefix, the Case Converter to fix inconsistent capitalization, or the Text Reverser if you need to flip line order. Once you've finished formatting, run the result through the Word Counter or Character Counter to check length against any limits you're working with.