Skip to main content

Markdown New Lines and Line Breaks

How to start a new line without starting a new paragraph, why a single Enter does nothing, and where GitHub, Obsidian, and chat apps break the rule.

Short answer

One Enter does not start a new line in Markdown: the two lines are joined with a space. End the line with two spaces or a backslash (\), or use <br>, to break it. A blank line starts a new paragraph. The exception is GitHub issues, pull requests, and comments, where a single Enter already breaks the line.

3 Ways to Add a Line Break

Each of these ends the line and keeps the next one in the same paragraph. The copy button gives you the real trailing spaces.

Two trailing spaces (shown as ··)
Line 1··
Line 2
Preview

Line 1
Line 2

The original Markdown line break and the most portable one. Two or more spaces at the end of the line, then Enter.

Backslash at the end of the line
Line 1\
Line 2
Preview

Line 1
Line 2

Added by CommonMark and supported by GitHub, GitLab, and VS Code. Visible in the source and survives whitespace trimming.

HTML <br> tag
Line 1<br>
Line 2
Preview

Line 1
Line 2

Works wherever inline HTML is allowed, including GitHub and inside table cells. Reddit, Discord, and Slack do not render HTML.

Which one to use? The backslash for files you share: it is visible and survives editors that strip trailing whitespace. Two spaces when the file also has to render somewhere older, like old Reddit. <br> inside tables.

Why a Single Enter Does Nothing

A newline inside a paragraph is a soft break. CommonMark renders it as a space (or a plain newline in the HTML, which the browser shows as a space). That is deliberate: you can wrap long lines in the source, one sentence per line if you like, without changing the output. A hard break is the opt-in version that produces a <br>.

Soft break (one Enter)
Line 1
Line 2
Preview

Line 1 Line 2

Renders as one line: Line 1 Line 2.

Hard breaks for an address
Jane Doe\
123 Main Street\
Springfield
Preview

Jane Doe
123 Main Street
Springfield

Short lines that must stay separate are where hard breaks earn their keep.

Paragraphs and Blank Lines

A blank line ends a paragraph and starts the next one. One blank line or ten makes no difference, so to add visible empty space you need something on that line.

New paragraph: one blank line
Paragraph one.

Paragraph two.
Preview

Paragraph one.

Paragraph two.

Extra blank lines collapse
Paragraph one.



Paragraph two.
Preview

Paragraph one.

Paragraph two.

Renders exactly like the example above.

Add an empty line with &nbsp;
Paragraph one.

&nbsp;

Paragraph two.
Preview

Paragraph one.

 

Paragraph two.

The non-breaking space makes a paragraph that is not empty, so it takes up a line.

Line Breaks in Lists and Tables

In a list item, break the line as you would in a paragraph and indent the next line to the item's text (see the lists guide for the indent rules). In a table, each row must stay on one source line, so <br> is the only option.

Hard break inside a list item
- First line of this item\
  second line of the same item
- Item two
Preview
  • First line of this item
    second line of the same item
  • Item two
Line break inside a table cell
| Cell | Description |
|------|-------------|
| A    | Line one<br>Line two |
Preview
Cell Description
A Line one
Line two

Works on GitHub and GitLab. Renderers that block HTML show the tag as text.

GitHub: README Files vs Comments

GitHub uses two newline rules, and its docs say so. In issues, pull requests, discussions, and comments, one Enter is a line break. In a README or any other .md file, the same text renders on one line. That is why text pasted from an issue into a README suddenly runs together.

Same text, in a README.md
Roses are red
Violets are blue
Rendered in a .md file

Roses are red Violets are blue

Same text, in an issue or comment
Roses are red
Violets are blue
Rendered in an issue or comment

Roses are red
Violets are blue

Other places that change the rule: Obsidian's Reading view shows single newlines as breaks until you turn on Strict line breaks (Settings > Editor), and VS Code's preview follows CommonMark unless you enable markdown.preview.breaks. Discord and Slack keep every newline you type; use Shift+Enter to add one without sending.

Common Mistakes

Trailing spaces are invisible, which makes these hard to spot. Spaces are shown as · below.

Broken

Line 1·
Line 2

Fixed

Line 1··
Line 2
One trailing space does nothing. It takes two or more (shown here as ·), or a backslash.

Broken

Last line of the paragraph.\

Fixed

Last line of the paragraph.
A hard break only works between two lines of text. At the end of a paragraph, the backslash prints as a literal \ and trailing spaces are dropped.

Broken

