Clean Text · browser-local

Remove Line Breaks

Repair text copied from PDFs, narrow columns, emails, or OCR output. The default mode replaces line breaks with a single space so adjacent words do not accidentally merge.

Works on up to 5,000 characters and 20,000 code points per field (at most 64 code points per character), processed in your browser.

48 graphemes48 code points48 bytes

Live result

Output

This paragraph was copied with hard line breaks.

Good fit

Use this tool when

  • A PDF or webpage inserts a break after every visual line.
  • A pasted paragraph is fragmented by hard wraps.
  • You need one continuous line for a form or spreadsheet cell.

Keep the original

Avoid it when

  • Line breaks carry code, poetry, address, or list structure.
  • You need to preserve paragraph boundaries.
  • The input is CSV or another structured format.
01

Reviewed truth vectors

Examples that expose the edge cases

Inputone two
Outputone two

A single break becomes a space.

Inputfirst second
Outputfirst second

Windows line endings are normalized.

InputA B
OutputA B

Whitespace around the break is collapsed.

02

Transparent implementation

How it works

  1. 01

    Normalize CRLF and CR line endings to LF.

  2. 02

    Match one or more breaks with surrounding horizontal spaces.

  3. 03

    Replace the matched run with one ordinary space.

03

Known limitations

What the result cannot promise

The tool cannot infer semantic paragraphs from plain text.

Joining structured lists can destroy meaning.

Hyphenated PDF line endings need editorial review.

04

Questions before copying

Frequently asked questions

Will words run together?

The default action inserts one space rather than deleting the break outright.

Does it remove blank paragraphs too?

This A1 tool joins all break runs. Use Remove Empty Lines later when paragraph structure should remain.

Is the original text overwritten?

No. The cleaned result stays separate until you choose Use as input or copy it.

05

Testing and sources

How this tool is tested

GlyphSift Editorial — Text-engine notes written and reviewed by Hommer Zhao, Founder & General Manager

GlyphSift Editorial is the site's writing and review process, led by Hommer Zhao, who is accountable for every tool page and correction. Each tool's examples are written against real Unicode edge cases and checked against the engine before the page is published.

Each tool page is reviewed against the same six input classes the engine is tested with — ASCII, emoji, combining marks, non-Latin scripts, empty input, and 5,000-grapheme input — and cannot become eligible if it is only a parameter variation of another page.

Automated evidence

  • Tool-contract & coverage suiteShared suite · 37 cases across all tools it covers

    tests/tools-30.test.mjs mirrors the ToolRunner dispatch and asserts every registered engineId returns the contracted output shape, plus a coverage guard: every style keeps one output character per input character with unmapped characters passed through in place, and strikethrough, zalgo and upside-down never drop or split a grapheme cluster.

    Run in: node --test after a production build (vinext build)
  • Rendered-HTML suiteShared suite · 26 cases across all tools it covers

    tests/rendered-html.test.mjs renders the deployed server bundle and asserts the Unicode-version manifest and each wave's tool markup are present in the server-rendered HTML.

    Run in: node --test against the built dist/server bundle
  • Transform & cleanup suiteShared suite · 38 cases across all tools it covers

    tests/transform-cleanup.test.mjs exercises each deterministic cleanup and transform action against whitespace, duplicate, ordering, casing, and HTML-to-text edge cases.

    Run in: node --test, no network, no randomness

Standards this tool follows