← All tools
// TEXT

Add Line Prefix / Suffix online

Add a custom prefix and/or suffix to every line of text — bulk line editing.

Add Line Prefix / Suffix logo
by
CHUNKY
MUNSTER
Prefix: Suffix:
TEXT INPUT0 LINES
OUTPUT0 LINES

About Add Line Prefix / Suffix

Quickly wrap every line with a custom prefix and/or suffix. Useful for generating SQL IN lists, markdown bullet points, quoted CSV values, HTML tags, or any structured text format. Runs entirely in your browser.

How to Use the Add Line Prefix / Suffix Tool

  1. Paste your list — one item per line — into the text input.
  2. Type the text you want at the start of each line in the Prefix box, and the text you want at the end in the Suffix box. Either may be left blank.
  3. Press Add Prefix / Suffix. Every line is wrapped in a single pass and the line counts update.
  4. Click Copy to send the result straight to your clipboard.

Wrapping a list of values with the same surrounding text is one of those jobs that is trivial in code but tedious in a text editor. This tool turns a column of identifiers into a SQL IN ('a','b','c') list, a list of words into a Markdown bullet list, or a CSV column into JSON-quoted strings — by pasting and clicking once.

How the Add Line Prefix / Suffix Tool Works

The input is split on newlines, each line is concatenated as prefix + line + suffix, and the lines are joined back with newlines. Empty lines stay empty-but-wrapped, and the prefix/suffix strings are taken literally — no escaping, no trimming, no template syntax — so what you type is exactly what you get on every row.

Frequently Asked Questions

How do I build a SQL IN-list of quoted strings?

Paste one value per line, set the prefix to a single quote and the suffix to a single quote followed by a comma. Wrap the whole result in parentheses and remove the trailing comma — you have a valid IN-list.

Are blank lines preserved in the output?

Yes. Every line of input — including empty ones — receives the prefix and suffix. If you need to drop blanks first, run the input through the Remove Empty Lines tool.

Does it strip whitespace at the start or end of each line?

No. The tool concatenates prefix + line + suffix verbatim. If your lines have stray spaces or tabs, clean them with the Text Cleaner first.

Can I use only a prefix or only a suffix?

Yes — leave the other field empty. The empty value adds nothing, so you can prepend or append independently in a single click.

See also Remove Empty Lines, Text Cleaner, and the List Operations tools for related multi-line edits.