Merge Words Into One Line

Turn a stacked list into one line. Join with a hyphen for a URL slug, a comma for a tag string, or nothing at all for a concatenated key.

The separator decides the format

Merging a stacked list into one line is the same operation with four useful outputs. Joining with a hyphen produces a URL slug, which is the form search engines and static site generators expect. Joining with a comma and a space produces a tag string for a field that takes comma-separated values. Joining with a space produces a sentence or a title. Joining with nothing produces a concatenated key, the shape of a CamelCase identifier once you capitalise it, or a lookup key built from parts. Picking the separator is really picking the destination.

Merging words rather than lines

The unit toggle changes what gets joined. Merging lines keeps the words inside each line intact and only removes the line breaks, so a three-line list becomes three items. Merging words breaks on every whitespace character first, so a three-line list of two-word phrases becomes six items joined individually. That second mode is what you want when building a slug from a title, where the spaces inside the title need to become hyphens too. Blank lines are dropped either way, so a list with gaps does not produce doubled separators.

Frequently asked questions

How do I turn a title into a URL slug?

Merge words with a hyphen. That breaks on the spaces inside the title as well as the line breaks, so every gap becomes a hyphen.

Do blank lines create double separators?

No. Empty lines are dropped before the join, so a list with gaps in it produces clean single separators.

Is this the opposite of the bullet point tool?

Close to it. That one turns one line into many marked lines; this one turns many lines into one. They round-trip if you strip the bullets first.