Prefix Suffix Adder - Add Text to Every Line

Prefix/Suffix Adder

Bulk add text to the beginning or end of every line.

Quick Presets:

0 lines
0 lines

A prefix suffix adder puts the text you choose at the start, the end, or both ends of every line in a list. Paste your lines, type a prefix and suffix or pick a preset, and click Apply to get a formatted list you can copy straight into ads, code, SQL or a spreadsheet.

What Are a Prefix and a Suffix in Text Formatting?

A prefix is text placed before the content of a line, and a suffix is text placed after it. In a list of three words, adding the prefix "https://" to each line changes every item into the start of a web address, and adding a comma as a suffix turns the list into comma-terminated items.

The tool treats every line as a separate item. It does not wrap your whole block of text once. It repeats the same prefix and suffix on each line, so a list of 500 keywords gets 500 identical additions in one pass. You can use only a prefix, only a suffix, or both together.

The prefix and suffix fields accept any characters you can type: brackets, quotes, tags, symbols, spaces, emoji or ordinary words. A trailing space in the prefix is kept, which matters for something like a bullet followed by a space.

How to Use the Prefix Suffix Adder

You can format a full list in under a minute. These steps follow the labels on the page.

  1. Paste your list into the Input Lines box, one item per line. The counter above the box shows how many non-empty lines it found.
  2. Type text in Prefix (add to beginning), Suffix (add to end), or both. You can also click a button under Quick Presets to fill both fields for you.
  3. Set the three checkboxes. Skip Empty Lines and Trim Lines First are on by default. Auto-Number Lines is off until you need it.
  4. Click Apply. The formatted list appears in the Output box, with its own line counter.
  5. Click Copy to copy the result. The button briefly shows "Copied!" to confirm.
  6. Click Clear to empty both boxes and start a new list.

One detail trips people up: choosing a preset only fills the fields. It does not change the output until you click Apply.

What Do the Quick Presets Do?

The presets are ready-made prefix and suffix pairs for formats people build most often. Each one fills the two fields and you can edit them afterward.

  • SQL IN(): wraps each line in single quotes and adds a comma after it, so a column of IDs becomes a list of quoted values.
  • JSON Array: wraps each line in double quotes with a trailing comma.
  • Google Exact: adds a square bracket before and after, the exact match format for Google Ads keywords.
  • Google Phrase: adds a double quote before and after, the phrase match format.
  • Add https://: puts https:// at the start of each line and leaves the suffix empty.
  • Bullet List: adds a bullet character and a space before each line.
  • Numbered: clears both fields and switches on Auto-Number Lines.

Worked Examples

Example 1: Google Ads exact match keywords

Suppose you paste these three lines:

  • running shoes
  • trail running shoes
  • buy running shoes online

Click the Google Exact preset, then Apply. The Output box shows [running shoes], [trail running shoes] and [buy running shoes online], one per line. Choosing Google Phrase instead gives the same three keywords wrapped in double quotes. The counter confirms 3 lines in and 3 lines out.

Example 2: A SQL list from a column of IDs

Paste 4 order IDs, such as 1042, 1043, 1044 and 1045. Click SQL IN() and Apply. Each line becomes a quoted value followed by a comma, like '1042',. Copy the result and paste it between the parentheses of your query. Remove the comma after the last item first, because the tool adds it to every line, including the final one.

Example 3: A numbered list with a prefix

Paste three tasks, turn on Auto-Number Lines, and type "Task: " as the prefix. The first line becomes "1. Task: Write brief", the second "2. Task: Review draft", and so on. The number always comes first, then your prefix, then the line, then your suffix.

How to Read and Act on the Results

Compare the two line counters first. If you pasted 200 lines and the Output counter says 200, nothing was dropped. If it shows fewer, Skip Empty Lines removed blank rows, which is usually what you want.

Then scan the first and last output lines. If the first and last lines look right, the middle almost always does too, because every line gets the same treatment. Check these common cases:

  • A stray space before the suffix: your input had trailing spaces and Trim Lines First was off. Turn it on and click Apply again.
  • A bare prefix and suffix on their own line: a blank line was formatted. Turn on Skip Empty Lines.
  • Numbers that skip or start at the wrong value: numbering counts only the lines that appear in the output. With Skip Empty Lines on, blank rows are not counted, so the sequence stays continuous.
  • A trailing comma on the last line: this is expected for the SQL and JSON presets. Delete that last comma by hand after copying.

