All guides
Text

Why Markdown ignores your line breaks—and how to fix it

A newline, a blank line and a backslash produce different results. See which one your document needs.

You press Enter in a Markdown editor, but the preview keeps both sentences in one paragraph. Usually nothing is broken: a single newline and a new paragraph have different meanings in Markdown.

Try this small example in the Markdown editor:

Bring a notebook.
Bring a pen.

Meet at the front desk.

With Preserve line breaks off, the first two sentences share a paragraph. The blank line starts another paragraph. A narrow preview may wrap a sentence anyway; that is the page width, not a saved line break.

Choose the break you actually need

For a new paragraph, leave a blank line. For a deliberate break within the same paragraph, put a backslash at the end of the first line:

Bring a notebook.\
Bring a pen.

Meet at the front desk.

CommonMark's line-break rules also allow two spaces before a newline. A backslash is easier to spot when editing, and it is less likely to disappear when trailing spaces are trimmed.

Use a paragraph break between separate ideas. Use a hard line break for something like a short address or lines that need to stay separate within one block. Do not add hard breaks after every line just because a text editor wrapped them that way.

Preserve pasted line breaks when that is the intent

In CozyToolkit, open Options and turn on Preserve line breaks. A single newline inside a paragraph now renders as a visible break. The setting changes the rendered preview and HTML export; it does not insert backslashes into the Markdown source.

That matters when sending the source to someone else. Copy Markdown still copies the original text. Another editor may render those single newlines differently. Use explicit backslashes if you need the intention to travel with the Markdown, or send the rendered HTML.

Download the plain-newline sample and explicit-break sample to compare. On a phone, use Write and Preview to move between the source and its rendered result.

Check the exported document

For our sample, the results are:

Input and setting Paragraphs Explicit breaks inside paragraphs
Plain newlines, preservation off 2 0
Plain newlines, preservation on 2 1
Backslash before newline, preservation off 2 1

The heading in the downloadable sample is separate from these paragraph counts. Open the HTML versions to compare plain newlines, preserved newlines and an explicit break.

For a PDF, choose Print / PDF, then your browser's Save as PDF option if available. Check the print preview: paper size, margins and the browser's headers can affect where text wraps. A line break does not mean a page break.

What we checked

On 8 October 2026, we rendered all three versions using the same Markdown parser settings, HTML sanitizer and document exporter as the tool. Each produced two paragraphs; the latter two included one HTML line-break element. The results file records the rendered HTML and file hashes.

These checks cover this editor's output. A chat app, publishing platform or different Markdown parser may use different rules. Preview the destination before sending a document whose line layout matters.