UtilityKit

500+ fast, free tools. Most run in your browser only; Image & PDF tools upload files to the backend when you run them.

Text Prefix / Suffix Adder

Add a custom prefix, suffix, or both to every line of text at once — great for bulk formatting, code generation, and data prep.

About Text Prefix / Suffix Adder

The Text Prefix / Suffix Adder takes a block of text and adds a specified prefix string, suffix string, or both to the beginning and end of every line simultaneously. This is a highly practical text processing utility for developers and data workers who need to wrap each item in a list with quotes, add SQL commas, prepend indentation, add Markdown list markers, wrap lines in HTML tags, or perform any similar per-line transformation in bulk. Skip-blank-lines mode lets you apply changes only to non-empty lines, avoiding unwanted markers on empty lines between paragraphs.

Why use Text Prefix / Suffix Adder

  • Processes every line in a large block of text simultaneously.
  • Skip-blank-lines option keeps paragraph spacing clean.
  • Supports any prefix/suffix — quotes, brackets, tags, commas, and more.
  • Instant live preview as you type the prefix or suffix.
  • Eliminates manual editing for line-by-line bulk transformations.
  • Works with any printable character — no escaping or quoting needed.

How to use Text Prefix / Suffix Adder

  1. Paste your text (one item per line) into the input area.
  2. Enter the desired prefix in the Prefix field and/or a suffix in the Suffix field.
  3. Toggle 'Skip blank lines' if you want empty lines left unchanged.
  4. Copy the processed output from the result area.
  5. Use the live preview to verify the prefix/suffix appears exactly where you expect.
  6. Toggle 'Skip blank lines' if you have paragraph-style input where empty lines should remain empty.
  7. For complex transformations, run a second pass — e.g. first add quotes, then add commas as suffix.

When to use Text Prefix / Suffix Adder

  • Wrapping each item in a list with SQL single quotes for a query.
  • Adding a leading hyphen to every line to create a Markdown list.
  • Prefixing each line with a tab for code indentation.
  • Adding <li> and </li> HTML tags around each item in a list.
  • Generating SQL INSERT VALUES from a list of names by adding ('quotes,').
  • Preparing CSV cells from a column of values with prefix and suffix wrapping.

Examples

SQL list

Input: Alice Bob Carol

Output: ('Alice'), ('Bob'), ('Carol'),

Markdown bullets

Input: Apples Oranges Bananas

Output: - Apples - Oranges - Bananas

HTML list items

Input: First Second Third

Output: <li>First</li> <li>Second</li> <li>Third</li>

Tips

  • For SQL INSERTs, prefix with "('" and suffix with "')," to wrap each value in single quotes followed by a comma.
  • For HTML lists, prefix with '<li>' and suffix with '</li>' to create proper list items.
  • For Markdown bullet lists, prefix with '- ' (hyphen space) — no suffix needed.
  • When generating shell commands, prefix with the command name (e.g. 'rm ') so each line becomes a self-contained command.
  • Combine with Find & Replace for more complex transformations that depend on per-line content.

Frequently Asked Questions

Does it add the prefix/suffix to blank lines too?
By default yes, but you can toggle 'Skip blank lines' to leave empty lines untouched.
Can I use special characters like quotes or backslashes in the prefix/suffix?
Yes. Any printable character can be used as part of the prefix or suffix string.
Is there a line count limit?
No. The tool handles any number of lines — processing is instantaneous even for thousands of lines.
Can I add a newline inside the prefix or suffix?
The prefix and suffix fields are single-line inputs, so embedded newlines are not supported. Each line gets the literal text you enter.
How is 'line' defined?
Lines are delimited by newline characters (\n). Windows-style \r\n line endings are normalized automatically.
Can I use a tab character as the prefix?
Tab keys typically don't enter into single-line inputs. As a workaround, paste a tab character from elsewhere or use a fixed number of spaces.
Will it handle very long lists?
Yes. Thousands of lines are processed instantly because the operation runs locally in your browser.
Does it strip trailing whitespace from lines?
No — the tool only adds prefix/suffix. To trim whitespace first, use the Whitespace Cleaner tool, then this one.

Explore the category

Glossary

Prefix
Text added at the beginning of a line.
Suffix
Text added at the end of a line.
Line
A sequence of characters terminated by a newline (\n) or end of input.
Bulk processing
Operating on many items at once instead of one by one.
Whitespace
Invisible characters like spaces, tabs, and newlines that separate visible content.
Line ending
The character or sequence used to terminate lines — \n on Unix, \r\n on Windows.