Add prefix and suffix
Wrap every line in the same text, ready for SQL, JSON, or Markdown.
Type a prefix, a suffix, or both. They are added exactly as written — no space is inserted for you. Blank lines are left exactly as they are rather than becoming decorated empty entries. Up to 200,000 characters.
Result
Start typing and the result appears here. No button needed.
Add prefix and suffix, without the extra steps.
Put the same text in front of and behind every line — quotes around a list of IDs, a bullet in front of each item, a comma after each value. Blank lines are left alone by default rather than becoming decorated empty entries, and the last line can drop its trailing separator so a SQL IN list or a JSON array ends cleanly.
How to use this tool
- 1Paste your lines, one item per line.
- 2Type the prefix, the suffix, or both. The result updates as you type.
- 3Decide what happens to blank lines and to the last line's separator, then select Copy result.
When Add prefix and suffix is the right tool
- A list of order IDs has to become a SQL IN clause, quoted and comma-separated, without a trailing comma breaking the query.
- A column of values needs to become JSON array items to paste into a config file.
- A plain list has to become Markdown bullets or a set of HTML list items for a page.
- A set of paths needs the same folder prefix added to every one before a script can use them.
The last line is the one that breaks things
A trailing comma is what makes a hand-built SQL IN list or JSON array fail to parse, and it is the single most annoying part of doing this by hand. Dropping the last line's separator removes one trailing comma, semicolon, pipe, or ampersand from the suffix and leaves the rest of it in place — so a suffix of an apostrophe and a comma still closes the quote on the final line, it simply does not end with the separator. That is why the option removes a separator rather than the whole suffix.
Blank lines are not entries
A blank line in a pasted list is usually spacing rather than an empty value, and wrapping it produces an empty pair of quotes or a bullet with nothing after it — the kind of thing that fails validation two steps later. Blank lines are therefore left exactly as they are by default, and counted separately so you can see it happened. Wrap them too exists for the cases where a template genuinely needs every row to have the same shape.
Nothing is escaped for you
The prefix and the suffix are added exactly as typed and the line between them is untouched. That is predictable, and it also means wrapping a value that already contains a quote produces a string a parser will read as ending early. This tool is for adding structure around clean values; when the values themselves need quoting and escaping — commas inside a field, embedded quotes — List to CSV applies the actual rules instead.
A few quick answers.
Use an apostrophe as the prefix and an apostrophe followed by a comma as the suffix, then set the last line to drop its separator. Every line becomes 'value', and the final one becomes 'value' with no trailing comma, which is exactly what the clause needs. The same shape with double quotes gives you JSON array items.
By default they stay blank, because a decorated empty line is almost never wanted — a bullet with nothing after it, or a pair of empty quotes. Choose Wrap them too when every line has to have the same shape, for instance when the output is going into a template that expects a value on every row.
No. The prefix and suffix are added exactly as typed and the line between them is untouched, so a value that already contains a quote will produce a string that a parser reads as ending early. Use List to CSV when the values need proper quoting and escaping rather than simple wrapping.
No. If you want a bullet followed by a space, type the space as part of the prefix. Adding one for you would break every case where the prefix is a quote, a bracket, or a path fragment that has to sit directly against the value.
Not here — this only adds. Use Find and replace to remove a known prefix, which lets you see what will be removed before you commit to it. The workspace does warn when every line already begins with the prefix you typed, which is the usual sign that you are wrapping something twice.
Yes. One line in, one wrapped line out, which is a quick way to build a single quoted or bracketed value. The last-line option then applies to that one line, so a suffix ending in a comma comes back without it.