Add Prefix and Suffix
Paste a list of items and add the same prefix or suffix to every line. Wrap each item in quotes, prepend a hashtag, append a domain, number lines, or build any other bulk-prep transformation in one click.
How to add prefix and suffix to a list
1. Paste your list
Drop the items in the input box, one per line. Names, URLs, file paths, tags, IDs - anything where you want to add the same wrapper to every entry.
2. Type the prefix and suffix
The prefix is added to the start of every line. The suffix to the end. Leave either empty if you only want one side. Spaces in the prefix/suffix are preserved as typed.
3. Or pick a preset
Quick presets cover the most common patterns: quote-wrap ("..." with comma), hashtag (#...), bullet (- ...), markdown link ([...]()), auto-number (1. ...).
4. Tune options and copy
Toggle blank-line skipping, whitespace trimming, dedup, and auto-numbering in the sidebar. The output updates live. Copy or download when you have what you need.
When you need a prefix/suffix tool
Adding the same wrapper to every line of a list is a routine pre-processing job.
Quoting for SQL IN clauses
A list of IDs needs to become 'id1', 'id2', 'id3' for a SQL IN clause. Preset Quotes wraps each in "..." and appends a comma; do a small find-replace to swap double quotes for single.
Adding a base URL to every relative path
A list of relative paths becomes a list of full URLs by adding https://example.com as the prefix. Inverse operation: strip the prefix with word replacer.
Building a hashtag list
Plain word list to hashtag list: prefix #. Preset Hashtag handles this in one click. Combine with Drop duplicates to clean up a tag set.
Numbering a list
Turn on Auto-number to prepend 1., 2., 3. to every line. Useful for ordered lists, ranking, or any case where position matters.
Building bullet-pointed text for chat
Preset Bullet adds - to every line, ready to paste into chat or markdown.
Quick presets explained
Quotes preset
Prefix: " (double quote). Suffix: ", (double quote + comma). Output is a comma-separated quoted list ready to paste into a SQL IN clause, a JavaScript array, or any quoted-list format. Trim the trailing comma after pasting.
Hashtag preset
Prefix: #. Suffix: empty. Each line gets a hashtag prefix, ready for social media tagging.
Bullet preset
Prefix: - . Suffix: empty. Adds markdown/chat-friendly bullet points to every line.
Numbered preset
Turns on the auto-number toggle. Each line gets 1., 2., 3. etc. prepended. Useful for ordered lists.
Markdown link preset
Prefix: [. Suffix: ](). Output is a list of empty markdown link templates. Fill in the URL inside each () manually or with find-replace.
Auto-numbering vs prefix-numbering
Two ways to number a list. The difference matters.
Auto-number toggle
Generates 1., 2., 3. dynamically based on output position. If you turn on dedup and remove duplicates, numbering stays sequential in the output. Numbering ignores the prefix field (so a prefix of - gets overridden).
Prefix field with numbers
Type a literal prefix like 1. and every line gets that exact string. Not what you usually want; better to use the auto-number toggle.
Edge cases and gotchas
Empty lines
With Skip blank lines on (default), empty lines are removed before prefix/suffix is added. Turn it off if you need to add a prefix to every line including empty ones (rare).
Trailing whitespace
With Trim whitespace on (default), leading and trailing spaces on each line are stripped before prefix/suffix is added. This avoids invisible spaces leaking into the wrapper. Turn it off if positional whitespace matters.
Duplicates after wrapping
Dedup runs on the unwrapped lines, before prefix/suffix is added. Two lines that are identical pre-wrap are treated as duplicates even if the wrapper would make them appear different.
Combining with other tools
Prefix/suffix is a common middle step in a longer pipeline. See also: Remove Duplicates Online.
Sort then prefix
Sort a list with the alphabetical sorter, then add the prefix/suffix for a clean ordered output.
Convert CSV to wrapped list
Use comma-to-newline to split a CSV into lines, then add a prefix/suffix for a wrapped per-item list (e.g., quoted, hashtagged, numbered).
Extract then prefix
Use link extractor or number extractor to pull a list out of prose, then prefix/suffix the result.
Replace then prefix
Use word replacer to transform the items, then prefix/suffix the result for the final format.
Related tools
Frequently asked questions
Can the prefix or suffix contain spaces?
Yes. Whatever you type in the prefix/suffix fields is added verbatim, including leading or trailing spaces. The bullet preset uses - (dash + space) as the prefix, for example.
How do I add a quote character?
Just type it into the prefix or suffix field. For double quotes, type " (the standard double quote). For single quotes, type '. The Quotes preset wraps each line with double quotes and a trailing comma in one click.
Why does the auto-numbered output ignore my prefix?
Auto-number overrides the prefix field. The numbered prefix (1., 2., 3.) is added in place of whatever you typed. Turn off the auto-number toggle if you want your custom prefix used instead.
Does the text leave my browser?
No. The tool runs entirely in your browser using JavaScript. Your input and the output are never sent to our servers and are not logged.
How do I remove a prefix that I added by mistake?
Use the word replacer with find = your prefix, replace = empty. Or paste the output back into this tool's input box and run it again with prefix/suffix empty (no-op transformation that leaves the lines untouched).
Can I add different prefixes to different lines?
No. This tool applies the same prefix and suffix to every line. For conditional prefixes (e.g., add ERROR: to lines with fail and INFO: to others), use a scripting tool or pipe through multiple passes via the text filter.
How does dedup interact with the wrapper?
Dedup runs before the prefix/suffix is added, so duplicates are detected on the unwrapped lines. Two lines that are identical pre-wrap are treated as duplicates. This is usually what you want; the wrapper is just formatting.
Is there a limit on input size?
No hard cap. The tool handles multi-megabyte inputs. The transform is O(n).
More wordcounter.ai tools
Other tools you might find useful.