What is Add Prefix/Suffix?

Add Prefix/Suffix adds custom text to the start or end of every line. Use it to format lists, add numbering, wrap lines in HTML tags, or prep data for import.

Paste a list, one item per line, then set a prefix (text added to the start of each line) and a suffix (text added to the end). The output preview updates as you type, and a toggle lets blank lines pass through untouched. Copy the result or download it as a .txt file, useful when prepping data for spreadsheets, CSV, SQL, or HTML.

How to use

  1. Paste your multi-line text into the input area — each line will be processed individually.
  2. Enter the prefix text (added before each line) and/or suffix text (added after each line).
  3. The output updates as you type. Copy the result when you're done.

When to use

  • Wrapping a list of URLs in <a href="..."> tags or markdown bullet markers.
  • Adding a CSV-style quote and comma to each line before pasting into a SQL IN clause.
  • Prefixing a list of usernames with @ for a mention list or marketing roster.

Result

Given lines 'apple', 'banana', 'cherry' with prefix '- ' and suffix ' (fruit)', the output becomes '- apple (fruit)', '- banana (fruit)', '- cherry (fruit)'.

FAQ

Can I use tab or other invisible characters as prefix or suffix?
Yes. Whatever you type goes through verbatim. To insert a tab, paste one in (Cmd/Ctrl+V) since the input field swallows raw tab presses. Newlines inside the prefix or suffix work the same way — paste them in and each line gets the multi-line padding.
How do I number a list with this tool — like '1. apple', '2. banana'?
Turn on 'Auto-number each line' and pick a format: 1., zero-padded 01., bracketed [1], or parenthesized (1). The number increments down the list and you can set the starting value. It sits before any prefix you add, so '1. apple', '2. banana' is a couple of clicks away.
What happens to blank lines in my input?
By default a blank line is also prefixed and suffixed, so an empty row becomes '<prefix><suffix>'. Toggle 'Skip empty lines' to keep blanks blank, which is helpful when your source has paragraph breaks you want to preserve.
Can I wrap each line in HTML tags like <li>...</li>?
Yes. Set prefix to '<li>' and suffix to '</li>' and you'll get a clean ordered or unordered list ready to paste into <ul> or <ol>. The same pattern works for JSON-style quotes, SQL VALUES rows, or markdown bullets.
Does this tool keep the original line order?
Yes. The output preserves your input order line by line. The tool only adds text to the start or end — it never reorders, sorts, or de-duplicates. For those operations use a list-sorter or duplicate-remover after this step.

Related Tools