Fix a copy from a PDF
Rejoin the sentences of an article or a contract that break at every line of the document, while keeping paragraphs.
Remove line breaks from text copied from a PDF or an email, keeping paragraphs if you need to, or turn a list into comma-separated values.
Text copied from a PDF, a plain-text email or a terminal often arrives broken into short lines. This tool removes those line breaks to rebuild continuous sentences, keeping the gap between paragraphs if you wish. It also turns a list with one item per line into values separated by commas, semicolons or tabs. The result follows your typing and nothing leaves your browser.
The text is split at every line ending (Windows CRLF, macOS and Linux LF, CR from old Mac files) and the lines are then joined with the chosen separator: a space by default, a comma, a semicolon, a tab, nothing at all or a separator you type. A custom separator is inserted as is; \n is not read as a line break there.
Spaces at the start and end of each line are removed before joining, which avoids double spaces when lines ended with a space. Turn the option off to join lines unchanged. Spaces inside a line are never touched; to collapse them, run the clean text tool afterwards.
Blank lines are skipped, so a list separated by gaps becomes one continuous run of values. With “Keep paragraphs”, one or more blank lines instead mark the end of a paragraph: the lines of each paragraph are joined and paragraphs stay separated by a blank line.
The tool does not rejoin words hyphenated at the end of a line: “process-” followed by “ing” becomes “process- ing”. Search for “- ” with find and replace if your text contains such breaks, taking care of genuine compound words.
Type, paste or import the text or list to put on one line.
Keep a space for prose, choose a comma or semicolon for a list, and decide whether to keep paragraphs.
Check where two lines meet, then copy the text or download it.
Rejoin the sentences of an article or a contract that break at every line of the document, while keeping paragraphs.
Turn a column of values into one “a, b, c” line for a spreadsheet, a keyword field or a query.
Join a list of email addresses with a semicolon to paste it into the To field of an email client.
Space separator, paragraphs not kept: the whole text fits on one line.
Input
This text was copied
from a PDF and every
line is broken.
Second paragraph
here.Result
This text was copied from a PDF and every line is broken. Second paragraph here.With the option on, the blank line still separates the two paragraphs.
Input
This text was copied
from a PDF and every
line is broken.
Second paragraph
here.Result
This text was copied from a PDF and every line is broken.
Second paragraph here.“Comma and space” separator: the spaces around “kiwi” and the blank line disappear.
Input
apple
pear
kiwi
bananaResult
apple, pear, kiwi, bananaYes. Turn on “Keep paragraphs”: the lines of each paragraph are joined and a blank line still separates paragraphs.
Choose “Comma and space”, or “Custom” with “,” for a comma alone. Blank lines are skipped.
No. The tool cannot tell a line-end hyphenation from a real hyphen as in “well-known”. Fix those cases by hand or with find and replace.
Yes. CRLF, LF and CR are all recognised as line endings; no invisible carriage return is left in the result.
No. The joining is done in your browser, including for an imported file.
Related tools
Tools similar or complementary to this one.
Remove extra spaces, repeated tabs and empty lines from copied text.
Automatically remove empty lines and lines containing only spaces from a text.
Add the same text to the start or end of every line: bullets, quotes, commas, tags.