Add Prefix and Suffix to Text
Add a prefix and/or suffix to every line of your text at once. Great for building lists, HTML, CSV rows or code. Runs entirely in your browser.
What is the Add Prefix and Suffix to Text?
Add Prefix and Suffix lets you attach text to the beginning and end of every line in a block of text at the same time.
- Add a prefix, a suffix, or both in one pass
- Optionally skip blank lines to keep spacing intact
- Live preview updates as you type
- Copy to clipboard or download as a text file
- Works fully offline — nothing is uploaded
How to use the Add Prefix and Suffix to Text
- 1
Paste or type your text, one item per line, into the input box.
- 2
Enter the prefix you want at the start of each line and the suffix for the end.
- 3
Optionally enable “Skip blank lines” so empty rows are left untouched.
- 4
Copy or download the transformed result.
About the Add Prefix and Suffix to Text
Add Prefix and Suffix lets you attach text to the beginning and end of every line in a block of text at the same time. Paste a list, type the prefix and suffix you want, and each line is wrapped instantly — perfect for turning plain lists into HTML tags, CSV rows, quoted strings or command-line arguments.
It is built for developers, writers and data wranglers who need to reformat many lines without editing each one by hand. You can skip blank lines so empty rows stay empty, keeping your output clean and predictable.
Everything happens 100% locally in your browser. Your text is never uploaded to a server, so even sensitive lists stay private and the tool keeps working offline.
Frequently asked questions
How do I add the same word to the start of every line?
Paste your text, type the word into the prefix field, and every line is updated at once. Leave the suffix field empty if you only need a prefix.
Can I add a comma to the end of each line?
Yes. Put a comma in the suffix field and each line will end with a comma — handy for building code arrays or CSV columns.
Will blank lines get a prefix too?
Only if you want them to. Enable the “Skip blank lines” option and empty lines are left exactly as they are.
Is my text uploaded anywhere?
No. All processing runs in your browser using JavaScript, so your text never leaves your device and the tool works offline.
Guides for Add Prefix and Suffix to Text
Related tools
Join Lines
Merge multiple lines of text into a single line using a comma, space or custom delimiter. Trim each line and skip blanks. Runs 100% in your browser.
Wrap Text in Quotes
Wrap each line or the whole text in single, double or custom quotes, with an optional trailing comma. Perfect for building code lists. 100% in-browser.
Add Line Numbers to Text
Add sequential line numbers to any text online. Choose the start number, zero-padding and separator (dot, colon, paren or tab). Copy the result instantly.
Find and Replace Text
Bulk find and replace text online with case-sensitive, whole-word and regex modes. See the replacement count and copy the cleaned result instantly.
Sort Lines
Sort lines of text alphabetically A to Z or Z to A, by length, numerically, or shuffle randomly. Options to ignore case and remove duplicates.