Text Cleaner Remove formatting & clean text Lorem Ipsum Generate placeholder text Word Count Count words, chars & reading time
Prefix & Suffix
Presets
0 lines
0 lines
How It Works
  1. 1Type a prefix and/or suffix in the left panel.
  2. 2Or click a preset — double quotes, comma, SQL list, etc.
  3. 3Paste your list in the Input box — result updates live.
  4. 4Click "Copy result" and paste anywhere.

What Is "Add Prefix / Suffix to Each Line"?

This tool lets you prepend text (prefix) or append text (suffix) to every line in a block of text — instantly, in your browser. Paste your list, type the characters you want to add, and the result appears on the right in real time.

Common uses: wrapping list items in quotation marks, adding commas for CSV or SQL, prepending a dash or bullet symbol, or appending a consistent trailing character to every line. The tool handles any number of lines with no performance issues.

How to Add a Prefix to Each Line

  1. Paste your text into the left input box — one item per line.
  2. Type your prefix in the "Prefix" field on the top left. For example, type - to add a dash bullet to every line.
  3. The result appears instantly in the right box. Copy it with the "Copy result" button.

To add a suffix instead, use the "Suffix" field. Both fields work simultaneously — fill in both to wrap each line on both sides.

Preset Buttons Explained

PresetPrefixSuffixExample output
Double quotes"""apple"
Single quotes'''apple'
Comma suffix(none),apple,
Dash prefix- (none)- apple
SQL list'','apple',
Parentheses()(apple)
Square brackets[][apple]

Common Use Cases

Prefix vs Suffix — What Is the Difference?

A prefix is text added to the beginning of each line. A suffix is text added to the end of each line. You can use both at the same time to wrap lines on both sides — for example, wrapping every line in double quotes requires both a prefix (") and a suffix (").

This is sometimes called "prepend" (add before) and "append" (add after) in programming contexts. The terms are interchangeable with prefix and suffix in everyday usage.

How to Prepend Text to Lines in Excel or Google Sheets

In Excel, you would normally use a CONCATENATE formula like =CONCATENATE("prefix", A1) or the & operator: ="prefix"&A1. For quick one-off transformations this tool is faster — copy your column, paste here, add your prefix, copy the result back.

In Google Sheets the equivalent is =CONCAT("prefix", A1) or ="prefix"&A1. Again, for one-time batch operations, this browser-based tool is often quicker than writing and deleting a formula column.

Does My Text Stay Private?

Yes. This tool processes your text entirely in your browser using JavaScript. Your text is never uploaded to any server and never leaves your device. This is especially important when working with sensitive data like customer IDs, API keys, or internal system paths.

Related Text Tools

Frequently Asked Questions

How do I add a prefix to each line of text?

Paste your text into the input box, type your prefix in the "Prefix" field, and the result appears instantly on the right. For example, type - to turn every line into a bullet point, or https://example.com/ to prepend a base URL to every slug.

Can I add both a prefix and a suffix at the same time?

Yes. Fill in both the Prefix and Suffix fields and the tool wraps each line with both simultaneously. For example, prefix " and suffix ", will wrap every line in double quotes and add a trailing comma — useful for building JavaScript arrays or SQL IN() lists.

What are the quick preset buttons for?

The preset buttons fill in common prefix/suffix combinations with one click: "Double quotes" wraps each line in "", "Single quotes" wraps in '', "Comma suffix" adds a comma to the end of each line, "Dash prefix" prepends a dash (bullet point), and "SQL list" wraps in single quotes with a trailing comma for SQL IN() clauses.

Does the tool skip empty lines?

Yes — enable the "Skip empty lines" toggle to leave blank lines untouched. By default, the prefix and suffix are added to every line including empty ones, which is useful when you want to preserve your exact line structure.

How do I prepend text to every line in Excel or Google Sheets?

Copy your column of values, paste them here, add your prefix in the Prefix field, then copy the result back into your spreadsheet. This is often faster than writing a CONCATENATE formula, especially for one-off tasks.

Can I use this to build a SQL IN() list?

Yes. Paste your list of values, click the "SQL list" preset (adds single quotes and comma suffix), then manually wrap the result in IN( ... ) in your query. Enable "Skip empty lines" to avoid stray commas from blank lines.

Does my text stay private?

Yes. All processing happens in your browser using JavaScript. Your text is never sent to any server — it never leaves your device.

From the Blog

See all guides →
Find & Replace
Add a Prefix or Suffix to Lines
How to bulk-add a prefix or suffix to every line in a list.
Find & Replace
Create a SQL IN List from Text
Turn a plain list into a properly formatted SQL IN clause in seconds.
Find & Replace
Find and Replace Text
Techniques for replacing text across files, editors, and online tools.