Add Prefix & Suffix

Add custom prefixes and suffixes to each line of your text with the Add Prefix & Suffix Tool. Trim, ignore, or include empty lines, and preview results instantly. Easily copy, export, or import your data for streamlined formatting.

Paste your input above or import a file below.
No file chosen
Supported file types: .txt
Total items: 0
Options
Trim lines
Ignore empty lines
Add to empty lines

How to Use:

  1. Paste your text in the Input Text box.
  2. Enter your desired prefix and suffix in the Options section.
  3. Toggle settings such as Trim Lines or Ignore Empty Lines.
  4. View the result instantly in the Modified Output box.
  5. Click Copy Output or Export to File to use the result.
  6. Optionally, import a .txt file with the “Choose File” button.

What Add Prefix & Suffix Tool Can Do:

This tool adds a custom prefix and/or suffix to every line of your input. You can trim whitespace from each line before applying changes, skip empty lines entirely, or include them. With live preview, file import, and instant export, this tool is perfect for formatting text line-by-line.

Example:

Input:

apple
banana

cherry

With Prefix: [With Suffix: ]Options: Trim lines ON, Ignore empty OFF, Add to empty ON

Output:

[apple]
[banana]
[]
[cherry]

Common Use Cases:

Use this tool to wrap each line of text in symbols, code syntax, quotes, or markup. Ideal for JSON arrays, Markdown formatting, SQL value lists, or simple line-by-line decoration.

Useful Tools & Suggestions:

If you’re adding both prefixes and suffixes, Add Symbols Around Words gives you more control over styling great for creating labels or marked-up text. And once everything’s added, Highlight Words in Text can help you double-check the new format without having to scan line by line.