Add Prefix / Suffix to Lines
Add a prefix, a suffix or both to every line of a list: bullet points, quotes, commas, HTML tags or line numbers with {n}. Skip empty lines and trim spaces, then copy the result.
This tool runs entirely in your browser.
How to use the Add Prefix / Suffix to Lines
- 1Paste your list, one item per line.
- 2Type a prefix and/or suffix. Use {n} for the line number.
- 3Choose whether to skip empty lines and trim spaces, then copy the result.
What is the Add Prefix / Suffix to Lines?
Common recipes: prefix “- ” for a Markdown list, prefix and suffix “"” and “",” to turn a list into quoted, comma-separated values for code or SQL, “<li>” and “</li>” for HTML, or “{n}. ” for a numbered list.
{n} counts only the lines that receive the prefix, so with “Skip empty lines” on, the numbering stays continuous across blank lines.
Frequently asked questions
How do I add a comma to the end of each line?
Leave the prefix empty and type “,” as the suffix. To quote each item too, use “"” as the prefix and “",” as the suffix.
Can I start numbering at 0 or add a dot?
The {n} token starts at 1. Write the format you want around it, such as “{n}) ” or “Step {n}: ”.
Is the Add Prefix / Suffix to Lines free and private?
Yes. The Add Prefix / Suffix to Lines is free, needs no account, and runs entirely in your browser. What you type is never sent to a server or stored.
Related tools
All text tools →- Remove Line BreaksJoin broken lines from PDFs and emails.
- Sort LinesSort lines alphabetically, naturally or by length.
- Remove Duplicate LinesDelete repeated lines from a list.
- Find and ReplaceFind and replace text, with regex support.
- Text RepeaterRepeat a word, emoji or sentence many times.
- Word CounterCount words and characters instantly.
