Remove Line Breaks
Remove all line breaks or replace them with a different character.
💡 Common Use Cases
- Convert multi-line text to a single line for CSV
- Prepare text for input fields that don't accept line breaks
- Fix copy-pasted text from PDFs with broken lines
- Combine lines for SQL IN clauses
Flatten multi-line text into a single line — or replace line breaks with anything you want
Text copied out of a PDF, an email, a chat window, or a printed source almost always arrives with line breaks in awkward places — mid-sentence, mid-paragraph, sometimes mid-word. Pasting that into a form, a database field, a CSV cell, or anywhere else that expects a single continuous string then becomes a mess. The Remove Line Breaks tool fixes this in one click: it strips every line break out of your text and gives you a single clean line, or replaces breaks with whatever character you choose (a space, a comma, a pipe, anything).
How to use it
Drop your PDF-copied or multi-line text into the editor. Choose whether to remove line breaks entirely, replace them with spaces, or replace them with a custom character or string. Click Apply. The result is a single block of clean text you can copy straight into any single-line input.
Why this comes up so often
PDFs with broken paragraphs. When you copy text from a PDF, the line breaks come from the visual layout — every line of the printed page becomes a line in the copied text, regardless of where sentences and paragraphs actually end. A paragraph that wrapped over seven lines on the page becomes seven separate lines in your clipboard. Replacing line breaks with spaces (and collapsing double-spaces afterwards) restores the original paragraph structure.
Spreadsheet imports. A CSV cell cannot contain a literal newline unless the cell is quoted, and many tools mishandle quoted multi-line cells. Flattening any multi-line content into a single line before pasting into a CSV avoids the entire class of problems.
Form fields. Many web forms (login pages, search boxes, single-line input fields) will silently truncate at the first newline, or paste raw \r\n characters that fail validation later. Stripping breaks first means what you paste is what gets saved.
Database inserts. Multi-line text in database fields is fine when it is intentional, but accidental newlines from copy-paste cause display bugs, especially when the value is later rendered in a context that does not respect them (like an HTML title attribute).
JSON and configuration values. JSON strings cannot contain raw newlines — they must be escaped as \n. Removing newlines before pasting into a JSON file avoids syntax errors.
SQL IN clauses. Turn a column of values from a spreadsheet into a comma-separated list by replacing every line break with , in one step.
Replace-with options
The tool gives you three handling modes. Remove entirely joins every line directly with no separator — useful when the original line breaks were arbitrary and you want a continuous string. Replace with space joins every line with a single space and is the right choice for reconstructing broken paragraphs from PDFs. Replace with custom lets you specify any string — a comma, a pipe character, a semicolon, the word " AND ", or anything else — which is invaluable for building delimited strings.
Watch out for these edge cases
Windows-style line endings (\r\n) and Unix-style endings (\n) are both handled correctly. The tool removes both consistently regardless of where your text originated.
If your input has double-spaces inside lines (from a previous round of conversion or a typing habit), running Remove Extra Spaces afterwards will give you the cleanest possible result.
If the text contains paragraph breaks (double newlines) that you want to preserve while collapsing single newlines, that is a more nuanced operation — use Find & Replace with regex to handle it precisely.
Privacy
The entire operation runs in your browser. Your text is never sent to a server, never logged, and never stored. This makes the tool safe for confidential documents, customer data, source code, or anything else you would not want to upload.
If you find yourself flattening multi-line text more than once a month, bookmark this page. It is one of those small tools that quietly saves you several minutes every time you reach for it.