Remove line breaks
Paste text with breaks in the wrong places and it comes back as proper paragraphs as you type. Nothing is uploaded.
How to use it#
- Paste your text into the box above.
- Choose keep paragraphs to leave the blank lines between them, or one line to join everything.
- Pick what goes where each break was: a space, a comma, or nothing.
- Tick rejoin words split with a hyphen if the text came from a justified PDF.
- Copy the result, or download it as a text file.
Why text from a PDF has a break at the end of every line#
A PDF does not store paragraphs. It stores lines of text at fixed positions on a page, and the reader works out where one line ends by where the next one starts. When you copy from it, each of those lines arrives with a hard break after it. Paste that into an email or a document and the text stops at the old column edge and never reflows.
Emails wrapped at 72 characters, text copied out of a terminal, and subtitles have the same problem. The breaks suited one width of screen and land in the wrong place on any other.
Keeping the paragraphs#
Keep paragraphs removes the breaks inside a paragraph and leaves the blank line between one paragraph and the next. It is the setting to use for prose, because a wall of text with no paragraph breaks is harder to read than the broken version you started with.
One line joins everything, blank lines included. That is what you want for a list, or for a sentence going into a form field that takes a single line.
A space, a comma, or nothing#
A space is right for prose, where each break stood in for the space between two words. Spaces already at either end of a line are trimmed first, so a break never leaves two spaces in a row.
A comma turns a column into a list: a column of email addresses copied out of a spreadsheet comes out ready for the To field. Nothing is for text where the break fell in the middle of something, such as a long link or a code that was wrapped to fit.
Words split with a hyphen#
Justified text in a PDF often breaks a long word across two lines with a hyphen, like docu- at the end of one line and ment at the start of the next. Joined with a space, that leaves docu- ment in the middle of your sentence.
Rejoin words split with a hyphen puts those words back together. It only acts when a letter and a hyphen end a line and a lowercase letter starts the next, which is what a split word looks like. It cannot tell a split word from a hyphenated one that happened to break at its hyphen, so self- and aware becomes selfaware. It is off until you tick it, and worth a read through afterwards.
Frequently asked questions#
How does it tell where a paragraph ends?
#
By the blank lines. A line with nothing on it, or only spaces, ends a paragraph, and a run of blank lines counts as one. Some PDFs copy without any blank lines between paragraphs, and then there is nothing in the text to say where one ends. Keep paragraphs will give you one long paragraph, and you can put the breaks back where you want them.
What does rejoin words split with a hyphen do?
#
It joins a word that was split across two lines, such as docu- and ment, back into document. It acts only when the first line ends in a letter and a hyphen and the next starts with a lowercase letter. A real hyphenated word that happened to break at its hyphen loses the hyphen too, so leave it off unless the text came from a justified PDF.
Does it change the spaces inside a line?
#
No. Only the spaces at the very start and end of each line are removed, so a break with a trailing space before it does not turn into a double space. Everything between the first and last character of a line is left as it was.
Can I turn a column of values into a comma separated list?
#
Yes. Paste the column, choose one line, and replace each break with a comma. Blank rows are skipped, so a column with gaps in it does not leave empty entries between the commas.
Is my text uploaded anywhere?
#
No. The line breaks are removed in this browser tab as you type, so text copied out of a contract or a private email goes nowhere else.