Remove Line Breaks
Paste text above to remove its line breaks.
Paste text that is split across many lines and get it back as one continuous block. This tool removes line breaks (including Windows, Mac, and Unix breaks), and lets you replace each break with a single space or with nothing at all. You can also collapse runs of extra spaces and trim the ends. Everything runs in your browser, so your text never leaves your device.
How to use
- Paste or type your text into the input box on the left.
- Choose whether to replace each line break with a single space or with nothing.
- Tick collapse extra spaces or trim ends if you want a tidier result.
- Read the cleaned text in the output box on the right.
- Click Copy to put the result on your clipboard, or Reset to start over.
Examples
- Input: "Hello\nworld" with replace by a single space gives "Hello world".
- Input: "part1\npart2" with replace by nothing gives "part1part2".
- Input: two paragraphs separated by a blank line, joined into one line with a single space between them.
FAQs
- Does this handle Windows, Mac, and Unix line breaks?
- Yes. It recognizes carriage return plus newline (Windows), a bare carriage return (classic Mac), a bare newline (Unix), and the Unicode line and paragraph separators. All of them are treated as line breaks.
- What is the difference between replacing with a space and with nothing?
- Replacing with a single space keeps words apart, so line one and line two become line one line two. Replacing with nothing joins the text directly, which is useful for rejoining a word or string that was wrapped onto two lines.
- What does collapse extra spaces do?
- It turns any run of two or more spaces or tabs into one space. This is handy after removing breaks, since indented or padded text can leave behind multiple spaces.
- Is my text uploaded anywhere?
- No. The tool runs entirely in your browser. Your text is never sent to a server, so it stays private.
- Will a blank line between paragraphs leave a gap?
- No. Consecutive line breaks are treated as one, so two paragraphs separated by a blank line are joined with a single space (or nothing), not several.
Related tools
- Word CounterCount words, characters, sentences, paragraphs, and reading time for any text. Live, private, and free in your browser.
- Case ConverterConvert text between UPPERCASE, lowercase, Title Case, Sentence case, camelCase, snake_case, and kebab-case instantly in your browser.
- Slug GeneratorTurn any title or text into a clean, lowercase URL slug. Spaces become hyphens, punctuation is stripped, and repeats are collapsed.
- HTML Entity EncoderEncode special characters to HTML entities or decode them back. Handles ampersand, less than, greater than, and quotes with a direction toggle.
- Lorem Ipsum GeneratorGenerate lorem ipsum placeholder text by paragraphs, sentences, or words. Copy it instantly for mockups, layouts, and design drafts.
- Remove Duplicate LinesRemove duplicate lines from text online. Optional case insensitive matching and whitespace trimming, with a count of removed lines.