Text tools

Prefix Suffix Lines

Add text before and after each line.

Processed in your browser

Text to add

Each included line becomes Prefix + original text + Suffix. Either field can be empty. Text is literal; Enter inserts a real newline. Blank means empty or only spaces and tabs.

Editor text: CRLF and CR become LF. Downloads use UTF-8.

Result

Choose your options, then add prefix and suffix.

How to use

  1. Set your prefix and suffix

    Enter literal text to add before and after each line. Choose whether to include blank lines.

  2. Add your text

    Type, paste, try the example, or open a UTF-8 file. File contents appear when you run the tool.

  3. Use your result

    Inspect, copy or download. Running again uses the same source; Use as input builds on the result.

Rules and common questions

What happens to blank and final lines?

Blank lines are included by default. Uncheck Include blank lines to leave empty lines and lines containing only ASCII spaces and tabs unchanged. Other whitespace, such as a nonbreaking space, counts as content. A final line ending does not create an extra line. Empty input stays empty; empty prefix and suffix leave all input unchanged. Counts refer to original lines, even when an insert adds new lines.

Can I insert more than one line?

Yes. Press Enter in Prefix or Suffix to insert an LF newline; pasted CRLF and CR also become LF in these fields. The prefix goes before the original content and the suffix before its original line ending. Inserts are applied once per original line, never recursively. Backslashes, dollar signs, braces, quotes and HTML-like text remain literal. Nothing is escaped for CSV, JSON, SQL or HTML.

Are Unicode and line endings preserved?

Letters, emoji, combining marks and original whitespace remain intact. Lines are separated by CRLF, LF, CR, Unicode line separator or paragraph separator. UTF-8 file downloads preserve each original ending and a leading BOM before the first prefix, with no added final ending. File names and MIME types do not restrict valid UTF-8 input; malformed UTF-8 gives an error. The editor and displayed result normalize CRLF and CR to LF. Editing or using the result as input switches to editor behavior; clipboard applications may also adapt endings. Downloads are plain UTF-8 text.

Is my text private? Can I cancel?

File decoding and processing run in your browser. Text and file names are not uploaded, logged or saved in browser storage. Cancel stops processing and keeps your input; Reset clears input, output and settings. There is no fixed text-length cap. Browser string and memory capacity still applies, and failures are reported. Very large editor previews may be less responsive.