Convert Newlines to Spaces
Turn line breaks into spaces and get one flowing paragraph.
Options
Put between joined lines. Type \t for a tab, \n for a new line and \\ for a backslash.
Single-line text
How to convert newlines to spaces
Paste your text into Your text, or press Load example. Every line break is
replaced with your separator and the lines flow into one paragraph. The result updates as you type. Copy it or
download it as single-line.txt. Everything runs in your browser, so nothing you paste is uploaded.
Examples
| Input | Output |
|---|---|
| Wrapped prose across several lines. | Wrapped prose across several lines. |
| First line Second paragraph here. | First line Second paragraph here. |
| Padded lines with spaces here. | Padded lines with spaces here. |
Limits and edge cases
- One trailing line break is stripped before joining, so the output never ends with a dangling space.
- Windows (CRLF) and old Mac (CR) endings are normalized to plain line breaks first.
- With Collapse blank lines on, empty lines are dropped; with it off, each blank line still adds its separator.
- Unlike the Unwrap tool, this tool joins every line the same way and never preserves paragraph breaks. Unlike Remove line breaks, it puts your separator where each break was instead of deleting it.
Frequently asked questions
How do I convert newlines to spaces?
Paste your text into the input box and every line break is replaced with a space instantly. The result updates as you type and you can copy it or download it as a .txt file.
What happens to the trailing line break at the end of my text?
One trailing line break is stripped before joining, so the output never ends with a dangling space. All line breaks are still counted in the Breaks replaced stat.
Does it handle Windows line endings?
Yes. CRLF and CR endings are normalized to plain line breaks first, so text copied from Windows apps joins exactly like Unix text.
What is the difference between collapsing and keeping blank lines?
With Collapse blank lines on, empty lines are dropped and the surrounding lines join with a single replacement. With it off, each blank line still contributes its replacement, so a blank line between two lines becomes a double space.
How is this different from the unwrap and remove-line-breaks tools?
This tool joins every line with your chosen separator. The unwrap tool is smarter about paragraphs and keeps blank lines as paragraph breaks, while remove-line-breaks deletes breaks entirely without adding spaces.
Is my text uploaded anywhere?
No. Conversion runs in your browser with JavaScript and nothing is sent to a server. Inputs under 200 KB are kept in your browser's local storage so they are still there when you come back.