# all·markdown

How to add a line break in Markdown

Try it — edit the markdown and watch the preview

Result

Runs entirely in this tab. Open the full editor to work on a real document.

A single newline does not create a line break in Markdown. Lines that sit next to each other are joined into one paragraph, separated by a space.

That surprises almost everyone once. It is a deliberate design choice: it means you can hard-wrap a source file at a comfortable width without that wrapping leaking into the rendered output.

The three ways to break a line

Two trailing spaces. Put two spaces at the end of a line and Markdown emits a <br>. It is the original syntax and it works everywhere — but the spaces are invisible, and any editor set to trim trailing whitespace on save will delete them without telling you.

A trailing backslash. End the line with \ instead. It renders identically and it is visible in the source, so nothing strips it by accident. If you are choosing a convention for a team, choose this one.

A blank line. This does something different: it ends the paragraph and starts a new one. Use it when you want a real paragraph gap, not a tight break.

When you need <br> directly

Inside a table cell, neither trailing spaces nor a backslash works — the cell is parsed before the line-break rules apply. Write <br> in the cell itself. Most Markdown renderers allow inline HTML for exactly this reason.

Common questions

Why does my Markdown ignore a single newline?
Markdown treats consecutive lines as one paragraph and joins them with a space. This is deliberate — it lets you hard-wrap source files at 80 characters without changing the output. To force a break you have to be explicit about it.
How do I add a line break without starting a new paragraph?
End the line with two spaces, or with a backslash. Both produce a <br> inside the same paragraph, so the two lines stay visually tight instead of getting a paragraph gap between them.
What is the difference between a line break and a new paragraph?
A line break moves to the next line inside the same block. A blank line ends the paragraph entirely and starts a new one, which most styles render with extra vertical space above it.
Are trailing spaces or backslashes better?
Backslashes are safer. Trailing whitespace is invisible, so editors that trim it on save will silently delete your line breaks. The backslash survives every formatter, which is why many teams standardise on it.
Why do my line breaks work on GitHub but not elsewhere?
GitHub comments and issues enable a "breaks" option that turns every newline into a <br>. Standard Markdown and most static site generators do not, so text that looked right in a GitHub comment collapses into one paragraph elsewhere.