Skip to content
Text Cleanup Tools

Text Cleanup Tools › Lists and lines

Add Prefix and Suffix to Lines

Wrap every line in text of your choice, such as quotes and a comma.

Processed on your device. Nothing is uploaded or stored on a server.

How it works

  1. Paste your lines.
  2. Type the text to add at the start and at the end of each line.
  3. Copy the result.

Example

Before
alpha
beta

gamma
After
"alpha",
"beta",

"gamma",

What this tool does

This turns a plain list into code-ready lines in one pass: wrap names in quotes with a trailing comma for an array, add <li> and </li> around menu items, or prepend a path to a list of file names. The defaults produce quoted, comma-ended lines. Blank lines are skipped by default so they do not turn into empty quotes. Nothing in your prefix or suffix is interpreted, so characters like $ and \ are added exactly as typed.

Common problems

I don't want a comma on the last line

Add the suffix first, then remove the final comma by hand or with find and replace.

Blank lines got quotes

Turn on "Skip blank lines".

Questions

Can I add text only at the start?

Yes. Leave the suffix empty.

Does it escape quotes inside lines?

No. Characters in your lines are not changed.

How do I wrap everything in one pair of quotes instead?

Use the lines-to-list tool with a separator and quote options, which produces a single line.

Related tools

Last reviewed 2026-10-14.