Add Prefix / Suffix to Lines
Add the same text to the start or end of every line: quotes, commas, bullets or HTML tags.
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
- Paste your list.
- Type the prefix and/or suffix.
- Tick skip empty lines if needed.
- 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
Add / Remove Line Numbers
Number every line with your own start, step and separator, or remove existing line numbers.
Open toolJoin / Split Lines
Join lines into one text with any separator, or split text into lines at a separator.
Open toolFind and Replace
Find and replace text with case sensitivity and regular expression support.
Open toolSort Lines
Sort lines alphabetically (A–Z, Z–A), by length, or reverse the list.
Open tool