Text to One Line
How it works
This tool converts text between a single line and many lines, both directions.
Join → one line (default): paste multi-line text and the tool merges every line into one. Pick what goes between the lines (a space, comma, semicolon, pipe, tab, nothing, or your own custom string) to build terminal commands, CSV rows, or single-line config values.
Split → many lines: paste a delimited line (comma, semicolon, whitespace, pipe, tab, or a custom delimiter) and the tool breaks it back into one item per line. Handy for turning a CSV row or a comma-separated list into a clean vertical list.
Three processing options apply to both directions: Trim removes leading and trailing whitespace from each item, Remove empty drops blank items, and Remove duplicates keeps only the first occurrence of each item. The Wrap items option puts single or double quotes around every item, which is what builds a SQL `IN ('a', 'b')` clause or a code array in one step.
A live counter shows the item count and the output length. Copy with the button or with Ctrl/Cmd+Enter. Your separator and option choices are remembered between visits (stored in your browser); the text you paste is never saved.
Frequently Asked Questions
What separators can I use?
- When joining: a space, comma, comma + space, semicolon, pipe, tab, nothing, or any custom string you type. When splitting: comma, semicolon, whitespace, pipe, tab, or a custom delimiter you type in.
Can it split a single line back into multiple lines?
- Yes. Switch to 'Split → many lines', paste a delimited line (a comma-separated list or a CSV row, for example), choose the delimiter, and the tool outputs one item per line. Trim, remove-empty, remove-duplicates and quote-wrapping all work in this direction too.
How do I build a SQL IN clause or a quoted array?
- Paste your values one per line in Join mode, set 'Wrap items' to single or double quotes, and choose the comma + space separator. The output is 'a', 'b', 'c', ready to drop inside IN (...) or a code array.
When would I use this?
- Turning a multi-line list into a terminal command, a SQL IN clause or a single-line config string; flattening a column copied out of a spreadsheet; or the reverse, splitting a CSV row or a delimited string into a clean vertical list.
Is my text stored anywhere?
- No. The tool is a client-only JavaScript app, so the text you paste is processed locally and discarded when you leave the tab. Only your separator and option preferences are saved, in localStorage, never the text itself. There is no backend, no logging, and no analytics tied to your content: your browser's DevTools Network tab will show no outbound request for the text you enter.