Overview
Introduction
Turning a line-per-item list back into a single delimited string, a CSV row, a pipe-delimited field, is the reverse of splitting.
This tool does it with any delimiter you choose.
What Is Text Joiner?
A joiner that splits the input on newlines and rejoins the resulting items with your chosen delimiter.
It runs entirely client-side as part of this site's String Tools collection, so nothing you paste is ever uploaded to a server.
How Text Joiner Works
The tool calls input.split("\n").join(delimiter).
The transformation happens synchronously in JavaScript the moment you type, with no network round trip involved.
When To Use Text Joiner
Use it to turn a pasted list of lines back into a single CSV row, pipe-delimited field, or comma-separated value.
It's a fast way to get the answer without opening a code editor, a REPL, or writing a one-off script just to check.
Often used alongside Text Splitter and Text Sorter.
Features
Advantages
- Works with any delimiter string, not just a single character.
- Simple, predictable round trip with Split a String.
- Is the exact inverse of Split a String, so text split on a delimiter and rejoined with that same delimiter comes back unchanged.
Limitations
- A trailing blank line in the input produces a trailing empty item in the output.
- Splits on the newline character alone, so carriage returns from Windows-style input survive into the joined output.
Examples
Best Practices & Notes
Best Practices
- Remove trailing blank lines first with Remove All Empty Lines if you don't want an empty trailing item.
- Choose a delimiter that cannot occur inside any of your values, otherwise the joined result cannot be split back apart correctly.
- Strip carriage returns first when the source came from a Windows file, since they are carried straight through into each item.
Developer Notes
The implementation is `input.split("\n").join(delimiter)`, the direct inverse of Split a String's `input.split(delimiter)`.
Text Joiner Use Cases
- Turning a pasted list back into a CSV row
- Combining lines into a pipe-delimited log field
- Rebuilding a delimited value after editing individual items
Common Mistakes
- Leaving a trailing blank line in the input, which produces an unwanted trailing empty item.
- Picking a delimiter that already appears within the data, which quietly makes the join irreversible.
Tips
- Use Split a String to break the result back apart if needed.
- Use ', ' when the result is meant to be read by a person, and a bare ',' when it needs to parse as CSV.