OnlineNotes Logo

    Remove Line Breaks

    Text copied from a PDF or email often breaks in the middle of every sentence. Paste it here to join the lines back up, with or without paragraphs.

    Options

    About this tool

    A PDF has no idea what a sentence is. It stores lines at fixed positions, so copying a paragraph brings along a line break at the end of every printed line. Paste that into a document or an email and the text looks chopped. The same thing happens with old emails wrapped at about 70 characters, and with text from slides.

    The fix is to join the lines but keep the real paragraph breaks. Those are the blank lines, and the tool leaves them alone unless you turn that option off. Use the comma option to turn a vertical list into a single comma-separated line for a spreadsheet, a tag field or a SQL query.

    How it works

    1. Paste the text into the input box.
    2. Each line is trimmed, so joined words never end up with double spaces.
    3. Lines inside a paragraph are joined with what you pick: a space, a comma or nothing.
    4. A blank line counts as a paragraph break and stays, unless you turn off "Keep paragraph breaks".

    Worked example

    Input

    apples
    oranges
    pears

    Output

    apples, oranges, pears

    With the comma option, a vertical list becomes one line that you can paste into a spreadsheet cell or a tag field.

    Edge cases and limits

    • A word split with a hyphen at a line end, such as "exam-" and "ple", stays as "exam- ple". Fix those with find and replace.
    • Empty lines count as paragraph breaks, so a PDF that puts a blank line after every line needs "Keep paragraph breaks" off.
    • Bullets and numbers at the start of a line are not removed. They become part of the joined text.

    Frequently asked questions

    How do I remove line breaks from text copied from a PDF?

    Paste it in the box with "Keep paragraph breaks" on and the replacement set to a space, then copy the output. Sentences join up and paragraphs stay.

    How do I turn a list into a comma-separated line?

    Set the replacement to a comma and paste the list, one item per line.

    What is the difference between a line break and a paragraph break?

    A line break ends one line. A paragraph break here means a blank line between two blocks of text, which is two line breaks in a row.

    Related tools