Add Prefix & Suffix to Lines Online
Add any prefix or suffix to every line in your text at once.
What is Add Prefix & Suffix to Lines?
Adds a custom prefix and/or suffix to every line in your text. Perfect for wrapping lines in quotes, adding CSS selectors, inserting SQL column names, appending commas, and batch editing code or data.
Common Use Cases
Adding quote marks around every line for CSV/JSON, prepending tags for HTML lists, adding SQL parentheses, inserting CSS class prefixes, and batch editing code.
How It Works
Splits text on newlines, prepends the prefix and appends the suffix to each line, optionally skipping blank lines, then rejoins with newlines.
Frequently Asked Questions
Can I use tabs or special characters as prefix?
Yes. The prefix and suffix fields accept any text including spaces, tabs, and special characters.
Can I skip blank lines?
Yes. Enable "Skip blank lines" and blank lines will pass through without prefix or suffix.
Related Tools
Add Line Numbers
Add line numbers to every line of your text.
Sort Lines Alphabetically
Sort any list of lines alphabetically — A–Z or Z–A.
Find and Replace
Find text and replace it — with optional regex support.
Text Repeater
Repeat any text or character N times with a custom separator.