Remove line breaks
Paste text copied from a PDF or an email and turn its hard-wrapped lines back into flowing paragraphs. Keep paragraph breaks or put everything on one line, re-join words split by a hyphen, and keep bullet lists intact. Copy it or download a .txt file. Get your documents ready for AI. Free, in your browser, nothing uploaded.
Or drop a .txt or .md file here, or click to choose (up to 10MB)
Processed in your browser, never uploaded.
Result
0 line breaks removed · 0 paragraphs · 0 words · 0 characters
How it works
- 1
Paste your text or drop a file
Paste text copied from a PDF, an email or anywhere else with hard line breaks, or drop a .txt or .md file up to 10MB.
- 2
Choose how to join the lines
Keep paragraphs and join only the lines inside them, put everything on one line, or replace each line break with your own separator such as a comma.
- 3
Copy or download the result
The cleaned text updates as you type. Copy it to your clipboard or save it as a .txt file. Nothing is uploaded or stored.
When you need a line break remover
Text copied out of a PDF, a plain-text email, a terminal or an old document often has a hard line break at the end of every line. Pasted somewhere else, it shows up as short, ragged lines with sentences cut in half. Joining those lines by hand is slow on anything longer than a paragraph.
It is also a good first step before pasting text into a chat or saving it as a knowledge file for ChatGPT or Claude. Flowing paragraphs with words whole again are easier to read and search, and any blank lines you had between paragraphs are kept as the structure of the text.
What the options do
Collapse extra spaces turns any run of spaces and tabs into a single space and trims the start and end of each line, which tidies up text copied from columns or indented email replies. Turn it off to keep spacing exactly as pasted. Re-join hyphenated words repairs words split at the end of a line, and Keep list items stops bullet points and numbered steps from running together. Windows (\r\n), old Mac (\r) and Unix (\n) line breaks are all handled, and emoji, accented letters and Chinese, Japanese or Korean text come through unchanged.
Related free tools
To start from the PDF file itself, use PDF to Markdown, which rebuilds paragraphs and headings for you, and for web pages use HTML to Markdown. The token counter tells you whether the cleaned text fits a model's context window, and the text splitter breaks a long result into parts.
Frequently asked questions
- How do I remove line breaks from text?
- Paste the text into the box on this page. With Keep paragraphs selected, the line breaks inside each paragraph become spaces and the blank lines between paragraphs stay, so the result reads as normal paragraphs. The output updates as you type, and you can copy it or download it as a .txt file. There is nothing to install and no account.
- Why does text copied from a PDF have line breaks in the middle of sentences?
- A PDF stores each line of a page where it sits on the page, so when you copy the text, the end of every printed line comes along as a line break. Emails sent as plain text are often wrapped at a fixed width in the same way. Removing those breaks turns the copied lines back into flowing paragraphs.
- What is the difference between the three modes?
- Keep paragraphs turns single line breaks into spaces and turns one or more blank lines into exactly one blank line, so paragraphs stay separate. Remove all turns every line break into a space and gives you one line of text. Replace with puts your own separator, such as ", " or " | ", where each line break was, and skips blank lines, which is handy for turning a one-item-per-line list into a comma-separated one.
- What does re-join hyphenated words do?
- When a word is split across two lines with a hyphen, like "docu-" at the end of one line and "ment" at the start of the next, it is joined back into "document". This happens when the hyphen comes straight after a letter and the next line starts with a lowercase letter. If the next line starts with anything else, such as a capital letter or a number, the hyphen is kept and the two parts are joined with no space, so "well-" followed by "Known" becomes "well-Known". Turn the option off to keep every hyphen and join lines with a space as usual.
- Will my bullet points and numbered lists be kept?
- Yes, in Keep paragraphs mode with Keep list items on. A line that starts with a - or * and a space, a • bullet, or a number followed by a period or bracket and a space, such as "1. " or "2) ", starts its own line instead of being joined to the line above. A wrapped list item's second line is still joined to it. In the other two modes every line is joined, lists included.
- Is my text uploaded anywhere?
- No. The line breaks are removed inside your browser tab, and files you drop are read on your device. Your text is never sent to our servers or anyone else's, so it is fine for private documents and emails.
Need a whole folder turned into clean knowledge files for ChatGPT or Claude? KBP packs from $9 once.
More free tools
Token Counter
Count tokens for ChatGPT and OpenAI models exactly, with a Claude estimate. Paste text or drop a PDF, Word, Markdown, CSV, HTML or text file. Runs in your browser.
PDF Word Counter
Count words in one or more PDF documents, with characters, pages, reading time and exact OpenAI tokens. Flags scanned PDFs. Runs in your browser.
PDF to Markdown Converter
Convert PDFs to clean Markdown with headings, lists and paragraphs rebuilt, and running headers and page numbers removed. Runs in your browser.
Text Splitter
Split long text into chunks by tokens, words or characters, with optional overlap and part labels for ChatGPT or Claude. Breaks at paragraphs and sentences. Runs in your browser.
HTML to Markdown Converter
Convert HTML snippets, full web pages or .html files to clean Markdown with headings, links, lists and tables kept. Runs in your browser.
Free Knowledge Base Builder
Clean and chunk one file into .txt knowledge files with token counts. Free, no signup, nothing stored.
Related guides
ChatGPT & Claude Knowledge Files
Formats, sizes and limits for ChatGPT and Claude knowledge files.
Document Prep, Chunking & RAG
Turn messy documents into clean, retrieval-ready chunks.
Tool Comparisons & Alternatives
How Knowledge Builder Pro compares to the alternatives.
ChatGPT & Claude Build Guides
Step-by-step builds for real use cases.