Add Prefix / Suffix to Each Line
The Add Prefix / Suffix to Each Line tool wraps every line of a pasted list with text before it, after it, or both, in a single pass. It is the fastest way to turn a bare list of keywords, slugs, or IDs into full URLs, comma-quoted arrays, redirect maps, or sitemap entries without editing each line by hand or writing a throwaway regex.
The tool is completely free and runs entirely in your browser, so even a list of thousands of lines is transformed instantly and nothing you paste is ever uploaded. Add quotes, sequential numbers, trim whitespace, or drop blank lines, then copy or download the result as plain text.
🔒 Private: everything runs in your browser. Nothing you paste is uploaded.
How to add a prefix or suffix to every line
Paste your list on the left, type the text to put before and after each line, switch on any options you need, and the result rebuilds on every keystroke. Copy it to the clipboard or download it as a .txt file.
Turn a bare list into full URLs or paths
The most common job is gluing a base onto a list of slugs. Drop a list of page paths into the input, set the prefix to your domain such as https://example.com/, and every line becomes an absolute URL ready for a sitemap, a redirect map, or an outreach sheet. A suffix is just as useful for appending a trailing slash, a file extension, or a tracking parameter to each line. Because the prefix and suffix are applied to every line identically, a list that would take twenty minutes of manual editing is finished the instant you stop typing.
Wrap lines in quotes for code and spreadsheets
Developers and technical SEOs constantly need a plain list converted into a quoted, comma-ready format for a SQL IN clause, a JavaScript array, a Python list, or a CSV cell. Switch the quote option to single or double quotes and the tool wraps each line first, then applies the prefix and suffix around the quoted value, so a comma suffix produces a clean comma-separated set. The order is deliberate: quotes hug the original text, while your prefix and suffix sit outside them, which is exactly what list and array syntax expects.
Number lines and clean up the list as you go
Three options handle the messy parts of real-world lists. Trim each line first strips leading and trailing spaces so a copy-paste from a PDF or email does not carry hidden whitespace into your output. Skip blank lines removes empty rows so they never become a stray prefix-only line. Add line numbers prepends a sequential counter in your chosen format, dot, parenthesis, bracket, bare, or zero-padded, and the numbering counts only the lines that survive trimming and skipping, so the sequence stays unbroken.
Prefix and suffix tool frequently asked questions
Q1In what order are the prefix, suffix, quotes, and numbers applied?
Each line is processed in a fixed, sensible order. First the line is trimmed if that option is on, then blank lines are dropped, then the line content is wrapped in quotes if selected. The prefix and suffix are added around that quoted value, and finally the line number is prepended. This keeps quotes hugging the original text while your prefix and suffix sit outside them.
Q2Does this tool change or escape my text in any way?
No. The output is plain text and the tool never alters the characters inside your lines. It does not escape quotes, encode symbols, or strip anything beyond the optional trim and skip-blank steps you choose. What you paste, plus the prefix, suffix, quotes, or numbers you ask for, is exactly what you get, so the result is safe to drop straight into code, a sitemap, or a spreadsheet.
Q3How many lines can I process at once?
There is no fixed limit. Because every line is transformed locally in your browser with plain string operations, lists of thousands of lines rebuild almost instantly. The only practical ceiling is your device memory, and for any normal keyword list, URL set, or ID export the tool keeps up with you on every keystroke without any delay or upload.
Q4Will my list be sent to a server or stored anywhere?
Never. The entire transformation runs in client-side JavaScript on your own machine, so nothing you paste into the input, prefix, or suffix fields is uploaded, logged, or saved. The tool keeps working even if you disconnect from the internet after the page loads, which makes it safe for confidential URLs, internal IDs, or unpublished content.
Q5What does the zero-padded numbering option do?
Zero-padded numbering aligns every line number to the same width based on the total count. If your list has ninety-nine lines, line one becomes 01 and line nine becomes 09 so they line up neatly with two-digit numbers. This is useful for filenames, ordered slugs, or any list where consistent-width numbering keeps everything sorting and aligning correctly.
