No text handy? Load a real example.

Each sample contains real stored line breaks, so the audit and the marked-up view below react immediately.

Live input check

Line Ending Audit

No stored line breaks detected. Visual wrapping alone is not changed.

Breaks found
0
Paragraph gaps
0
Input lines
0
Output lines
0

Line-break x-ray

See where every line break sits

A stored line break is invisible in a text box: the next word simply starts lower. Here each one is drawn as a green mark and each ordinary space as a dot, so you can see which breaks the chosen mode removed, and whether it left a space in their place or joined the words directly. Try the code sample with Replace Breaks with One Space and then Remove Breaks Completely.

Input as stored
After processing

one stored line break (a browser text box keeps every break as LF) one U+0020 space

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. A browser text box does not keep that difference, though: when text is pasted or typed, CRLF and CR breaks are converted to LF, so this tool, its audit, and its output all work with LF, and text from any of the three sources is handled the same way.

A stored line break is the same thing a programmer calls a newline: \n in most languages is LF, and \r\n is CRLF. So removing newlines and removing line breaks are the same operation here—only the vocabulary differs, depending on whether the text came from an editor, an export, or a piece of code.

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.
  • Text from LF, CRLF, and CR sources is treated alike, because the browser stores every pasted break as LF.
  • 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

  1. Paste the text into the input box. The audit reports how many line breaks were found and how many blank-line paragraph gaps exist.
  2. 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.
  3. 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.
  4. Copy the result. Output always uses LF line endings, whichever platform the text came from.

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 stored line breaks 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. When the copied text also contains lists, indented lines, or hyphenated words you want to decide on one at a time, use the PDF Text Cleaner instead, because joining every line here would also join list items and code lines.

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

SourceSuggested modeCheck before accepting
Wrapped paragraph from a PDF or emailOne space, or the PDF Text Cleaner when it has lists, indents, or hyphenated wordsNo sentences fused without a space; hyphenated fragments handled.
Multi-line key, hash, or encoded blobRemove completelyOutput length matches the expected value.
Article with blank-line paragraphsPreserve paragraphsParagraph gaps remain; mid-paragraph breaks are gone.
Address block, poem, or source codeUsually leave unchangedLine breaks here are meaningful content.
CSV or TSV rowsDo not useA 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?

Yes. A browser text box converts Windows (CRLF) and classic Mac (CR) line breaks to LF as soon as text is pasted, so the tool only ever sees and writes LF. Retained paragraph gaps are two LF characters. 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.