Who Uses a Prefix and Suffix Tool, and When?

This tool fits any job where many lines need the same small change. Doing it by hand takes minutes, and doing it with a spreadsheet formula takes setup. Typical situations include:

  • PPC specialists converting a keyword list into exact or phrase match before upload. Google Ads uses square brackets for exact match and quotation marks for phrase match, and a list without symbols is treated as broad match.
  • Developers and analysts turning a column of values into a quoted, comma-separated list for a SQL IN clause, a JSON array or a code array.
  • SEO teams adding a domain or path to a list of slugs, for example putting https://example.com/ in front of 80 page slugs before a redirect map or crawl list.
  • Writers and editors turning plain lines into bullet or numbered lists for a document or CMS.
  • Content managers wrapping items in HTML, such as an opening list item tag as the prefix and a closing tag as the suffix.

If you need every value on one row instead of one per line, use the comma separating tool after you format your lines.

Best Practices, Common Mistakes and Troubleshooting

Clean the list before you format it

Duplicates and blank rows get formatted too. Run your list through a remove duplicate lines tool first so you do not upload the same keyword twice. If your input contains repeated words inside lines, the duplicate word remover can help as well.

Fix capitalization before wrapping

Brackets and quotes do not change letter case. If your keywords are in mixed case and you want lowercase, convert them with the change text case tool before adding symbols.

Keep one format per pass

If you need two different wrappers, for example quotes around some lines and brackets around others, run two separate batches and join them afterward. Each pass applies one prefix and one suffix to all lines.

Watch for invisible spaces

Spaces copied from spreadsheets or web pages can sit at the end of a line and push your suffix away from the text. Leave Trim Lines First on unless you deliberately need to keep leading indentation. Turn it off only when spaces are part of the data, such as code that must stay indented.

Verify before you upload or run

Paste the output somewhere you can test it, such as a small query or a sample of the ad group. To confirm that a transformation changed only what you intended, compare the before and after versions with a diff checker.

Combining numbering with other options

When you pick any preset other than Numbered, Auto-Number Lines is switched off. If you want both a preset and numbers, click the preset first, then tick Auto-Number Lines yourself before you click Apply.

Limitations to Know About

The tool adds fixed text to lines. It does not find and replace, remove characters, sort lines or change the content of a line itself. The numbering format is always a number, a period and a space, such as "7. ". It does not support letters, Roman numerals or custom starting numbers.

The tool splits your text wherever there is a line break, so a long paragraph with no line breaks counts as one line. If you need a list from a paragraph, put each item on its own line first. The input line counter also ignores blank lines, so it may show a smaller number than the total rows you pasted.

Finally, the tool does not check whether your result is valid for the system you paste it into. A list for SQL, JSON or Google Ads should still be reviewed before it goes live.

The prefix suffix adder saves you from editing lines one at a time, and it keeps formatting consistent across the whole list. Paste your lines into the box above, pick a preset or type your own text, and click Apply. For more utilities like it, browse the text utility tools collection.

Frequently Asked Questions

How do I add text to the beginning of every line?
Paste your list into Input Lines, type the text in the Prefix field, and click Apply. The tool repeats that text before each line in the Output box. Leave Skip Empty Lines on so blank rows do not receive a lone prefix.
Can I add a prefix and suffix at the same time?
Yes. Fill in both the Prefix and Suffix fields and click Apply. Every line gets your prefix before it and your suffix after it. For example, a bracket in each field turns running shoes into [running shoes].
How do I format keywords for Google Ads match types?
Use the Google Exact preset for exact match, which wraps each keyword in square brackets, or Google Phrase for phrase match, which wraps it in double quotes. Click Apply, then copy the output into your keyword list.
What does Auto-Number Lines do?
Auto-Number Lines adds 1., 2., 3. and so on at the very start of each output line, before your prefix. With Skip Empty Lines on, blank rows are not counted, so the numbering stays continuous.
Why does my list end with a trailing comma?
The SQL IN() and JSON Array presets add a comma suffix to every line, including the last one. Delete that final comma by hand after you copy the result, or the query or array may not be valid.
Is the prefix suffix adder free to use?
Yes, the prefix suffix adder is free and needs no sign-in. Paste your lines, set a prefix, suffix or preset, click Apply, then use Copy to take the formatted list wherever you need it.
Recommended

Explore VPN options

A VPN changes your network exit. It does not guarantee anonymity.

Hide Your IP Encryption Network coverage
Protect My IP Now