Add Prefix / Suffix to Lines

Add the same text to the start or end of every line: quotes, commas, bullets or HTML tags.

Runs in your browser Free
Processed locally in your browser.

Use {n} in the prefix or suffix to insert the line number.

Transform lists in one step

To use a list of product codes copied from Excel in an SQL query, wrap names in quotes and separate them with commas, or turn lines into Markdown bullets or HTML <li> tags, you need to add the same text to every line.

Example transformations

  • 'ABC123' → "'ABC123'," (for an SQL IN list)
  • 'Apple' → '- Apple' (Markdown bullet)
  • 'London' → '<li>London</li>' (HTML list)

Insert numbers with {n}

Write {n} in the prefix or suffix to insert the line number automatically. There's also an option to skip empty lines. Processing happens in your browser.

How to use Add Prefix / Suffix to Lines

  1. Paste your list.
  2. Type the prefix and/or suffix.
  3. Tick skip empty lines if needed.
  4. Copy the transformed list.

Why use this tool?

Cuts repetitive editing to seconds for developers, data analysts and content editors.

FAQ

How do I quote every line and add a comma?

Set the prefix to ' (or ") and the suffix to ', (or ",); the output is ready for SQL IN lists or arrays.

How do I remove the trailing comma on the last line?

Delete the last character of the output, or join the lines with a comma using Join / Split Lines.

Can I add line numbers?

Yes, use {n} in the prefix or suffix.

Related tools