Add Prefix & Suffix
Add a prefix and suffix to every line, with empty lines optionally skipped.
Browser onlyYour data never leaves this device.
Runs entirely in your browser. Your text never leaves this device and is never stored.
Details: Privacy policy
Input
One line per row. Nothing is stored.
Literal text, up to 200 characters.
Literal text, up to 200 characters.
Result
No text yet.
Paste lines and add a prefix or suffix above.
Add Prefix & Suffix wraps every line of a pasted block in the same literal text, which is the small mechanical edit that appears everywhere: quoting a column of values for a code snippet, turning a list into SQL parameters, adding a bullet or an identifier to each row, or putting a closing tag on lines that arrived without one. The page applies the prefix and the suffix per line rather than once to the whole block, so a thousand-line list needs no spreadsheet formula. Two choices keep it predictable. Empty lines are skipped by default, so a blank gap in the source does not become a line containing only the affixes; turning the option off applies them to every line including blanks. And the affix strings are literal, so a typed backslash and n remain two characters rather than turning into a newline the way they would in a programming language. Line endings normalize to LF, line content is never trimmed, and the result reports how many lines changed. Everything runs in your browser, and nothing is uploaded or stored. Because the affix is placed outside the existing line content, leading indentation and trailing spaces remain exactly where they were. The result reports skipped lines separately, so a wrapped list can be checked against the source count. Because the prefix is prepended literally, a value that already starts with the same characters is not detected or de-duplicated.
How to use Add Prefix & Suffix
- Paste the lines and type a prefix, a suffix, or both.
- Choose whether empty lines should be wrapped as well.
- Copy the wrapped text or clear to start over.
What you get
- The same lines with the prefix at the start and the suffix at the end.
- A count of changed lines and of empty lines skipped.
- LF line endings with line content otherwise untouched, ready to copy.
When to use Add Prefix & Suffix
- Quote every line of a pasted list so it can be pasted into a code array.
- Turn a column of values into SQL bind parameters by adding a colon to each line.
- Add a bullet and a closing tag to lines exported without them.
Frequently asked questions about Add Prefix & Suffix
Does it interpret escape sequences such as \n or \t?
No. Affixes are literal text; a backslash followed by n is written as those two characters, not converted into a line break or tab.
What happens to blank lines?
They are skipped by default. If you turn skipping off, a blank line receives the prefix and suffix, which can be useful for delimiters or padding.
Does it trim spaces inside my lines?
No. Existing leading and trailing spaces stay where they were; the prefix is placed before them and the suffix after them.
Is my text uploaded anywhere?
No. The wrapping runs in your browser, nothing is sent to a server, and nothing is stored after you close the page.
Tools related to Add Prefix & Suffix
- Add Line Numbers
Prefix every line with a counter: custom start, step, and separator.
- Case Converter — switch text between uppercase
Switch text between uppercase, lowercase, title, and sentence case.
- Remove Line Breaks
Join broken lines into flowing paragraphs or one continuous line of text.
- Remove Lines Containing — keep or remove whole lines that contain a specific word
Keep or remove whole lines that contain a specific word, phrase, or string.
- Remove Unwanted Characters
Delete specific characters, or strip everything that is not a letter or digit.
- Replace Smart/Straight Quotes — convert curly quotes to straight ones
Convert curly quotes to straight ones, or straight quotes to typographic quotes.
⚡Embed Add Prefix & Suffix on Your Site & Get Badge↓
Embed this in-browser tool into any blog, documentation, or dashboard. Includes an optional dofollow backlink badge to credit Tools Hub.
<iframe src="https://salaq.com/embed/text/add-prefix-suffix" title="Add Prefix & Suffix — Tools Hub" width="100%" height="640" style="border:0;border-radius:12px;overflow:hidden;max-width:100%;" loading="lazy"></iframe>
<p style="font-size:12px;color:#6b7280;margin-top:6px;font-family:system-ui,-apple-system,sans-serif;">Powered by <a href="https://salaq.com/tools/text/add-prefix-suffix" target="_blank" rel="noopener" style="color:#2563eb;text-decoration:underline;">Add Prefix & Suffix on Tools Hub</a></p>Feedback
Send feedback about this tool (placeholder — feedback collection is not wired up yet).