Add Prefix / Suffix to Lines

Add text to the start or end of every line.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

The Add Prefix / Suffix to Lines tool adds text to the start and the end of every line in a list at once. It saves the repetitive work of manually editing each row when you need to quote values, wrap items in tags, comment out code, or build delimited lists. Paste your lines, type the prefix and suffix, and the result updates instantly.

How it works

The tool splits your input into individual lines and rebuilds each one as prefix + line + suffix. Both fields are independent: leave the prefix empty to only append a suffix, leave the suffix empty to only prepend, or fill both to wrap each line. Two options refine the result:

  • Skip empty lines — by default, blank or whitespace-only lines are left untouched so you do not get stray prefixes on empty rows. Turn it off to apply the prefix and suffix everywhere.
  • Trim each line first — strips leading and trailing whitespace from each line before wrapping it.

Example

To build a SQL list from three names, set the prefix to ' and the suffix to ',:

Alice
Bob
Carol

becomes:

'Alice',
'Bob',
'Carol',
SettingValue
Prefix'
Suffix',
Result line'Alice',

Everything runs in your browser — nothing is uploaded.

Ad placeholder (rectangle)