How to add a prefix and suffix to every line
Quoting a hundred values for a SQL IN clause, turning a plain list into markdown bullets or wrapping every row in a CSV field is slow and error-prone by hand. This tool takes your pasted text and glues the characters you choose onto the front and back of every line at once.
The prefix and suffix are inserted literally. Escape notation such as a backslash followed by t or n is not interpreted, so if you need a real tab you have to paste a real tab into the box. The one exception is {n}. Tick the {n} option and every occurrence is replaced with the line number, which is how you build numbered lists like "1. " and "2. ". The starting value is editable, and entering 0 gives you zero-based numbering.
Numbers are handed out only to the lines that actually get wrapped. If blank lines are being skipped they do not consume a number, so the sequence never jumps. When stray indentation throws the result off, switch on the trim option to clean each line before wrapping it. Everything runs locally in your browser.
Frequently asked questions
Type something like {n}. into the prefix box and tick the {n} option. Change the starting value to begin the sequence at any number you like.
By default they are left exactly as they are. Untick "Leave blank lines untouched" if you want every line wrapped, blank ones included.