How to merge lines with a custom separator
Put multiline text in Input text, choose the text to place between lines, and check the trimming option when blank lines should go away. Merged output updates as you edit the text or change a setting.
- Paste multiline content into Input text, or use Upload to load a text file.
- Enter the text to place between lines in Separator.
- Leave Trim spaces & empty lines checked to remove line edges and blank lines, or clear it to keep them.
- Check Merged output, then use Copy or Download.
What Separator changes when you join lines
Separator is inserted literally between each line that remains after processing. Its default value is , . The preset buttons set a comma, semicolon, pipe, slash, tab, or single space, and you can type different text in the field, including an empty value.
Input text:
foo
bar
baz
Separator: ,
Merged output:
foo, bar, baz
The tool joins strings as entered. It does not add quotes, parentheses, CSV escaping, or other format syntax. A separator already present inside a line stays there, and the same text is also inserted between lines.
How join lines handles spaces and blank lines
When Trim spaces & empty lines is checked, the tool removes whitespace at both ends of each line and drops lines that are empty after trimming. Clear the checkbox to keep line whitespace and empty lines. CRLF, LF, and CR line breaks are all split before Separator is inserted.
Changing Input text, Separator, or Trim spaces & empty lines runs the join again. If the result has no text, Merged output stays hidden and Copy and Download remain disabled.
Examples of text to join
- Join one value per line with a comma and space when another field needs one string.
- Replace line breaks with spaces before placing a short list in a paragraph.
- Put pipes or tabs between existing lines while keeping the text inside each line.
When another text cleanup tool fits better
Use Text Cleanup & Filter Tools to choose another text operation. Choose Remove Duplicate Lines to delete repeated lines. Choose Remove Empty Lines to remove blank lines while leaving the other line breaks in place. Use Trim Whitespace to trim line edges without joining the lines.
Questions about Merge Lines
How do I merge lines into a comma-separated list?
Paste or upload the lines, enter , in Separator, and copy the result from Merged output. The tool inserts comma-space text between lines and does not add CSV quoting or escaping.
Can I join lines with a tab or a space?
Choose the Tab or single-space preset, or enter the separator directly in Separator. The selected text goes between each line that remains after processing.
Does Merge Lines remove empty lines?
It removes blank and whitespace-only lines when Trim spaces & empty lines is checked. Clear the checkbox to keep them in the joined text.
Does Merge Lines send my text to a server?
Your text is processed in the browser. The page scripts contain no fetch, XMLHttpRequest, sendBeacon, or form-post request that sends entered content.