Add prefix and suffix to lines
Paste a list and type what should go at the start and the end of each line. It turns a plain list into quoted, comma-separated or bracketed lines, bullets, SQL values, HTML items and more.
Runs in your browser: nothing you enter is sent anywhere.
How to use it
- Paste your lines in the left box.
- Type the prefix and the suffix. Leave one empty if you only need the other.
- Decide whether empty lines should be skipped, then press Copy.
How it works
The text is split into lines (Windows, old Mac and Unix line breaks all work). For each line the prefix, the line and the suffix are joined together, and the lines are put back with plain line breaks. Everything happens in your browser.
Worked example
The lines apple, banana, an empty line and cherry with the prefix [ and the suffix ] become [apple], [banana], an empty line and [cherry]. With empty lines not skipped, the empty line becomes [].
Tips
For a bulleted list use “- “ as the prefix. For HTML list items use “
” and “”. To number lines instead, use the add line numbers tool.
Frequently asked questions
What happens to empty lines?
With "Leave empty lines alone" on, empty lines and lines with only spaces stay as they are. With it off, they get the prefix and suffix like any other line.
Does a final line break get a prefix?
No. If your text ends with a line break, the empty last line stays empty, because it is not a line of text.
How do I make a quoted, comma-separated list?
Use a double quote as the prefix and a double quote plus a comma as the suffix. Each line becomes "text",. The default settings do exactly this. For a last item without a comma, delete the final comma by hand.
Can I use special characters like tab?
Yes. You can type or paste any text into the two fields, including a tab character or an emoji. Line breaks cannot be typed into a field, since each field is a single line.