Prefix and Suffix Lines

Add a prefix and a suffix to every line.

Use this tool

Result

The result appears in this panel after you run the tool.

About this tool

The page walks the lines and concatenates the prefix, the line, and the suffix. It does not trim the line first. Use Trim Text when the edges should be removed instead.

An empty prefix or suffix is allowed. The other one is still applied.

How to use it

  1. Paste the text, one item per line. An empty box still produces a line if you apply the edit.
  2. Enter the prefix, the suffix, or both.
  3. Apply the edit. Every line gets the same addition.

Limitations

The same literal ends on every row

Every row, including a blank one

The prefix and the suffix are pasted onto each line after newlines are normalized. They are not a template. There is no placeholder for the line number, the date, or the original text beyond the fact that the original line sits between the two additions. An empty prefix leaves the start untouched. An empty suffix leaves the end untouched. A blank line in the middle still receives both, so you can get a row that is only the prefix plus the suffix. That is useful for a marker and surprising if you thought blank lines would be skipped.

Quotes, commas, and list markers

Adding “- “ to each row makes a Markdown list only if the rows were already the items. It does not wrap a paragraph. Adding a comma as a suffix makes a naive CSV column only when the row itself contains no comma and no quote. This page does not escape CSV. If the rows are already quoted fields, a suffix lands after the closing quote and the file stops being valid CSV. Use a CSV tool when the structure matters.

One edit, not a per-line rule

You cannot say “prefix only the lines that start with a digit.” Every line is changed the same way. Do the selection with another tool first, or accept that the header row gets the marker too. The additions are literal, so a backslash is a backslash, not an escape. A newline typed into the prefix box, if the control allows it, would split rows further. Keep the prefix and suffix on one line unless you mean to change the row count.

Privacy

Your input is processed in your browser and is not uploaded to UtilChain. File names, text, and results are not sent to analytics.