Add Prefix / Suffix
Add the same text to the start and/or end of every line — handy for quoting, bullets, SQL lists and markup.
Paste or drop
Paste text below, or drop a file instead.
Choose an output
Add the same text to the start and/or end of every line — handy for quoting, bullets, SQL lists and markup.
Fine-tune
Optional — sensible defaults are already set.
About Add Prefix / Suffix
Add the same text to the beginning, the end, or both ends of every line at once. It saves a lot of manual editing when you need to quote a list for code, turn lines into bullet points or wrap each line in markup.
When it helps
- Turning a list of IDs into a SQL IN clause by adding a single quote before and a quote plus comma after each one.
- Adding '- ' or '> ' to make Markdown bullets or quoted replies.
- Wrapping each line in HTML tags, such as <li> and </li>.
- Adding a common URL or folder path in front of a list of file names.
Tips
- \t and \n are converted to a tab and a new line, so a suffix of \n adds a blank line after each line.
- Blank lines are skipped by default so you don't get stray bullets or empty quotes. Turn that off if every line must be changed.
- Remember that the last line also gets the suffix. When building a comma-separated list, delete the trailing comma, or use the join lines tool instead.
Good to know
Quick answers about add prefix / suffix in your browser.
Set the prefix to a single quote and the suffix to a single quote followed by a comma. Each line becomes 'value', ready to paste into code or SQL. The join lines tool can do the same and put everything on one line.
The tool changes every line, apart from blank lines when 'Skip empty lines' is on. To target specific lines, use find and replace with a regular expression that matches only those lines.
Yes. There is no sign-up, no watermark and no limit on how many files you process.
No. Files are read and processed locally in your browser, so they never leave your device.
Related tools
Part of the Text Tools collection.