Add Prefix and Suffix
Add text to the beginning and end of every line at once — perfect for wrapping lists in quotes, commas, HTML tags or brackets. Free, instant and private, all in your browser.
How to use the Add Prefix and Suffix tool
- Paste your lines. Put one item on each line — a list of names, IDs, filenames or any values.
- Enter a prefix and suffix. Type the text to add before and after each line, or click a quick preset to fill both at once. The result updates instantly.
- Copy or download. Grab the wrapped text with the copy button, or download it as a
.txtfile.
About this tool
Adding the same text to the start and end of many lines by hand is slow and error-prone. This free prefix and suffix tool does it in one pass, which is handy for turning a plain list into a quoted, comma-separated array for JavaScript, Python or SQL, wrapping items in <li> tags for an HTML list, prepending Markdown bullets, or adding a shared folder path in front of a list of filenames.
The prefix and suffix accept any characters, including quotes, brackets, tags and punctuation, so you can build almost any per-line wrapper you need. Everything runs locally in your browser — your list is never uploaded, stored or logged, so internal identifiers and private data stay on your device.
Frequently asked questions
Can I add only a prefix or only a suffix?
Yes. Fill in just one field and leave the other empty. For example, set only a suffix of , to turn a list into comma-terminated lines, or set only a prefix to indent or bullet every line.
What happens to blank lines?
With “Skip empty lines” enabled, blank lines are left untouched so the shape of your text is preserved. Turn the option off if you want the prefix and suffix added to every line, including empty ones.
How do I build a comma-separated list without a trailing comma?
Use the CSV / SQL preset to add " and ", to each line, then delete the comma from the last line. The output keeps line breaks so you can paste it straight into your code and tidy the final entry.
Is my list uploaded anywhere?
No. All processing happens in your browser with JavaScript. Nothing you paste leaves your device, so the tool is safe for confidential lists and works offline once the page has loaded.