1. Home
  2. Writing & text tools
  3. Add Prefix and Suffix to Lines

Add Prefix and Suffix to Lines

Turn a plain list into quoted values, HTML list items, Markdown bullets or hashtags without editing each line by hand. Placeholders insert line numbers or repeat the line itself.

Free, no sign-up. Runs in your browser: nothing is uploaded.

How to use Add Prefix and Suffix to Lines

  1. Paste your lines.
  2. Type the prefix and suffix, or pick a preset.
  3. Copy the result.

Features

  • Presets for quotes, bullets, list tags, hashtags and URLs
  • {n}, {N} and {line} placeholders for numbers and wrapping
  • Skip empty lines and trim spaces first
  • Remove mode strips a prefix or suffix from every line

Supported formats

You can open

  • Typed or pasted text
  • TXT

You get

  • Copied text
  • TXT

Private by design

Your files are opened and processed by your browser on this device. They are never uploaded to openWorkstand or anyone else, so the Add Prefix and Suffix to Lines is safe for contracts, IDs, photos and work documents. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • Very large files are limited by your device’s memory; on a phone, split huge files into smaller parts first.

Guide

Adding text to the start and end of every line

Copying a list out of a spreadsheet gives you bare lines. Most places you want to paste it need a little more: quotes around each value for code, a dash for Markdown, tags for HTML, a hash for social media. Adding that by hand is tedious and error-prone on a hundred lines. Type the text once and it goes on every line.

Quick recipes

The preset chips cover the common cases. “Quotes,” wraps each line as “value”, for an array or a list of strings in code. “- bullets” makes a Markdown or plain-text list. “li tags” produces <li>value</li> lines ready to drop between <ul> tags. “#hashtags” turns keywords into tags, and “https://” turns a list of domains into full addresses. “Numbered” uses the line number placeholder described below. Every preset only fills in the two boxes, so you can adjust them before copying.

Placeholders for numbers and the line itself

Three placeholders work in both the prefix and the suffix. {n} inserts the line number, starting from the number you choose. {N} inserts the same number padded with zeros to the width of the largest number, so a list of 120 lines is numbered 001 to 120 and sorts correctly as text. {line} repeats the content of the line, which lets you wrap a value twice, for example a prefix of <a href=" and a suffix of ">{line}</a> turns example.com into a link whose text is the address. For numbering alone, Add Line Numbers offers more formats.

Empty lines and stray spaces

With “Skip empty lines” on, blank lines in your list are left alone and are not counted, so paragraphs or groups stay visually separated. “Trim spaces first” removes spaces at the start and end of each line before the prefix and suffix are added, which avoids results like “ value “ that look right but fail in code or imports.

Removing a prefix or suffix

Switch to Remove to undo the job: type the exact text to strip from the start, the end or both. Only lines that start or end with that text change, and the counter shows how many did. This is useful for removing “> ” quote marks from a copied email, “- ” from a Markdown list or a domain from a list of addresses.

Typical uses

Developers wrap IDs in quotes and commas for an array or an enum. Marketers add UTM-free campaign links to a list of pages, or a hashtag to a keyword list. Teachers add “Q:” to a list of questions before printing. Anyone moving a list between apps can add the separators the next app expects. For a comma-joined result on a single line, Column to Comma-Separated List is the better fit.

Private by design

The lines you paste are processed in your browser and never uploaded. They stay in this tab only, so closing the tab or pressing Clear removes them.

Checking the result

Because the prefix and suffix are added literally, a single stray space shows up on every line. Look at the first and last few lines of the result before copying: a quote should sit right against the value, and a tag should close on the same line. If the source came from a spreadsheet, cells sometimes carry invisible trailing spaces, which “Trim spaces first” removes. When the result is meant for code, paste it into your editor and let its syntax highlighting confirm that every quote is closed.

Tidy the list first with Remove Duplicate Lines or Sort Text Lines, and make wider changes with Find and Replace.

Checked against the current version of the Add Prefix and Suffix to Lines on .

Troubleshooting

The file does not open

Check that it is one of the supported formats above and opens in another app. Damaged files and password-protected PDFs cannot be read until they are repaired or unlocked.

It is slow or stops on a very large file

Everything runs on your device, so speed depends on its memory. Close other tabs, use a computer rather than a phone, or split the file into smaller parts first.

The download did not start

Look for your browser’s download bar or icon. Some browsers ask once before a site may download files; allow it and click the button again.

Frequently asked questions

How do I add a comma to the end of every line except the last?

Add the comma as a suffix, then delete the final comma by hand, or use Column to Comma-Separated List, which joins the lines with commas and never leaves one dangling at the end.

Is the prefix added to blank lines?

Not while “Skip empty lines” is on, which is the default. Blank lines then stay blank and are not counted when {n} numbers the lines, so the numbering has no gaps.

Can I remove text that differs from line to line?

Remove mode only strips the exact text you type. For varying text, such as different numbers or dates at the start of each line, use Find and Replace with a regular expression like ^\d+\s.

How do I put quotes and a comma around every line?

Pick the “quotes” preset: the prefix is " and the suffix is ", so each line becomes "item",. For a ready-made SQL or JSON list, Column to Comma-Separated List also handles quotes inside values.

Can I number the lines at the same time?

Yes. Put {n} in the prefix, for example “{n}. ”, and choose the first number. {N} pads the number with zeros so 1 becomes 001 in a list of a hundred lines or more.

Keep working with the result

After you download, choose “Save to Workstand” to keep the result in a folder on your computer, attach it to a project and create a follow-up task. It is saved by your browser, not uploaded.