Text-Converters

Prefix/Suffix Each Line

Quickly add custom text (a prefix or suffix) to the beginning or end of every line in your text. A simple tool for formatting lists, code, and data.

Your Text
Lines: 0
Formatted Text
About the Prefix & Suffix Tool

The Prefix/Suffix tool is a simple but powerful utility for bulk-editing lists of text. It allows you to add specific characters or strings to the beginning (prefix) and/or end (suffix) of every line in your input. This is incredibly useful for developers, data analysts, and anyone needing to quickly format lists for specific purposes, like creating full URLs or formatting SQL insert statements. The entire operation is done securely in your browser.

How to Use It

  1. Input Your List: Paste your line-separated text into the "Your Text" area.
  2. Set Prefix/Suffix: Type the text you want to add in the "Prefix" and/or "Suffix" input fields. You can use one, the other, or both.
  3. Choose Options: Decide if you want to "Ignore empty lines" to prevent prefixes/suffixes from being added to blank lines.
  4. Process: Click "Add Prefix/Suffix". The result will appear instantly on the right.

Common Use Cases

  • Creating Full URLs: Add `https://` as a prefix to a list of domain names.
  • Formatting SQL Queries: Wrap each item in a list with single quotes (`'`) for an `IN` clause.
  • Generating Code: Add opening and closing HTML tags around a list of items.
  • Data Cleaning: Add a consistent identifier or unit to every entry in a dataset.