Skip to content
Jellykit

Join and Split Lines

Join a list of lines into one line with a separator of your choice, or split text at a delimiter into one item per line.

  • Runs on your device
Loading tool

About Join and Split Lines

Paste a column copied from a spreadsheet and get it back as one line, separated by commas, semicolons, tabs or any text you like: ready for an email, a search box or a list of values in code. Blank lines are skipped and stray spaces trimmed unless you say otherwise.

Split goes the other way. Give it a comma-separated list, a row of tags or a sentence joined with "and", choose what to split at, and each item lands on a line of its own. The delimiter is matched exactly as text, never as a pattern, so a full stop or a bar means just that character.

How it works

  1. Joining splits the text at every line break (Windows, Unix or old Mac style), trims and drops empty lines if those options are on, then puts the separator between what is left.
  2. Splitting cuts the text at every occurrence of the delimiter and at the line breaks it already has, trims and drops empty items if asked, and writes one item per line.
  3. With escapes on, \t means a tab, \n a line break and \\ a backslash, in the separator and in the delimiter. Everything else is used as typed, spaces included.

Questions

How do I make a comma-separated list from a column?

Paste the column, keep Join lines and the separator ", " (comma and space), and copy the result. Use "," without the space if the list is for a program that does not want spaces.

Can I split at a tab or at line breaks?

Yes. Type \t to split at tabs. In join mode, \n as the separator puts a line break between items, which with skipping and trimming on is a quick way to tidy a list.

Does the delimiter support regular expressions?

No. It is matched as plain text so that characters such as . | * mean themselves. Use the find and replace tool if you need a pattern.

Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.