Add Prefix / Suffix to Each Line

Add the same text to the start or end of every line in a multiline block.

You can skip blank lines, insert after indentation, add before trailing whitespace, and use `{n}` for numbering.

Everything runs locally in your browser. Neither the source text nor the added strings are stored.

What this tool does

Use it for quote markers, bullet prefixes, trailing commas, tags, labels, or quick numbering. It gives you control over whether blank lines are skipped, whether the prefix goes before or after indentation, and whether the suffix should stay before trailing spaces.

How to use

  1. Enter the text you want to add at the start or end of each line.
  2. Turn on blank-line skipping or numbering if you need them.
  3. Paste your multiline text and the result updates automatically.
  4. Copy, download, or move the result back into the input for the next pass.

Examples

Turn lines into a quote block

Input

Alpha
Beta
Gamma

Output

> Alpha
> Beta
> Gamma

Add a comma to the end of each line

Input

apple
banana
orange

Output

apple,
banana,
orange,

Number lines while skipping blanks

Input

Task A

Task B
Task C

Output

1. Task A

2. Task B
3. Task C

Glossary

Prefix

Text added to the start side of each line.

Suffix

Text added to the end side of each line.

Skip blank lines

A setting that leaves blank or whitespace-only lines untouched.

FAQ

Can it skip blank lines?

Yes. Skip blank lines is enabled by default. In advanced options, you can also decide whether whitespace-only lines count as blank.

Can it insert after indentation?

Yes. Change Prefix insertion position to After indentation to keep the original leading spaces or tabs intact.

How do I add numbering?

Turn on Enable numbering and place `{n}` in the prefix or suffix. You can also set the start value, step, and zero-padding.

What is locale digits for?

It tries to format numbering with the current page language instead of plain ASCII digits. If the environment does not support it cleanly, the tool falls back to ASCII digits.

Is my text saved anywhere?

No. The source text and the added strings are not saved and are never sent to a server.

Related tools

Notes

  • This is an adding tool only. It does not try to remove existing prefixes or suffixes automatically.
  • The tool does not normalize Unicode, so combining marks and RTL text stay as close to the original as possible.
  • There is no share URL for this tool, so your text and added strings never end up in the address bar.