Convert Spaces to New Lines
Break a space-separated string into one item per line. Useful for tag strings, word lists and command output.
Examples
| Input | Output | |
|---|---|---|
| Simple | apple banana cherry |
apple ⏎ banana ⏎ cherry |
| Realistic | invoice.pdf report.docx notes.txt |
invoice.pdf ⏎ report.docx ⏎ notes.txt |
Why convert this way
Space-separated is what you get from command-line output and tag fields. Splitting on spaces turns that blob into a list you can actually work with — sort it, deduplicate it, or count it.
When you will need it
- A space-separated tag or keyword string
- Command output you want one entry per line
- Splitting a sentence to count or sort its words
- Turning a list of filenames into a column
What the settings do here
- Split on space — the tool reads
apple banana cherryas 1 separate items. - Join with a line break
— producing
apple⏎banana⏎cherry.
Where this comes up
Most often applied to command-line output or a tag string pasted from a CMS field, where everything arrived as one long line and you need to see how many items there actually are.
Related conversions
Now that every item is on its own line you can sort the list, strip duplicates or count the rows before joining it back up.
Frequently Asked Questions
How do I split a sentence into one word per line?
Split on space and join with a newline. This is the fastest way to turn a tag string, keyword list or command output into a sortable, countable list.
What happens where there are two spaces in a row?
Each extra space produces an empty item. Leave remove-empty-lines on, or collapse repeated spaces before converting.