Line-ending guide
What counts as a stored line break?
Text files use control characters to record new lines. Unix and modern macOS normally use LF, Windows commonly uses the two-character CRLF sequence, and older Mac files may use CR. The live audit distinguishes all three instead of assuming every visible line is encoded the same way.
Input copied from a wrapped document:
The first paragraph wraps
across two stored lines.
The second paragraph also
wraps across two lines.
Preserve-paragraphs result:
The first paragraph wraps across two stored lines.
The second paragraph also wraps across two lines.Three modes for three different outcomes
| Mode | Single line break | Blank-line paragraph gap |
|---|---|---|
| One space | Becomes one regular space. | Also becomes one regular space. |
| Remove completely | Deleted with no separator. | Deleted with no separator. |
| Preserve paragraphs | Becomes one regular space. | Becomes exactly one empty line. |
Whitespace behavior
- Spaces and tabs immediately beside a removed line ending are cleaned to avoid accidental double spacing.
- Spaces and tabs elsewhere inside a line remain unchanged.
- Mixed LF, CRLF, and CR input is accepted in the same document.
- Paragraph mode writes retained paragraph gaps as two LF characters in the output.
- Processing happens locally in the browser.
Cases that need care
- Visual word wrapping created by the browser is not a stored line break and cannot be removed.
- Poetry, source code, postal addresses, and tables often use meaningful line structure.
- The tool does not remove hyphens inserted at the end of wrapped lines.
- A paragraph boundary is recognized only when at least one blank line separates text blocks.
Line-ending reference
| Name | Escape form | Typical source |
|---|---|---|
| LF | \n |
Unix, Linux, and modern macOS text. |
| CRLF | \r\n |
Windows text files and many network formats. |
| CR | \r |
Classic Mac files and some legacy exports. |
How to remove line breaks step by step
- Paste the text into the input box. The audit reports how many LF, CRLF, and CR line endings were found and how many blank-line paragraph gaps exist.
- Pick a mode. Use One space for prose that was wrapped mid-sentence, Remove completely for a value that must become one unbroken string, and Preserve paragraphs when blank-line separation between blocks has to survive.
- Select Remove Line Breaks and read the output. Confirm that sentences are not fused without a space and that intentional breaks in addresses, code, or verse were not lost.
- Copy the result. Output is written with LF endings even when the input mixed CRLF and CR.
Why pasted text contains hard line breaks
Many sources store a line ending at the visual end of every row rather than only at the end of a paragraph. A PDF places a break wherever the typesetter ended a line. Plain-text email is frequently hard-wrapped at 72 or 76 columns before sending. Terminal output, code comments, and older publishing systems do the same. When that text is pasted into an editor that already wraps automatically, the stored breaks become redundant and produce a narrow column or a ragged left edge. Removing them lets the destination application control wrapping again.
Visual wrapping added by the current editor is a different thing. It has no stored character, so it cannot be selected or removed. This tool only changes real LF, CRLF, and CR characters that exist in the pasted text.
Worked examples
Reflowing a paragraph copied from a PDF
A paragraph broken across six display lines becomes one continuous paragraph with One space. If the PDF also left hyphenated fragments at line ends, fix those separately; this tool does not rejoin hy- and phenation and treats the hyphen as an ordinary character.
Building a single-line value
A key, token, or base64 block copied across several lines can be rejoined with Remove completely so that no space is inserted between the fragments. Compare the length of the result against the expected value before using it.
Keeping structure in an address or poem
Postal addresses, verse, song lyrics, and ASCII tables use line breaks as content. Do not run a full removal on them. If only the vertical spacing between stanzas or blocks is wrong, use Remove Empty Lines instead.
Pick a mode by source
| Source | Suggested mode | Check before accepting |
|---|---|---|
| Wrapped paragraph from a PDF or email | One space | No sentences fused without a space; hyphenated fragments handled. |
| Multi-line key, hash, or encoded blob | Remove completely | Output length matches the expected value. |
| Article with blank-line paragraphs | Preserve paragraphs | Paragraph gaps remain; mid-paragraph breaks are gone. |
| Address block, poem, or source code | Usually leave unchanged | Line breaks here are meaningful content. |
| CSV or TSV rows | Do not use | A line ending separates records; removing it corrupts the file. |
Frequently asked questions
Will removing line breaks also remove blank lines between paragraphs?
Only in One space and Remove completely modes. Preserve paragraphs keeps exactly one empty line wherever the input had one or more blank lines between blocks.
Does the tool add a space between joined lines?
In One space mode each removed line ending becomes one regular space, and spaces or tabs already sitting beside the break are collapsed so the result has no double space. In Remove completely mode no separator is added.
Are Windows line endings converted to Unix?
Retained paragraph gaps and output are written with LF. If you specifically need CRLF, convert the result in your editor afterwards.
Can it rejoin words split by a hyphen at a line end?
No. De-hyphenation is a separate manual step. The tool does not detect or remove line-end hyphens.
Related cleanup options
Use Remove Tabs to expand or delete U+0009 tab characters without touching line endings. Use the main Unicode whitespace tool to collapse spaces, NBSP, tabs, and other horizontal spacing while keeping every stored line break. For a full inventory of whitespace code points, see the whitespace character reference.