Prefix, Suffix, Join & Split Lines.
Add a prefix or suffix to every line, join lines with a separator, or split text into lines.
Runs in your browserAbout Prefix, Suffix, Join & Split Lines
This tool does the small line edits that otherwise need a spreadsheet or a regular expression. In wrap mode it adds the same prefix and suffix to every line, so a column of IDs becomes a list of quoted strings, or a list of file names becomes a list of shell commands. Join mode glues all lines into one string with the separator you choose, which is how you turn a list of tags into a comma-separated value. Split mode does the opposite: paste "red, green, blue" and get one item per line, ready to sort or count. The separator understands the escapes \n and \t, so you can join with a tab for pasting into a spreadsheet or split on a literal backslash. Prefix and suffix are applied in every mode, which means you can quote each item and join the result in one step. For example, wrapping apple, banana and cherry with single quotes and joining with a comma gives 'apple','banana','cherry'. A common mistake is forgetting that trailing spaces copied from a document stay part of each item; switch on Trim to remove them. Empty lines are dropped by default so a blank line at the end of your paste does not produce a stray separator. Everything runs in your browser, nothing is uploaded, and the stats panel shows how many items went in and came out.
How to Use
- Paste your lines or the string you want to split.
- Pick a mode and type the prefix, suffix or separator.
- Copy or download the result.
Frequently Asked Questions
How do I join lines with a new line or a tab?
Type \n or \t in the separator field. Two characters, a backslash followed by n or t, are turned into the real line break or tab.
Can I add quotes and commas in one step?
Yes. Set the prefix to a quote, the suffix to a quote, choose join and use a comma as the separator. Each item is wrapped first and then joined.
Why do I get an empty item in the output?
Your text probably has a blank line or ends with a separator. Keep "Remove empty items" switched on to drop them.
Is my text sent to a server?
No. The tool runs entirely in your browser and makes no network requests.
Related Tools
Sort lines alphabetically or naturally and remove duplicates.
Turn a column of values into a JSON array, SQL IN clause, CSV row, PHP or Python list.
Find and replace text with plain strings or regular expressions, capture groups and whole-word matching.
Trim lines, collapse repeated spaces, drop empty lines and strip invisible characters.
Convert text between case formats.
Count characters, words, sentences, and more.