Markdown Line Breaks: New Lines, Hard Breaks & Paragraphs Explained

To create a hard line break in Markdown, CommonMark supports two main forms: end the first line with two or more spaces, or place a backslash immediately before the source newline.

To start a new paragraph, leave a blank line instead.

The confusing part is that pressing Enter once does not necessarily create a visible line break in the rendered document. In CommonMark, an ordinary newline inside a paragraph becomes a soft line break, or softbreak. How that softbreak appears can depend on the renderer. (CommonMark 0.31.2)

Here is the practical difference:

What you want Markdown source Meaning
Continue one paragraph with an ordinary source newline First line + Enter + Second line Soft line break
Force the next text onto a new rendered line Two trailing spaces + Enter Hard line break
Force the next text onto a new rendered line \ + Enter Hard line break
Start a new paragraph Leave a blank line New paragraph

These rules describe the CommonMark baseline. Markdown applications and platforms can apply different rendering behavior, so the same source can sometimes look different in different places.

Markdown Line Break Syntax: Quick Reference

The easiest way to understand Markdown line breaks is to separate what exists in the source file from what you expect to see after the Markdown is rendered.

Ordinary source newline

Markdown source:

First line
Second line

This contains two source lines, but under CommonMark the newline inside the paragraph becomes a softbreak.

It does not explicitly request a hard rendered line break.

Hard break with two trailing spaces

Markdown source:

First line··
Second line

Here, ·· represents two actual space characters at the end of First line. Do not type the dots.

Under CommonMark, two or more spaces immediately before the line ending create a hard line break. (CommonMark 0.31.2)

The rendered meaning is:

First line
Second line

The two pieces of text remain part of the same paragraph even though the second starts on a new displayed line.

Hard break with a backslash

Markdown source:

First line\
Second line

A backslash immediately before the line ending also creates a hard line break under CommonMark and GitHub Flavored Markdown. (CommonMark 0.31.2) (GitHub Flavored Markdown specification)

This version has one practical advantage: unlike trailing spaces, the line-break syntax is visible while editing the source.

New paragraph

Markdown source:

First paragraph.

Second paragraph.

The blank line separates the text into two paragraphs.

That is different from creating a hard line break inside one paragraph.

Why Pressing Enter Once May Not Create a Visible New Line

One of the most common Markdown frustrations looks like this:

123 Main Street
Houston, TX 77002

The author sees two lines in the source and expects two lines in the rendered result.

But in CommonMark, an ordinary line ending inside paragraph text becomes a softbreak.

CommonMark allows a softbreak to be rendered in HTML as either a line ending or a space and notes that the browser result is the same. That is why two source lines can appear as one flowing paragraph. (CommonMark 0.31.2)

That distinction is important.

It is more accurate to say:

Pressing Enter once inside a Markdown paragraph normally creates a source newline that is parsed as a soft line break.

It is less accurate to say:

Markdown ignores Enter.

The source newline is not ignored. It has a defined meaning. It simply does not explicitly request a hard line break.

If the address above needs to display as two lines, you can use two trailing spaces:

123 Main Street··
Houston, TX 77002

where ·· represents two spaces.

Or, in a CommonMark-compatible renderer:

123 Main Street\
Houston, TX 77002

How to Create a Hard Line Break in Markdown

A hard line break means the next text begins on another rendered line while remaining part of the same paragraph.

CommonMark provides two clear forms.

Use two trailing spaces

Add at least two spaces before the source newline:

First line··
Second line

Again, the visible dots represent spaces.

CommonMark technically defines two or more spaces before the line ending as a hard line break. Two spaces are generally the cleaner authoring choice because additional trailing spaces add no useful meaning.

A CommonMark renderer represents this hard break in HTML as a <br />. (CommonMark 0.31.2)

The downside is obvious: trailing spaces are invisible.

You can easily delete them without realizing it, and some editors or formatting tools automatically trim trailing whitespace.

Use a backslash before the newline

CommonMark also supports this:

First line\
Second line

This creates the same basic kind of hard break.

The backslash form is often easier to recognize in the source because the syntax is visible.