Line 1\·
Line 2

Fixed

Line 1\
Line 2
The backslash has to be the very last character. With a space after it (shown as ·), it prints as a literal backslash and the lines join.

Broken

Paragraph one.



Paragraph two.

Fixed

Paragraph one.

&nbsp;

Paragraph two.
Extra blank lines collapse into a single paragraph break. To add visible space, put a paragraph containing only &nbsp; between them.

Quick Reference

SyntaxResultNotes
Line 1·· Line 2Line breakTwo trailing spaces (· = space)
Line 1\ Line 2Line breakBackslash as the last character
Line 1<br>Line 2Line breakHTML; also works in table cells
Line 1 Line 2Same lineSoft break renders as a space
Para 1 Para 2New paragraphOne blank line
&nbsp;Empty lineOn its own line between blank lines

Platform Support

What one press of Enter does in each place, and how to force a break where it does not.

PlatformOne Enter renders asTo force a break
CommonMark / GFMA spaceTwo trailing spaces, a backslash, or <br>
GitHub README and .md filesA spaceTwo trailing spaces, a backslash, or <br>
GitHub issues, PRs, comments, discussionsA line breakNothing extra; a blank line still starts a new paragraph
GitLabA space, including in commentsTwo trailing spaces or a backslash
VS Code previewA space (markdown.preview.breaks is off by default)Two trailing spaces, a backslash, or <br>
Obsidian Reading viewA line break, unless Strict line breaks is onShift+Enter, or two trailing spaces with Strict line breaks on
RedditA spaceTwo trailing spaces; a backslash only on www.reddit.com
NotionEnter starts a new blockShift+Enter for a line break inside a block
Discord and SlackA line breakShift+Enter adds one without sending; Markdown break syntax is not needed

Frequently Asked Questions

How do I add a new line in Markdown?

End the line with two spaces, or with a backslash (\), then press Enter. You can also use an HTML <br> tag where HTML is allowed. All three keep the text in the same paragraph. For a new paragraph instead, leave a blank line.

Why doesn't pressing Enter create a new line in Markdown?

In CommonMark and GitHub Flavored Markdown, a single line ending inside a paragraph is a soft break, which renders as a space. That lets you wrap long lines in the source without changing the output. Add two trailing spaces or a backslash to make it a real line break.

What is the difference between a line break and a new paragraph?

A line break (two spaces, a backslash, or <br>) moves the next line down but keeps it in the same paragraph, with no extra space. A blank line starts a new paragraph, which usually adds vertical space. Use line breaks for addresses, poems, and signatures.

How do I add a blank line or extra space in Markdown?

Extra blank lines collapse, so pressing Enter several times does not add space. Put a line containing only &nbsp; between two blank lines to create an empty paragraph, or use <br> where HTML is allowed.

Why do line breaks work in my GitHub comment but not in my README?

GitHub renders them differently on purpose. In issues, pull requests, discussions, and comments, a single Enter is a line break. In a README or any other .md file, it is a space, so you need two trailing spaces, a backslash, or <br>.

Does the backslash line break work everywhere?

It is part of CommonMark and GitHub Flavored Markdown, so GitHub, GitLab, VS Code, and www.reddit.com support it. Parsers that predate CommonMark, such as old Reddit's, print the backslash instead. Two trailing spaces are the most portable choice.

Why did my two trailing spaces stop working?

Something removed them. Editors and formatters set to trim trailing whitespace, such as an EditorConfig trim_trailing_whitespace rule or VS Code's files.trimTrailingWhitespace setting, delete them on save. Switch to a backslash, which they leave alone.

How do I add a line break in a Markdown table cell?

Use <br> inside the cell: | Line one<br>Line two |. Each table row has to stay on one source line, so two trailing spaces and backslashes cannot work there. This needs a renderer that allows inline HTML, which GitHub and GitLab do.

How do I add a line break inside a list item?

Use two trailing spaces or a backslash, exactly as in a paragraph, and indent the next line to the item's text. The indent is not strictly required for a plain continuation line, but it keeps the source readable.

How do I start a new line in Discord or Slack?

Press Shift+Enter. Enter on its own sends the message. Every newline you type in Discord or Slack shows up as a line break, so the Markdown trailing-space and backslash tricks are not needed there.

Why does Obsidian show my line breaks when GitHub does not?

Obsidian's Strict line breaks setting is off by default, so Reading view shows every single newline as a break. Turn it on in Settings > Editor to get the standard Markdown behavior, where a single newline is a space.