Your files stay on your device

# Multiline to single line

Joins pasted multiline text into one line with your choice of separator, plus trim, collapse, and drop empty line options.

Paste multiline text and the single line appears here.

The escaped newline option writes the two characters backslash and n into the output, not a real break, which is what string literals and JSON need. Nothing is escaped in the pieces themselves: a line containing quotes or backslashes passes through as typed.
Options

## More text tools

- [Sort and clean lines](/text/lines)
- [Word & character count](/text/word-count)
- [Case converter](/text/case-converter)
[All text tools](/text)

Was this tool useful?
YesNo

---

Canonical HTML: https://nutter.tools/text/multiline-string-to-singleline-text-converter
Markdown version: https://nutter.tools/text/multiline-string-to-singleline-text-converter.md
Plain-text version: https://nutter.tools/text/multiline-string-to-singleline-text-converter.txt
Agent index: https://nutter.tools/llms.txt

