How to remove line breaks
- Paste your text into the input box on the left. Line breaks are processed instantly as you type or paste.
- Choose a replacement mode — Space joins lines with a space (creating a single paragraph), Nothing removes the line break entirely (concatenating words), or Custom lets you specify a separator like
|or,. - Toggle Collapse spaces if you want multiple consecutive spaces reduced to one — useful when text already had trailing spaces before the line break.
- Copy the output using the copy button at the top right of the output panel.
When to use this tool
Pasting into single-line inputs
Many forms, spreadsheet cells, and search fields reject multi-line text. Strip line breaks to make the text compatible.
Cleaning up PDF copies
Text copied from PDFs often includes hard line breaks at every wrapped line. Remove them to get flowing paragraphs.
Joining list items into a sentence
Convert a newline-separated list into a comma-separated sentence with the custom separator option.
Preparing text for APIs
Some APIs and JSON strings need single-line values. Remove line breaks before encoding your content.
Email subject line cleanup
Copied subject lines from PDFs or documents may include unwanted breaks. Clean them in one click.
Concatenating code strings
Turn multi-line SQL, markdown, or template text into a single quoted string for programmatic use.
What are line breaks?
A line break (also called a newline) is the invisible character that moves text to the next line. When you press Enter in a text editor, you insert a line break.
There are two common formats: LF (Line Feed, \n) used on Unix/Linux/macOS, and CRLF (Carriage Return + Line Feed, \r\n) used on Windows. This tool handles both automatically.
Related tools: Text Cleaner for broader text cleanup, Duplicate Line Remover to deduplicate lists, or the Word Counter to count words in your result.