Add Prefix / Suffix to Lines

Enter a prefix, suffix, or both, then paste your text. Each line is updated live. Option to skip blank lines. Great for building SQL IN lists, CSS class names, or bash command batches. Runs in your browser.

Browser-local No signup required Text

Add the same prefix, suffix, or both to every line of text. The output updates immediately and can preserve empty lines unchanged or decorate them too, depending on the Skip empty lines option.

How to add a prefix or suffix to each line

  1. Paste or type one or more lines of text.
  2. Enter the prefix to place before each line, the suffix to place after it, or both.
  3. Leave Skip empty lines enabled if blank lines should remain untouched.
  4. Review the live output.
  5. Copy the transformed text when ready.

How line transformation works

The tool splits the input at newline characters and processes each line independently. For normal lines, the result is simply prefix + original line + suffix, so existing spaces inside the line are preserved.

When Skip empty lines is enabled, a line whose trimmed content is empty is returned unchanged. When it is disabled, even blank or whitespace-only lines receive the chosen prefix and suffix.

Privacy and limitations

The transformation runs entirely in the browser and the text is not intentionally uploaded. The tool applies one identical prefix and suffix to every processed line; it does not number lines, parse CSV columns, interpret escape sequences, or apply conditional rules based on line content.

Frequently asked questions

Can I add only a prefix?

Yes. Leave the suffix field empty.

Can I add only a suffix?

Yes. Leave the prefix field empty.

What happens to blank lines?

With Skip empty lines enabled, blank or whitespace-only lines are preserved unchanged.

Does it trim the original lines?

No. Non-empty lines keep their original content and spacing.

Can each line use a different prefix?

No. The same prefix and suffix are applied uniformly to all processed lines.