It is supported by CommonMark and GitHub Flavored Markdown, but Markdown implementations do not all provide identical syntax support. If portability across many Markdown systems matters, verify the renderer you are targeting. (GitHub Flavored Markdown specification)

Can you use <br> instead?

CommonMark recognizes raw inline HTML, and GitHub currently documents <br/> as an explicit line-break option in .md files. (CommonMark 0.31.2) (GitHub Markdown formatting documentation)

For example:

First line<br>
Second line

can create a visible break when the Markdown application permits raw HTML.

Other Markdown applications may restrict, sanitize, or disable raw HTML, so <br> should be treated as application-dependent rather than universally portable.

For ordinary CommonMark-style authoring, the two-space or backslash forms make the Markdown intent clearer without depending on raw HTML support.

Hard Line Break vs. New Paragraph

A hard line break and a paragraph break are visually related but structurally different.

Consider this:

First line··
Second line

The two trailing spaces create a hard line break.

The text remains part of the same paragraph.

Now compare it with:

First paragraph.

Second paragraph.

The blank line creates two separate paragraphs.

That distinction matters because renderers can style paragraphs differently from line breaks. A theme or website might add vertical margins around paragraphs while using much tighter spacing for <br> line breaks.

If your goal is:

Put the next line directly underneath this one.

you probably want a hard line break.

If your goal is:

Start a separate block of prose.

you probably want another paragraph.

How Blank Lines Work in Markdown

Under CommonMark, a blank line contains no characters other than spaces or tabs. In ordinary prose, blank lines separate paragraph blocks. (CommonMark 0.31.2)

For example:

Paragraph one.

Paragraph two.

creates two paragraphs.

Adding more empty source lines does not keep increasing the structural paragraph separation:

Paragraph one.


Paragraph two.

In ordinary paragraph content, multiple blank lines do not create additional paragraph blocks or additional paragraph separation.

The amount of visible space between paragraphs is generally determined by the renderer and its styling, such as CSS on a web page.

This is why repeatedly pressing Enter is not a reliable Markdown technique for controlling visual spacing.

There is one important caveat. Blank lines can also affect the structure of other Markdown blocks. Lists are one example, where blank lines can influence whether a list is considered tight or loose under CommonMark. This guide focuses on ordinary prose rather than every block-level Markdown rule.

Markdown Whitespace: When Trailing Spaces Matter

Most trailing whitespace in text is something people want to remove.

Markdown hard breaks create an important exception.

Consider three versions of the same source.

One trailing space:

First line[1 space]
Second line

Two trailing spaces:

First line[2 spaces]
Second line

Five trailing spaces:

First line[5 spaces]
Second line

Under CommonMark, the one-space version does not create the two-space hard-break syntax.

The two-space version does.

The five-space version also qualifies as a hard line break because CommonMark specifies two or more spaces, but keeping all five spaces provides no additional meaning. (CommonMark 0.31.2)

This is why trailing-whitespace cleanup needs to distinguish between accidental whitespace and whitespace that carries Markdown meaning.

Imagine this source:

First line··
Second line

If a cleanup tool blindly removes every trailing space, it becomes:

First line
Second line

The source has changed from an explicit CommonMark hardbreak to a softbreak.

That can change the rendered result.

The MarkForge Markdown Cleaner is designed to clean Markdown whitespace while preserving meaningful two-space hard breaks.

Its verified trailing-space behavior is:

  • no trailing spaces → unchanged
  • one trailing space → removed
  • exactly two trailing spaces → preserved
  • a five-space trailing run → normalized to exactly two

It is a cleanup tool, not a complete Markdown validator, linter, or universal formatter. But this is one case where whitespace cleanup needs to preserve Markdown syntax rather than simply deleting every trailing space.

CommonMark, GFM, and GitHub Do Not Always Render Newlines the Same Way

One reason Markdown line breaks cause so much confusion is that people often use the word Markdown to describe both specifications and individual applications.

They are not always the same thing.

CommonMark

Under the CommonMark baseline:

First line
Second line

contains a softbreak inside one paragraph.

Two or more spaces before the newline create a hardbreak:

First line··
Second line

A backslash before the newline also creates a hardbreak:

First line\
Second line

(CommonMark 0.31.2)

GitHub Flavored Markdown

