Remove Line Breaks
Join wrapped lines back into clean, flowing text — strip the hard line breaks you get when copying from PDFs or emails, while keeping real paragraphs.
Lines: 0 → 0 · 0
How to use
- Paste the text with unwanted line breaks.
- Choose what to join lines with, and toggle keep-paragraphs, collapse-spaces and trim as needed.
- Copy the cleaned-up result from the output box.
About this tool
ShowHide
Text copied out of a PDF, an email client or a terminal usually arrives hard-wrapped: there is a line break at the end of every visual line, put there by whatever laid the text out, and the paragraph will not reflow when you paste it somewhere narrower. This tool joins those lines back together. Choose what to join them with — a space, nothing, or a separator of your own — keep blank-line paragraph breaks intact, collapse runs of spaces and trim each line.
The choice of joiner is not cosmetic, and the right answer depends on the language. English and other space-separated writing needs a space, or the last word of one line fuses with the first of the next. Chinese, Japanese and Thai need nothing at all, because those scripts do not put spaces between words — joining with a space inserts a gap into the middle of a sentence that was never meant to have one. A document with both needs a pass with each setting, or a careful read afterwards.
One case this cannot fix on its own is hyphenation. A typesetter that broke inter- at the end of a line and national at the start of the next left a hyphen that belongs to the layout, not the word. Joining with a space produces inter- national, and joining with nothing produces the correct international only if you also strip the hyphen. PDFs from journals and older books are full of these, so it is worth scanning for a trailing - before or after the join.
Line endings are the other thing worth knowing about. Windows ends a line with two characters and Unix with one, and old Mac files use a third convention — this tool treats all of them as line breaks, so a file that mixes them from being edited on several machines comes out consistent. Unicode also has its own line separator character that some word processors emit, which looks identical on screen and is not a newline to most tools; if a line refuses to join, that is a likely culprit. Everything runs in the page and nothing is uploaded.
Frequently asked questions
What does 'keep paragraphs' do?
Blank lines are treated as paragraph breaks. Lines within a paragraph are joined together, but the paragraph breaks themselves are preserved as blank lines, so structure isn't lost.
Why join with a space instead of nothing?
Most wrapped prose needs a space where the line broke (otherwise words run together). Use 'Nothing' for things like a long token or URL that was split across lines.
Does it change line endings (CRLF vs LF)?
It removes the breaks entirely while joining. If you only need to convert between Windows and Unix line endings, use a line-endings converter instead.
Is my text uploaded anywhere?
No. All processing happens in your browser; the text never leaves your device.
Text pasted from a PDF still has odd gaps after collapsing spaces — why?
The collapse rule only matches runs of ordinary spaces and tabs. PDFs and word processors are full of non-breaking spaces (U+00A0), which look identical but are a different character, so a run of them survives untouched. Trimming line ends does remove them at the edges — JavaScript's trim counts U+00A0 as whitespace — but nothing touches a run sitting in the middle of a line. If the gaps persist, replace U+00A0 with a normal space in a find-and-replace pass first, then come back here.
Why did a hyphenated word come out broken?
Because unwrapping cannot know that a hyphen was inserted by the typesetter. A PDF that breaks 'inter-' and 'national' across two lines joins to 'inter- national' with the space separator and 'inter-national' with the empty one — never 'international'. Joining with nothing is the lesser evil for a hyphenated document, since the stray space disappears, but you still have to search for a remaining hyphen. Soft hyphens (U+00AD) are worse: they are invisible and survive the join, so a word can look right and still not match a search.
Related tools
Line Formatter — Add Prefix, Suffix & Join
Wrap each line with a prefix and suffix and join them with any separator, in your browser.
Text
HTML to Plain Text
Strip HTML tags from a snippet and get just the text — keeps block-level newlines, drops <script> and <style>, decodes entities.
Text
Markdown → Plain Text
Strip all Markdown formatting and keep readable plain text — useful for previews, summaries, email, character counts.
Convert
PDF Merger
Drop two or more PDFs, reorder them with the arrow buttons, and download a single merged PDF — all in your browser, no upload.
File
Text Diff Viewer
Compare two pieces of text and see line-by-line or word-by-word additions and removals.
Text
Text Repeater
Repeat a word, line or block of text any number of times — joined by a new line, space, comma, nothing, or your own separator.
Text