Skip to main content
HomeBlogHow to Add a Line Break in Markdown (and Start a New Paragraph)

How to Add a Line Break in Markdown (and Start a New Paragraph)

Confused by Markdown line breaks? Learn the difference between a soft line break, a hard line break (two trailing spaces or a backslash), and a new paragraph — with clear, copy-paste examples.

Published: 2026-06-03

Why the markdown line break trips everyone up

If you've ever hit Enter in a Markdown file expecting a new line — only to see your text run together on one line in the preview — you've hit the most common Markdown gotcha there is. Unlike a Word document, Markdown doesn't treat every newline as a line break. A single newline is usually collapsed into a space, so "pressing Enter once" does almost nothing visually.

That's why the markdown line break deserves its own guide. Once you understand the difference between a soft line break, a hard line break, and a new paragraph, everything clicks. Below is every way to create a new line in markdown, with copy-paste examples you can try in our online Markdown viewer as you read. New to the syntax overall? Skim the Markdown cheat sheet first.

How Markdown treats a single newline (the "soft wrap")

Plain Markdown — the original CommonMark spec — treats a single newline as just whitespace. The renderer joins consecutive lines into one paragraph and replaces the newline with a space.

This is line one.
This is line two.

Renders as:

This is line one. This is line two.

Both source lines become a single flowing paragraph. This soft line break (or "soft wrap") is great for keeping your source readable on narrow screens without affecting the output — but if you genuinely wanted those on separate lines, you need a hard line break. This collapsing is the default across nearly every Markdown engine, including the rendering core of what Markdown actually is.

Hard line break with two trailing spaces

The classic, spec-approved way to force a markdown line break is to end the line with two or more spaces (or one tab) before pressing Enter. Those invisible trailing spaces tell the renderer: end the line here, start the next line immediately, but keep it inside the same paragraph.

First line··
Second line

Here ·· represents the two invisible spaces — in a real file you'd just type two spaces and see nothing. The result:

First line Second line

A single line break, no paragraph gap — perfect for addresses, short verses of poetry, or signature blocks.

The catch: the spaces are invisible, which makes them easy to lose when editing or copy-pasting. To verify they exist:

  • In VS Code, enable "Render Whitespace" (View → Appearance → Render Whitespace). Trailing spaces show as faint dots.
  • In a terminal, run cat -A yourfile.md — line ends print as $ (spaces before the $).
  • In our editor, the live preview updates instantly, so add the spaces and watch the break appear.

The backslash line break (\)

CommonMark (and most GFM-compatible renderers) also supports a backslash at the end of a line as a hard line break. This is visible, which solves the invisible-trailing-spaces problem entirely:

First line\
Second line

Renders identically to the two-space version:

First line Second line

The backslash escapes the newline itself — and because you can see it, it's a popular choice for poetry or addresses. Just remember the \ must be the very last character on the line; anything after it (even a stray space) breaks the effect. The GitHub Flavored Markdown guide lists which engines support this.

The <br> HTML tag

Because Markdown lets inline HTML pass through, you can drop a literal <br> (or <br/>) wherever you need a break:

First line<br>
Second line

Every renderer that allows raw HTML (most of them) will honor it — making this the most portable option. It's also the cleanest choice when you need a break inside another construct, like a list item or a table cell:

| Field | Value |
|-------|-------|
| Address | 123 Main St<br>Springfield, USA |

The trade-off: some strict "pure Markdown" environments strip raw HTML. For most blogs and docs, though, <br> just works.

New paragraph (the blank-line method)

A line break keeps text in the same paragraph. To start a genuinely new paragraph, separate the blocks with a blank line (two newlines in a row):

First paragraph of text.

Second paragraph of text.

Renders as two distinct paragraphs with vertical space between them:

First paragraph of text.

Second paragraph of text.

One newline = same line. Two spaces + Enter, \, or <br> = same paragraph, new line. Blank line = new paragraph. That's the whole mental model.

How GFM breaks: true changes the rules

Some renderers — GitHub Flavored Markdown, Marked, VuePress — offer an option that promotes every single newline into a hard line break automatically. In Marked it's breaks: true; in GitHub's own renderer it's effectively on.

When active:

First line
Second line

Renders as two lines, no trailing spaces required:

First line Second line

This is convenient for chat-style content, but it's a double-edged sword: line wraps you added in source for readability (say, to keep lines under 80 characters) all become visible breaks in the output. If a README looks "choppy" on GitHub but fine elsewhere, breaks: true is usually why. Know your renderer — test in our editor to see the difference.

Quick reference table

Goal Syntax Result
Same line (soft wrap) Single Enter Lines joined with a space
Hard line break Two trailing spaces + Enter New line, same paragraph
Hard line break (visible) \ + Enter New line, same paragraph
Hard line break (HTML) <br> New line, same paragraph
New paragraph Blank line between blocks New block with vertical gap
Auto-break every newline breaks: true / GFM Every Enter becomes a break

Common mistakes to avoid

1. Invisible trailing spaces that vanish on save. Editors and formatters sometimes strip trailing whitespace. If breaks work one minute and fail the next, switch to the backslash (\) or <br> to make the intent visible and survive auto-formatting.

2. Confusing a line break with a paragraph. Unwanted vertical gaps mean you've used a blank line where you meant to use trailing spaces or \. Break = same paragraph; blank line = new paragraph.

3. Backslash not at the end of the line. A trailing space after \ silently disables the break. First line\ (note the space) renders on one line. Delete the space.

4. Mixing breaks inside blockquotes or lists. Inside a Markdown blockquote or list item, the rules shift with indentation and renderer. When in doubt, use <br> explicitly, or test in our editor.

5. Assuming "it worked on GitHub so it works everywhere." GitHub's breaks: true behavior isn't universal. Content authored on GitHub may render as one long line on a stricter CommonMark site.

Frequently Asked Questions

How do I add a single line break in Markdown?

End the line with two trailing spaces (invisible) or a backslash (\), then press Enter. Both produce a hard line break — a new line without a paragraph gap. Many writers prefer the backslash for visibility.

What's the difference between a line break and a new paragraph?

A line break starts a new line within the same paragraph (no vertical space). A new paragraph starts a fresh block with vertical space. You get a break with two spaces + Enter, \, or <br>; you get a paragraph with a blank line.

Why are my Markdown newlines not showing up?

Because plain Markdown collapses single newlines into spaces. You need an explicit hard line break: two trailing spaces, a backslash, or <br>. Your renderer may also support breaks: true to auto-convert every newline. Enable whitespace rendering in your editor to confirm trailing spaces are present.

Does GitHub Flavored Markdown treat single newlines as line breaks?

Yes — GitHub's renderer effectively enables breaks: true, so a single Enter produces a visible break without trailing spaces. This is GFM-specific; strict CommonMark does not break on a single newline.

Wrapping up

The markdown line break comes down to one decision: a new line inside the same paragraph, or a brand-new paragraph? For a break, use two trailing spaces, a backslash, or <br>. For a paragraph, leave a blank line. Pick the method that's visible and survives formatting in your editor — then paste it into our online Markdown viewer to confirm it renders exactly the way you want before you publish.

Try it in your browser

Open the homepage editor to view, edit, and export Markdown instantly — no install required.

More articles

How to Add a Line Break in Markdown (and Start a New Paragraph) | MD File Viewer