Wrap every line with chosen text

Editors and data teams use Add prefix and suffix to clean or adapt many lines before pasting them somewhere else.

Wrap every line with chosen text and get clean lines ready to paste or process. Use it for free in your browser, with no account required.

How to use

  1. Type the prefix you want on the first line and the suffix on the second.
  2. From the third line onwards, paste the text whose lines should be wrapped.
  3. Run the action and every line of the block gets the prefix in front and the suffix behind.
  4. A removal action is also available for text that already carries these additions.
  5. The erase button clears the fields once you are done.

Example

The sample uses the prefix pre- and the suffix -post, followed by two lines of text. After running it, check that both lines come back wrapped in the same way and that no stray empty line slipped into the output, because a blank line is processed like any other line.

Input

pre-
-post
first line
second line

Output

pre-first line-post
pre-second line-post

Limits and formats

Where processing happens

Both the add and the remove actions run inside your browser: the block of text you paste stays there for the whole operation and no copy travels anywhere else. The output appears at once and can be cleared in one step when you are done.

Frequently asked questions

What happens to blank lines in my text?

They are processed like any other line, so a blank line can come back carrying the prefix and the suffix side by side. Scan the result before pasting it elsewhere, especially if your text contains double line breaks.

Can I strip a prefix that is already in a file?

Yes, the interface offers a removal action alongside the add action. Test it on a short extract first, because removal works on the text exactly as written, with no interpretation of what surrounds it.

Are leading spaces kept?

Whatever you type is reused as it stands, prefix and suffix included. If you leave a space before the prefix, that space shows up in the result, so read your entry once before running the tool.

Tools in the same category