The GitHub Flavored Markdown specification follows the same basic distinction between soft line breaks and hard line breaks. GFM includes the CommonMark hard-break forms using trailing spaces and backslash. (GFM Specification)

GitHub's website can behave differently depending on context

GitHub's actual website adds another layer.

According to GitHub's current documentation, a line break is automatically rendered when you enter a newline in places such as:

  • issues
  • pull requests
  • discussions

But GitHub documents different behavior for Markdown files such as .md files. There, it recommends explicit methods such as two trailing spaces, a backslash, or <br/> when a forced line break is needed. (GitHub Markdown formatting documentation)

This is GitHub product behavior.

It should not be confused with saying:

GitHub Flavored Markdown defines every ordinary newline as a hard break.

It does not.

That difference also explains why Markdown copied from one application can look different after being pasted into another.

Why Your Markdown Line Break Is Not Working

Several common problems account for most Markdown line-break failures.

You pressed Enter once but still see one paragraph

You probably created a softbreak rather than an explicit hardbreak.

If you need a forced visible line break, use two trailing spaces or the supported backslash syntax.

Your two-space line break disappeared after saving

An editor, formatter, or cleanup process may have removed trailing whitespace.

Because the two spaces carry Markdown meaning, removing them changes the syntax.

Check whether your editor has a "trim trailing whitespace" feature enabled. If you intentionally use two-space hard breaks, your cleanup workflow needs to preserve them.

The backslash method works in one application but not another

CommonMark and GFM support the backslash form, but not every Markdown system follows CommonMark exactly.

Check the documentation for the Markdown implementation you are using.

Extra blank lines do not create additional paragraph separation

Blank lines create block separation, not arbitrary layout spacing.

Multiple blank lines between ordinary paragraphs do not create additional paragraph blocks or progressively larger semantic separation.

If you need precise visual spacing, that is usually a renderer or styling concern rather than a Markdown paragraph feature.

<br> appears as text or disappears

The renderer may not allow raw HTML, or it may sanitize HTML elements.

Use Markdown-native hard-break syntax where possible if portability matters.

Your hard-break marker is at the end of a block

CommonMark hard line breaks separate inline content within a block.

Adding two trailing spaces or a backslash at the very end of a paragraph does not create an additional blank rendered line after that paragraph.

Hard-break syntax also does not function as a hard line break inside contexts such as code spans or HTML tags. (CommonMark 0.31.2)

If you are trying to add vertical space after a paragraph, that is a different problem from inserting a hard break between two pieces of inline content.

Frequently Asked Questions

Does GitHub treat Markdown line breaks differently?

Sometimes.

GitHub Flavored Markdown itself retains the normal softbreak and hardbreak distinction, but GitHub's website automatically renders ordinary source newlines as visible line breaks in certain contexts such as issues, pull requests, and discussions.

GitHub's .md file documentation instead recommends explicit hard-break syntax such as two trailing spaces, a backslash, or <br/> when you need a forced line break. (GitHub Markdown formatting documentation)

Can I use <br> for a line break in Markdown?

Yes, if the Markdown application allows raw inline HTML.

For example:

First line<br>
Second line

can create a line break in renderers that permit the <br> element.

CommonMark recognizes raw inline HTML, and GitHub currently documents <br/> for this purpose in .md files. Other applications may restrict or sanitize raw HTML, so it is not universally portable.

Why did removing trailing whitespace remove my Markdown line breaks?

Two or more trailing spaces immediately before a line ending have semantic meaning under CommonMark: they create a hard line break.

If a formatter changes:

First line··
Second line

into:

First line
Second line

it has changed an explicit hardbreak into a softbreak.

That is why Markdown cleanup tools need to distinguish accidental trailing whitespace from intentional two-space hard breaks.

The Bottom Line

A Markdown source newline and a rendered hard line break are not necessarily the same thing.

Under CommonMark, pressing Enter once inside ordinary paragraph text normally creates a softbreak. If you need an explicit hard line break within the same paragraph, use two trailing spaces or a backslash before the newline.

If you want a new paragraph, leave a blank line instead.

Those distinctions explain most Markdown line-break problems. The remaining differences usually come down to the Markdown flavor, renderer, editor, or application processing the source.