How to remove line breaks
- Paste your text. Paste the text in the Text with line breaks box.
- Choose what replaces a line break. Pick A space, Nothing or My own text. Tick Keep paragraphs if the text has paragraphs you want to keep apart.
- Copy the result. The joined text appears in the Text without line breaks box. Press Copy to use it.
What is a line break?
A line break is an invisible character that ends a line and starts a new one. It is added when you press Enter.
Text copied from a PDF, an email or a subtitle file often has a line break at the end of every line, even in the middle of a sentence. This tool removes those breaks so the text flows as normal paragraphs again.
Features
- Three ways to join lines: with a space, with nothing, or with your own separator.
- Keep paragraphs option that removes breaks inside a paragraph only.
- Spaces at the start and end of each line are removed, so no double spaces appear.
- Instant result with a count of the line breaks removed.
- Copy, select or download the result as a .txt file.
The options
| Option | What it does | Example |
|---|---|---|
| A space | Joins the lines with one space | red / blue becomes red blue |
| Nothing | Joins the lines with no character between them | red / blue becomes redblue |
| My own text | Joins the lines with the text you type | red / blue becomes red, blue |
| Keep paragraphs | Joins lines inside a paragraph and leaves one empty line between paragraphs | Two paragraphs stay two paragraphs |
Empty lines are dropped. With Keep paragraphs on, one or more empty lines mark the end of a paragraph.
Why the result may not look right
- Words are split by a hyphen. A PDF often breaks a long word at the end of a line with a hyphen. The tool joins the lines but keeps the hyphen, so fix such words by hand.
- Words stick together. You chose Nothing. Choose A space for normal text.
- All paragraphs became one. Tick Keep paragraphs. It works when the paragraphs are separated by an empty line.
- The text stops growing. The box takes up to 500,000 characters.
Related tools
Three other tools on this site clean pasted text. The tool to remove extra spaces fixes double spaces that are left after the lines are joined. The tool to remove duplicate lines deletes repeated lines from a list. The online notepad keeps the cleaned text in your browser.
Is it private?
Yes. The text is changed inside your browser. It is not sent to our server and is not saved by us.
Frequently asked questions
- How do I remove line breaks from text?
- Paste the text in the box. The line breaks are replaced with a space and the result appears at once.
- Can I keep my paragraphs?
- Yes. Tick Keep paragraphs. Lines inside a paragraph are joined and the paragraphs stay apart.
- Can I replace line breaks with a comma?
- Yes. Choose My own text and type a comma and a space as the separator.
- Does it fix text copied from a PDF?
- It joins the broken lines. Words that the PDF split with a hyphen keep the hyphen and need a manual fix.
- Is the Remove Line Breaks tool free?
- Yes. It is free and you do not need an account.