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.
- Index state
- eligible
- Reviewed
- 2026-08-24
- Input limit
- 5,000 graphemes
Remove Line Breaks
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.
Reviewed truth vectors
Examples that expose the edge cases
one
twoone twoA single break becomes a space.
first
secondfirst secondWindows line endings are normalized.
A
BA BWhitespace around the break is collapsed.
Transparent implementation
How it works
- 01
Normalize CRLF and CR line endings to LF.
- 02
Match one or more breaks with surrounding horizontal spaces.
- 03
Replace the matched run with one ordinary space.
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.
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.
Experience, expertise & trust
How we verify this tool
Automated evidence
- Tool-contract & coverage suite30 deterministic cases
tests/tools-30.test.mjs mirrors the ToolRunner dispatch and asserts every registered engineId returns the contracted output shape, plus a coverage guard so no tool silently drops characters.
Run in: node --test after a production build (vinext build) - Rendered-HTML suite12 deterministic cases
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 suite21 deterministic cases
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
- UAX #29: Unicode Text Segmentation
Grapheme and word boundaries underpinning line and whitespace operations.
- UAX #14: Unicode Line Breaking Algorithm
Line-break semantics behind hard-wrap repair.