Smart Deals - promotions, discount codes and sales

Add Prefixes and Suffixes

Free online Add Prefixes and Suffixes that runs directly in your browser.

Secure (SSL)
Client-Side Processing
100% Free
Instructions
  • 1
    Enter data
    Enter content, paste text or load a file from disk.
  • 2
    Click the button
    The tool will immediately process your data in the browser.
  • 3
    Get the result
    Copy the finished text or save the file to your device.
function runTool() {
  return "Result ready in 0.1s";
}
25 characters

Rate this tool:

Related tools

Other tools you may find useful

Adding prefixes and suffixes to lines – bulk text editing

Need to add "https://" before each domain, single quotes around each SQL word, or HTML tags around each line? The tool adds a prefix and suffix to each line of pasted text - instantly, without loops or scripts.

add prefix suffix text prefix suffix each line bulk text editing online text wrapper

Practical applications

SQL INSERT: add "," and "'" around each value: prefix='', suffix=',. Class CSS: .class-{line}: prefix=.class-, suffix={}. HTML list:

  • {line}
  • : prefix=
  • , suffix=
  • . URL list: prefix=https://www., suffix=.com. Data import: prefix=INSERT INTO tbl VALUES(', suffix=');.

    Line editing modes

    Each line separately: separate prefix/suffix on each line. Selected lines: select which lines to modify. Skip empty: skip empty lines (do not prefix empty lines). Trim: remove whitespace before adding. Numbering: Add a line number as a prefix (1., 2., 3.).

    Escape and special characters

    The prefix/suffix can contain any characters. New line in prefix: \n. Tab: \t. SQL quotation marks: \' or \". Slash: \\ → replaced with \. "Raw" mode: no interpretation of escape sequences - insert verbatim.

    Connection to other operations

    Workflow: 1) Paste the list. 2) Trim white space. 3) Add a prefix/suffix. 4) Sort lines. 5) Remove duplicates. 6) Copy the result. The tool can integrate all these operations in a single interface with the pipeline.

    Frequently asked questions

    How to add a prefix to each line in Linux?

    sed: sed 's/^/PREFIX/' file.txt. awk: awk '{print "PREFIX" $0}' file.txt. Perl: perl -pe 's/^/PREFIX/' file.txt. With suffix: sed 's/$/SUFFIX/'. In the VS Code editor: Ctrl+H (regex), Find: ^(.*)$, Replace: PREFIX$1SUFFIX (with regex mode).

    How to do this in Excel/Google Sheets?

    Formula: ="PREFIX"&A1&"SUFFIX". For the entire column: drag the formula down. Result: text - use "Paste Special → Values" to delete the formula. Google Sheets: identical formula.

    How to generate SQL INSERT from data list?

    List: [email protected] / [email protected]. Prefix: INSERT INTO emails(email) VALUES('. Suffix: ');. Result: INSERT INTO emails(email) VALUES('[email protected]');. Alternatively: use the "CSV to SQL Converter" tool.

    How to add HTML tags to each line?

    Prefix:

  • . Suffix:
  • . List of items paste → all surrounded by tags
  • . Then manually add
      ...
    around. For automation: the tool can support "wrap with element" - select an HTML element and automatically add an opening and closing tag.
  • How to make CSS class list from word list?

    List: red/blue/green. Prefix: .color-. Suffix: { color: var(--color-X); }. Result: .color-red {...} / .color-blue {...}. Or prefix=.pill-{slug}, suffix= {};. Fast generation of utility classes.

    Related tools: text line sorter, duplicate remover and JSON API formatter.

    Install Webp.pl Have the tools in your own pocket!