How to use
- Paste your text into the input box, or load a .txt file to clean up its line breaks.
- Choose a mode: remove all breaks to join into one line, remove empty lines, or collapse blank lines.
- Optionally tick 'add a space' between joined lines and 'trim lines' to strip surrounding whitespace.
- Review the cleaned text, then click Copy or Download to save it as a .txt file.
Frequently asked questions
Is my text uploaded to a server?
No. This tool runs 100% in your browser using JavaScript, so your text is processed locally on your device and is never uploaded or stored anywhere.
What is the difference between the three modes?
Remove all breaks joins every non-empty line into a single line. Remove empty lines keeps your line breaks but drops blank lines. Collapse blank lines reduces runs of multiple blank lines down to a single blank line.
Does it handle Windows, Mac and Unix line endings?
Yes. Windows (\r\n), classic Mac (\r) and Unix (\n) line endings are all normalized to \n first, so text with mixed newline styles is cleaned consistently.
Can I add a space between joined lines?
Yes. When you use the remove all breaks mode, tick 'add a space' to insert a single space between each joined line so words don't run together. Untick it to join with no separator.
What does the 'trim lines' option do?
Trim lines removes leading and trailing whitespace (spaces and tabs) from each line before the breaks are processed, which is handy for cleaning up pasted or indented text.
Can I load a file and download the result?
Yes. You can load a plain .txt file to fill the input, and once the text is cleaned you can copy it to your clipboard or download it as a cleaned.txt file.
About this tool
Free online tool to remove line breaks, delete empty lines, join lines into one, and normalize Windows, Mac and Unix newlines. Runs 100% in your browser — text is never uploaded.