Skip to content
FeaturesPricingBlogDownload
Home / Markdown syntax / Markdown line breaks

Markdown line breaks

In Markdown, pressing Enter once does not start a new line in the output: CommonMark joins the two lines into one paragraph. To force a line break, end the line with a backslash \ or with two spaces. To start a new paragraph, leave a blank line.

123 Main Street\
Springfield\
United States

That renders as three lines of one address. Without the backslashes, it renders as one line: 123 Main Street Springfield United States.

What are the ways to make a line break?

Method How Spec
Backslash \ at the end of the line CommonMark
Two trailing spaces two or more spaces at the end of the line CommonMark
HTML tag <br> at the end of the line Raw HTML, if the renderer allows it
Blank line an empty line between two blocks of text New paragraph, not a line break

The backslash is the most visible choice. Trailing spaces work the same way, but they are invisible in most editors, and many editors and formatters remove trailing whitespace on save, which silently deletes the break. In the example below, ␣ stands for a space:

123 Main Street␣␣
Springfield

GitHub's documentation lists the same three methods for .md files: two spaces, a backslash, or <br> (GitHub Docs, checked November 2026).

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

A line break keeps the text in the same paragraph and moves to the next line, rendered in HTML as <br>. A blank line ends the paragraph and starts a new one, rendered as a separate <p> with paragraph spacing.

First paragraph, line one.\
First paragraph, line two.

Second paragraph.

Use line breaks for text where line position matters, such as addresses, poems and lyrics. Use paragraphs for everything else.

Where do hard line breaks not work?

The CommonMark spec sets a few limits:

  • At the end of a paragraph or other block, trailing spaces are ignored and a final backslash is shown as a literal backslash.
  • Inside inline code and code blocks, backslashes and spaces are kept exactly as typed.
  • A # heading is a single line, so it cannot contain a break. A setext heading underlined with = or - can span several lines, but most renderers show it as one line.

How do you add extra blank space between paragraphs?

Several blank lines in a row count as one. Markdown has no syntax for extra vertical space, so where HTML is allowed, people add <br> on its own line or a non-breaking space &nbsp; as an otherwise empty paragraph. Both depend on the renderer, so styling the page is usually the cleaner fix.

Why do line breaks work on GitHub comments but not in my file?

GitHub renders a single Enter as a line break in issues, pull requests and discussions, but not in .md files in a repository, which follow the spec. Many chat apps and some note apps also treat Enter as a break. Text written in those places can look different when saved as a .md file and opened elsewhere.

Line breaks in Noteline

Noteline's editor shows each line where you typed it, and its desktop Word and PDF export keeps a single Enter as a line break instead of joining the lines, so the exported document matches the editor. Other Markdown apps follow the CommonMark rule and join those lines, so use a backslash wherever the break must survive in any app. Source mode, Cmd+Shift+M on a Mac or Ctrl+Shift+M on Windows and Linux, shows the raw Markdown when you need to check what a line ends with.

Common questions

Why are my lines merging into one?

A single line break inside a paragraph renders as a space in CommonMark. Add a backslash at the end of each line, or a blank line between lines that should be separate paragraphs.

Does <br> work everywhere?

No. It works where the renderer allows raw HTML, which includes GitHub. Renderers that strip HTML show nothing or show the tag as text, so the backslash is more portable.

Do two trailing spaces still work?

Yes, they are part of CommonMark. They are easy to lose, though, because they cannot be seen and editors often trim them.

Noteline

Download Noteline↓See pricing→

Related

  • Markdown blockquotes
  • Markdown lists
  • Markdown escape characters
  • Markdown headings
  • How to clean up AI Markdown from ChatGPT and Claude
  • Markdown syntax

A Markdown note editor with everything you need

We’re listening

Tell us what you need or what gets in your way. If something isn’t working, write to us any time.

contact@noteline.io→

Product

  • Download
  • Pricing
  • Features
  • Changelog

Learn

  • Markdown syntax
  • Use cases
  • Blog

Compare

  • vs Obsidian
  • vs Notion

Support

  • Help
  • Support
  • Privacy
  • Terms

© 2026 Notelinecontact@noteline.io