Multiline to Single Line Converter
Join multi-line text into a single line — or split a single line back into multiple. Useful for JSON, XML, SQL, code snippets and log lines.
0 chars · 0 lines
0 chars · 0 lines
How to use this converter
- Pick a mode — join multi-line text into one line, or split a single line back into multi-line.
- Choose the delimiter (or enter a custom one).
- Paste your text in the input box.
- Click Convert and then Copy to Clipboard.
What does it do?
This multiline to single line converter removes line breaks from any text — JSON, XML, SQL, source code, CSV rows or plain prose — and joins everything into a single line using a delimiter you choose. Both \n (Unix) and \r\n (Windows) line endings are handled, so there are no stray carriage returns in the output. Use the reverse mode to take a comma-separated or pipe-separated single line and break it back into multiple lines.
Frequently Asked Questions
Yes. Both
\n (Unix / macOS) and \r\n (Windows) line endings are detected and replaced together, so the output never contains stray carriage returns.
Pick the Multiline → Single line mode, set the delimiter to Nothing, enable Trim whitespace on each line, and click Convert. You will get a compact single-line JSON or XML you can paste into code or a config file.
Switch to Single line → Multiline mode, choose Comma as the split delimiter (or Custom for any other character), paste the line and click Convert.
It outputs the two characters
\n (a backslash followed by an n), not an actual line break. This is what you want when embedding multi-line text inside a single string literal in code.
No. The conversion runs entirely in your browser using JavaScript — nothing is sent to a server. The tool keeps working even if you go offline after the page has loaded.