Tools Hub

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

  1. Paste the lines and type a prefix, a suffix, or both.
  2. Choose whether empty lines should be wrapped as well.
  3. 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.

⚡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.

Height:
<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).