Add prefix or suffix to each element of a list
Add the same prefix or suffix to every line
Add a prefix or suffix to each line of a list quickly and browser‑side. This is an atomic operation — it only prepends or appends text. Prepare or clean your input with other PicoToolkit tools and then run this one to finish the task.
How to use
- Paste your list (one item per line) into the editor.
- Enter the text to add as a prefix or as a suffix; choose which side to apply it to.
- Preview the first few lines, then apply the change and copy or download the result.
- If you need to prepare input first (trim, remove empty lines, dedupe), run those steps before applying the prefix/suffix — see “Prepare input” below.
Common use cases
- Bulk rename filenames: add a date or project tag to every filename in a list.
- Prepare identifiers: prepend a namespace (eg. PROD‑, TEST‑) to product or user IDs.
- Build URL paths or query values: append a path segment or file extension to each path.
- CSV / SQL preparation: add quotes, commas or SQL fragments around each value for quick imports.
Examples
- Filenames
Input:
Add prefix:report.pdf invoice.pdf notes.pdf2024-01-
Result:2024-01-report.pdf 2024-01-invoice.pdf 2024-01-notes.pdf - IDs for import
Input:
Add suffix:1001 1002 1003-SKU
Result:1001-SKU 1002-SKU 1003-SKU - URL paths
Input:
Add suffix:/images/photo1 /images/photo2.jpg
Result:/images/photo1.jpg /images/photo2.jpg
Prepare input (build workflows)
This tool is intentionally single-purpose. For better results, prepare your list with other PicoToolkit tools first (trim, remove blanks, normalize). For example you can:
- clear empty lines,
- delete duplicates,
- filter out the lines that don't match a pattern,
- remove HTML tags,
- strip spaces from each line,
- change the list order,
- and much more!
Combine these steps into a simple workflow: clean → normalize → add prefix/suffix.
Tips & edge cases
- Decide whether to apply to empty lines. If you want to skip empty lines, remove them first.
- Watch for existing separators or whitespace — trim if you need a clean result.
- When adding quotes or special characters, ensure your target system accepts them (CSV, SQL, etc.).
- All processing runs in your browser; no files are uploaded to the server.
Related tools
- Remove Empty Lines — remove blanks before applying changes.
- Remove Duplicates — dedupe the list first.
- Filter a list — keep only matching lines.
- HTML Stripper — strip tags before counting or adding text.
- Remove Spaces — collapse or trim spaces.
- Add Line Numbers To Text — alternate batch operation.
FAQ
Will this tool change whitespace or other characters?
No — it only adds the prefix or suffix you enter. Use the Remove Spaces or HTML Stripper tools beforehand if you need to normalize whitespace or remove tags.
Can I target only non-empty lines?
Yes. The easiest approach is to remove empty lines first (see Remove Empty Lines), then apply the prefix/suffix so you avoid producing lines with only the added text.
Is my data uploaded to PicoToolkit?
No. Operations are browser‑side and your text remains on your device unless you explicitly download or copy the result.