Writing Utility

Add Prefix and Suffix to Lines

Add the same text before, after, or around every nonblank line while preserving the original list for review.

Source lines

Enter one item per line. Blank and whitespace-only lines remain unchanged.

Line order, internal spacing, and blank-line placement are preserved.

Inserted before each nonblank line. Spaces are preserved.

Inserted after each nonblank line. Spaces are preserved.

Add source lines and a prefix, a suffix, or both.

Formatted result

The complete transformed text stays separate from the original source.

Total lines0
Lines changed0
Original characters0
Result characters0

No formatting has been run yet.

Runs in this browser. No upload by this tool. Your original lines remain unchanged. Review the result before sharing.

How to use Add Prefix and Suffix to Lines

  1. Paste or type the source text with one item per line.
  2. Enter the text to place before each nonblank line in Prefix.
  3. Enter the text to place after each nonblank line in Suffix.
  4. Leave either field empty when you only need a prefix or only need a suffix.
  5. Select Format lines and review the separate result.
  6. Copy the complete current result or download it as a local TXT file.

Spaces, punctuation, quotation marks, and other ordinary characters are inserted exactly as entered.

Examples

Add Markdown bullets

Use - as the Prefix to turn plain lines into a Markdown bullet list while keeping the source order.

Wrap every line in quotation marks

Use " as the Prefix and ", as the Suffix to prepare a quoted, comma-ended list.

Append commas to identifiers

Leave Prefix empty and use , as the Suffix to add a comma after every nonblank identifier.

Add a folder path before filenames

Use a path such as assets/ as the Prefix to prepare full relative paths without editing each filename.

Add @ before usernames

Use @ as the Prefix to convert a plain username list into mention-ready text.

Frequently asked questions

Does the tool change my original text?

No. The source remains in its original field. The tool creates a separate transformed result for review, copying, or download.

Can I use only a Prefix or only a Suffix?

Yes. Leave either field empty. At least one of the two fields must contain text before formatting can run.

What happens to blank lines?

Empty and whitespace-only lines remain unchanged and stay in their original positions. They do not receive the Prefix or Suffix.

Are spaces in the Prefix or Suffix preserved?

Yes. The tool does not trim either value. A trailing space in a Prefix or a leading space in a Suffix is inserted exactly as entered.

Can I wrap every line in quotation marks?

Yes. Enter an opening quotation mark as the Prefix and a closing quotation mark as the Suffix. You can include punctuation such as a comma in the Suffix.

Does this tool support regular expressions?

No. Prefix and Suffix values are treated as literal text. Programming symbols have no special matching or template behavior.

Are the lines sorted or cleaned?

No. The tool preserves line order and internal content. It does not sort, trim, deduplicate, capitalize, or otherwise clean the source.

Is my text uploaded?

No upload is performed by this tool. Formatting, copying, and TXT generation run in the browser.

Why should I review the result?

A literal Prefix or Suffix can add punctuation or spacing you did not intend. Review the complete output before replacing another source or sharing it.

Method and limitations

The tool normalizes CRLF and CR line endings to LF, then reads the source as an ordered sequence of logical lines. Every line containing at least one non-whitespace character becomes Prefix plus the original line plus Suffix.

Empty and whitespace-only lines are retained exactly in their original positions and do not count as changed lines. Trailing blank-line structure is preserved. The text inside each nonblank line is not trimmed or rewritten.

Copy text and Download TXT resolve the current Source, Prefix, and Suffix immediately before creating the artifact. The original source field is never overwritten automatically.

Limit: This version does not use regular expressions, numbering, line sorting, duplicate removal, CSV parsing, semantic interpretation, file upload, or batch processing.