Toolstia / add prefix and suffix to lines

Add a prefix and suffix to every line

Paste a list and add the same text before and after each line. Use it to put quotes and commas around values, add bullets, or number a list.

Type {n} in either box to insert the line number, for example “{n}. ” makes a numbered list. Useful for quoting values, building SQL lists, adding bullets or turning lines into code.

How it works

  1. Paste your lines.
  2. Type what to add before and after each line.
  3. Copy the result.

Quoting values

Use a double quote as the prefix and a double quote plus a comma as the suffix to turn a list of words into a list of strings for code.

Line numbers

Type {n} in either box to insert the line number, so “{n}. ” makes a numbered list. Empty lines are not counted when they are left alone.

Options

You can skip empty lines so they stay empty, and trim spaces around each line first.

Other uses

Add SQL quotes, build a list of URLs from slugs, add a markdown bullet or put a comment marker in front of lines.

Questions

Does it keep empty lines?

Yes, by default empty lines stay empty and get no prefix or suffix.

Can I add different text to each line?

No, the same text goes on every line. Numbers with {n} are the exception.

Is my text uploaded?

Everything happens in your browser, and nothing you enter is sent anywhere.