Add Prefixes and Suffixes
Free online Add Prefixes and Suffixes that runs directly in your browser.
-
1Enter data
Enter content, paste text or load a file from disk. -
2Click the button
The tool will immediately process your data in the browser. -
3Get the result
Copy the finished text or save the file to your device.
return "Result ready in 0.1s";
}
Rate this tool:
Related tools
Other tools you may find usefulAdding 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.
Practical applications
SQL INSERT: add "," and "'" around each value: prefix='', suffix=',. Class CSS: .class-{line}: prefix=.class-, suffix={}. HTML list:
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:
- ...
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.