Add Prefix and Suffix to Lines
Add text to the start and end of every line, with optional numbering.
- Free
- Real-time
- Runs locally
Prefix and suffix
Use {n} anywhere for the line number.
Presets
Numbering applies when the prefix or suffix contains {n}.
Lines changed
0
Total lines
0
Skipped
0
Empty lines
Add the same text to the start, the end, or both ends of every line in seconds. Turn a plain list into bullet points, a numbered list, quoted values for SQL or JSON, HTML list items or anything else you need.
Put {n} in the prefix or suffix to insert line numbers, choose the starting number and pad them with zeros. Empty lines can be skipped so they are not numbered, and lines can be trimmed first. Everything happens in your browser.
How to add a prefix or suffix to every line
- STEP 01
Paste your lines
Paste a list with one item per line. The result updates as you type.
- STEP 02
Enter the prefix and suffix
Type the text to add to the start and end of each line, or click a preset such as bullets, numbers or quotes.
- STEP 03
Copy the result
Adjust numbering and empty-line handling if needed, then copy or download the new list.
Features
Prefix, suffix or both
Add text to the beginning of each line, the end, or wrap every line on both sides.
Automatic line numbers
Use {n} for the line number, start from any number, and pad with zeros (01, 02, …).
One-click presets
Bullets, Markdown lists, numbered lists, quoted values, SQL values and HTML <li> items.
Empty lines handled
Skip blank lines so they stay blank and are not numbered, or decorate them too.
Trim before adding
Remove stray spaces at the ends of lines first, so quotes and brackets sit tight.
Large lists
Process hundreds of thousands of lines instantly, entirely in your browser.
Handy examples
A few common ways to use prefixes and suffixes:
- Prefix ' and suffix ', to turn IDs into SQL values for an IN (…) clause.
- Prefix " and suffix ", to build a JSON or JavaScript array from a list.
- Prefix {n}. to number steps, or Step {n}: for instructions.
- Prefix https://example.com/ to turn slugs into full URLs.
Frequently asked questions
How do I add text to the beginning of every line?
Type it in “Add to the start of each line”. It is added to every line of your text at once; leave the suffix empty if you only need a prefix.
How do I number lines?
Put {n} in the prefix, for example “{n}. ” for 1., 2., 3. Set “Start numbering at” to begin from another number and turn on padding for 01, 02 … 10.
What happens to empty lines?
By default they are left empty and are not numbered. Turn off “Skip empty lines” to add the prefix and suffix to them too.
Can I wrap each line in quotes for SQL or JSON?
Yes. Use the 'SQL', or "Quoted", preset. Remember that the last line also gets the trailing comma, which you may want to remove.
Does it change the text of my lines?
No. Only the prefix and suffix are added. Turn on “Trim lines first” if you want spaces at the ends of lines removed.
Is my text uploaded?
No. Lines are processed in your browser and nothing is sent to a server.