Skip to content

Add Prefix and Suffix to Every Line

Runs 100% in your browser — your text never leaves this page, and nothing is uploaded or stored.

This add prefix and suffix tool wraps every line in one pass — quotes, tags, bullets or code — turning a plain list into markup, arrays or checklists. Use it to add quotes to every line or wrap lines in html tags — turn a plain list into bullets, markup, arrays or checklists in one pass instead of editing line by line.

How to Use the Add Prefix and Suffix Tool

  1. Paste your list into the box — or press Load sample to wrap the example fruit list.
  2. Type the Prefix (added before) and Suffix (added after) — the fields arrive preset with <li> and </li>.
  3. Leave Skip empty lines ticked so blanks stay blank, or untick it to wrap every physical line.
  4. Read the wrapped list in the result box — it updates as you edit the list or either field.
  5. Copy the finished block into your code, page or document.

About this tool

Converting a plain list into code or markup is mind-numbing by hand: click to the start of a line, type, click to the end, type, repeat forty times. This tool wraps every line at once, turning a pasted list into an HTML list, a JavaScript array, a SQL IN clause, Markdown checkboxes or quoted CSV values. The classic jobs each have a pair. “<li>” and “</li>” for an HTML list — the fields arrive preset with exactly those. A quote mark in both fields for strings. “- [ ] ” as a prefix with an empty suffix for a Markdown task list. A comma as the suffix when values are being gathered into a single clause. Once you see the pattern, every list-shaped chore becomes a two-field job. Skip empty lines is on by default: a blank line passes through blank rather than becoming a lonely pair of tags, and only real content gets wrapped. Untick it when the empty lines must be wrapped too — when the structure has to stay strictly parallel, line for line. The result updates live as you edit the list or either wrapping field, so you can tune the pair and watch the whole list follow. It is one of those small tools developers and content editors reach for daily — and it runs entirely in your browser, so your lists never leave your device.

Worked example

Here is the sample list that comes with the tool, wrapped with the preset defaults: You paste
apples
oranges
bananas
grapes
You get
<li>apples</li>
<li>oranges</li>
<li>bananas</li>
<li>grapes</li>
The shipped defaults did the work: “<li>” before and “</li>” after every line, turning a shopping list into markup ready to paste inside a <ul>. Clear both fields and type a quote mark in each instead, and the same list comes back as four quoted strings.

Features

  • Any prefix, any suffix — tags, quotes, bullets, brackets, currency symbols, Markdown checkboxes.
  • Arrives preset for the classic job: <li> and </li> for instant HTML lists.
  • Skip empty lines by default, so blanks stay truly blank instead of becoming empty tag pairs.
  • Live results as you edit the list or either wrapping field — no button to press.
  • One pass for the whole list, however long: hundreds of lines wrap as fast as four.
  • Private by design: wrapping happens in your browser; your lists never leave your device.

Add Prefix and Suffix FAQs

What are typical uses?Wrapping values in quotes for code, turning lines into <li> items, adding “- [ ]” for Markdown task lists, appending commas for SQL, or adding currency symbols to prices.
Can I add only a prefix or only a suffix?Yes — leave either box empty and only the other is applied.
Does it add to empty lines too?By default, empty lines are skipped so they stay truly empty. Untick the option to wrap them as well.
Is my text private?Yes — everything is processed locally in your browser.
Can I add different text to alternate lines?No — every line gets the same prefix and suffix. That uniformity is the point of the tool; pattern-based edits belong in an editor or a spreadsheet.
Does it work on a single line of text?Yes — a one-line paste simply gets the prefix at its start and the suffix at its end. The tool is indifferent to list length.
What if my lines already start with spaces?They are kept — the prefix goes before everything on the line, spaces included, and the content of the line is never trimmed or altered.
More text sorting tools →