When is adding a prefix or suffix useful?
Adding a prefix or suffix to every line is a common text manipulation task with many practical uses: wrapping each filename in a path (dist/index.html), adding a quote character to each line of a poem, turning a list of IDs into SQL query placeholders (?), adding a trailing comma to every line for JavaScript arrays, or prefixing every CSS class with a namespace. Doing this manually with find-and-replace requires regex knowledge; this tool makes it a simple form fill.
How to use this tool
- 1 Paste your lines into the Input panel.
- 2 Type your desired prefix in the Prefix field — it will be prepended to every line.
- 3 Type your desired suffix in the Suffix field — it will be appended to every line.
- 4 Toggle Skip blank lines to leave empty lines unchanged. Toggle Trim whitespace to strip leading/trailing spaces before adding.
Frequently asked questions
Can I add both a prefix and a suffix at the same time?
Yes — both fields are independent. Fill in one, both, or neither. Lines update the moment you type in either field.
What does "Skip blank lines" do?
When checked, blank lines (or whitespace-only lines when Trim is also on) are passed through unchanged — no prefix or suffix is added to them. This preserves paragraph spacing in prose.
Can I use special characters like quotes or backslashes?
Yes — the prefix and suffix are treated as literal text strings, not regex patterns. A backslash, quote, or angle bracket in the field is inserted exactly as typed.
How do I wrap each line in quotes?
Type " into both the Prefix and Suffix fields. Every non-blank line will become "original line".
Is my data sent anywhere?
No. All processing happens in your browser. Nothing is uploaded.