Skip to content
AZ Tools

Line Formatter — Add Prefix, Suffix & Join

Wrap each line with a prefix and suffix and join them with any separator, in your browser.

Output

Items: 3

How to use

  1. Paste your list into the input box, one item per line.
  2. Set a prefix and suffix to wrap each line, and pick a separator.
  3. Copy the formatted result from the output box.

About this tool

Show

Paste a list and reformat every line at once: wrap each one in a prefix and suffix and join them with the separator you choose. It is the fastest way to turn a column pasted out of a spreadsheet into a SQL IN list, a JavaScript array, quoted CSV values or Markdown bullets, and lines can be trimmed and blanks dropped before anything is wrapped. The wrapping is literal, which is the thing to watch: a value that already contains your quote character is not escaped, so a name like O'Brien will break a single-quoted SQL list. For that case switch the quote style or fix those rows first. Everything runs locally in your browser — nothing is uploaded.

Frequently asked questions

What can I build with this?

Common uses are SQL IN lists (prefix and suffix ' with a comma separator), JavaScript or Python array literals, quoted CSV rows, and Markdown or HTML list items.

What do the trim and remove-empty options do?

Trim removes leading and trailing whitespace from each line before wrapping. Remove empty lines drops blank lines so they don't become empty wrapped entries.

Can I use a custom separator?

Yes. Choose Custom and type any separator string, such as a space-arrow-space or a pipe. The built-in choices cover newline, comma, comma-space, space, semicolon and pipe.

Is my data sent anywhere?

No. Formatting happens entirely in your browser; nothing is uploaded.

My SQL list broke on a name like O'Brien. Why?

Because the wrapping is literal — the prefix and suffix are added as typed and nothing inside the line is escaped. A value already containing your quote character closes the string early. Switch to a quote the data does not use, or double the apostrophes in the source before pasting.

Is a long IN list a good idea?

Past a few hundred values, usually not. Databases have limits — Oracle caps IN at 1,000 items — and query plans degrade well before that. A temporary table joined to your query, or a batched query, holds up where a list of ten thousand literals will not.

Related tools