Markdown Line Breaks

Learn how to create line breaks and new lines in Markdown.

This guide explains soft line breaks, hard line breaks, paragraph breaks, and HTML <br> tags.

It also covers GitHub Markdown behavior, CommonMark compatibility, common mistakes, and best practices with practical examples.

🟒 Practice as you read: Open the Markdown Editor to try line breaks with live preview, or bookmark the Markdown Cheat Sheet for quick syntax reference.

Open EditorDownload PDF

Quick Answer

To create a Markdown line break, use one of these methods:

  • Add two trailing spaces at the end of a line, then press Enter.
  • Use the HTML <br> tag for an explicit line break.
  • Leave a blank line to start a new paragraph.

Most Markdown editors support these methods, but rendering may vary slightly between GitHub Flavored Markdown (GFM), CommonMark, and other Markdown processors. Always preview your document before publishing.

What Are Markdown Line Breaks?

A Markdown line break moves text onto the next line without starting a new paragraph.

Unlike word processors, pressing Enter once doesn't always create a visible new line. In most Markdown implementations, a single press of Enter creates a soft line break, which may be rendered as a space instead of a new line.

To create a visible line break, use one of these methods:

  • Add two trailing spaces before pressing Enter.
  • End the line with a backslash (\) (supported by CommonMark).
  • Use the HTML <br> tag.

Understanding line breaks helps you format content correctly in:

  • README files
  • Documentation
  • Technical guides
  • Release notes
  • Contact information
  • Postal addresses
  • Poetry and song lyrics

Related: If you're new to Markdown, start with Markdown Basics. To learn when to use blank lines instead of line breaks, see Markdown Paragraphs.

Why Are Line Breaks Important?

Using the correct type of line break improves readability and ensures your Markdown renders consistently across different editors and platforms.

Line breaks are commonly used for:

  • Contact information
  • Postal addresses
  • Poetry and song lyrics
  • Release notes
  • README files
  • Documentation where each line must remain separate

Using the wrong method can cause multiple lines to appear as a single paragraph, resulting in unexpected formatting on platforms like GitHub, GitLab, documentation websites, and static site generators.

In the following sections, you'll learn the different types of Markdown line breaks, when to use each method, and how they behave across popular Markdown implementations.

Types of Markdown Line Breaks

Markdown provides several ways to move text to a new line or separate content. Each method serves a different purpose and may behave differently depending on the Markdown parser.

Method Starts a New Line Starts a New Paragraph Best Used For
Soft line break Depends on the parser ❌ Keeping Markdown source readable
Hard line break (two trailing spaces) βœ… ❌ Addresses, poetry, contact information
Backslash (\) line break βœ… (CommonMark) ❌ CommonMark-compatible documents
Blank line βœ… βœ… Normal paragraphs
HTML <br> tag βœ… ❌ Consistent rendering across supported Markdown processors

The following sections explain how each method works and when you should use it.

Soft Line Break

A soft line break is created by pressing Enter once.

This is line one.
This is line two.

Output

Live Preview

This is line one. This is line two.

Most Markdown parsers treat these lines as part of the same paragraph, so they may be rendered on a single line.

Use soft line breaks to keep Markdown source files readable, but don't rely on them when you need a visible line break.

Hard Line Break

A hard line break forces text onto the next line without starting a new paragraph.

The traditional Markdown syntax is to add two trailing spaces before pressing Enter.

First line.Β·Β·
Second line.

Note: The dots (Β·Β·) represent two trailing spaces and are shown only to make the spaces visible.

Output

Live Preview

First line.
Second line.

Hard line breaks are supported by GitHub Flavored Markdown and most modern Markdown processors.

Backslash (\) Line Break

CommonMark also allows a hard line break by ending a line with a backslash (\).

First line.\
Second line.

Output

Live Preview

First line.
Second line.

Many developers prefer this approach because the backslash is visible in the source file, unlike trailing spaces.

If you're writing Markdown that follows the CommonMark specification, the backslash method is often easier to read and maintain.

Paragraph Break

To start a new paragraph, leave one blank line between blocks of text.

This is the first paragraph.

This is the second paragraph.

Output

Live Preview

This is the first paragraph.

This is the second paragraph.

Paragraph breaks are the recommended way to separate ideas in articles, documentation, blog posts, and most long-form content.

Related: Read Markdown Paragraphs to learn more about blank lines, paragraph spacing, and formatting best practices.

Using the `<br>` Tag in Markdown

When you need an explicit line break, you can use the HTML <br> tag.

First line<br>
Second line

Output

Live Preview

First line
Second line

Most modern Markdown processors, including GitHub Flavored Markdown, support inline HTML such as <br>.

πŸ’‘ Tip: You can use multiple <br> tags to add extra vertical spacing when needed. However, avoid excessive useβ€”paragraph breaks are usually more readable and easier to maintain.

Use the <br> tag when consistent rendering is more important than keeping your document strictly Markdown-only.

Related: See Markdown HTML to learn which HTML tags are supported in Markdown and GitHub.

Markdown Line Breaks on GitHub

GitHub Flavored Markdown (GFM) supports multiple ways to create line breaks, making it suitable for README files, documentation, issue templates, and Wikis.

You can create line breaks using:

  • Two trailing spaces
  • A backslash (\)
  • The HTML <br> tag
  • A blank line to start a new paragraph
First lineΒ·Β·
Second line

New paragraph

Third line<br>
Fourth line

Fifth line\
Sixth line

GitHub renders all of these methods correctly. However, blank lines create new paragraphs, while the other methods create line breaks within the same paragraph.

Related: Learn more about GitHub-specific syntax in GitHub Flavored Markdown (GFM).

CommonMark Line Break Behavior

CommonMark defines consistent rules for rendering line breaks across compliant Markdown parsers.

  • Pressing Enter once creates a soft line break, which may render as a space.
  • Two trailing spaces create a hard line break.
  • Ending a line with a backslash (\) also creates a hard line break.
  • Inline HTML such as <br> works when HTML is supported by the Markdown processor.

If you're writing portable Markdown for multiple platforms, following the CommonMark specification helps ensure your documents render consistently.

Line Breaks vs Paragraph Breaks

Although they may appear similar, line breaks and paragraph breaks serve different purposes.

Line Break Paragraph Break
Moves text to the next line Starts a new paragraph
Keeps content within the same paragraph Creates a separate block of text
Used for addresses, poetry, contact details, and release notes Used for articles, documentation, tutorials, and blog posts

For most documentation, paragraph breaks are the better choice because they improve readability and make content easier to scan. Use line breaks only when each line must remain separate.

Related: Read Markdown Paragraphs for a complete guide to paragraph formatting and blank lines.

Best Practices

Following a few simple best practices helps your Markdown render consistently across editors and platforms.

Use Paragraphs for Most Content#

For articles, documentation, tutorials, and blog posts, use paragraph breaks instead of multiple line breaks.

Markdown is easy to learn.

It uses a simple plain text syntax.

Paragraphs improve readability and follow standard writing conventions.

Use Hard Line Breaks Only When Needed#

Hard line breaks are useful when each line must remain separate.

Common examples include:

  • Postal addresses
  • Contact information
  • Poetry
  • Song lyrics
  • Release notes

Avoid using hard line breaks for normal paragraphs.

Use <br> for Predictable Rendering#

If you need an explicit line break across different Markdown processors, the HTML <br> tag is usually the most reliable option.

Support Email<br>
support@example.com

Output

Live Preview

Support Email
support@example.com

Use this approach when consistent rendering is more important than keeping your document strictly Markdown-only.

Preview Before Publishing#

Different Markdown editors and platforms may render line breaks differently.

Before publishing, preview your document in the same environment where it will appear, such as:

  • GitHub
  • GitLab
  • VS Code
  • Obsidian
  • Docusaurus
  • MkDocs
  • Hugo

Previewing helps you catch formatting issues before your readers do.

Related: Test your formatting in the Markdown Editor before publishing.

Common Markdown Line Break Mistakes

Many line break issues happen because Markdown behaves differently from traditional word processors.

Pressing Enter Once#

Many beginners expect pressing Enter once to create a visible new line.

Line one
Line two

In most Markdown parsers, these lines remain part of the same paragraph.

Use a hard line break, backslash (\), or <br> tag when you need a visible new line.

Forgetting Trailing Spaces#

Trailing spaces are invisible, making them easy to miss.

First lineΒ·Β·
Second line

Note: The dots (Β·Β·) represent two trailing spaces and are shown only to make the spaces visible.

Without the trailing spaces, the hard line break won't be created.

Using Too Many <br> Tags#

Avoid adding multiple <br> tags simply to create extra vertical spacing.

Line one<br><br><br><br>
Line two

For most documents, paragraph breaks are cleaner, more readable, and easier to maintain.

Mixing Multiple Line Break Methods#

Avoid switching between different line break techniques within the same document unless there's a specific reason.

Choose one approach and use it consistently to keep your Markdown clean and easier to maintain.

Real-World Examples

The following examples demonstrate when line breaks are useful in everyday Markdown documents.

Address#

MDConvertHub<br>
New Delhi<br>
India

Output

Live Preview

MDConvertHub
New Delhi
India

Contact Information#

Email: support@example.com<br>
Website: https://example.com

Output

Live Preview

Email: support@example.com
Website: https://example.com

Poetry#

The sun will rise.<br>
The birds will sing.<br>
A brand new day begins.

Output

Live Preview

The sun will rise.
The birds will sing.
A brand new day begins.

Release Notes#

Version 2.0 Released<br>
Performance Improvements<br>
Bug Fixes<br>
New Markdown Features

Output

Live Preview

Version 2.0 Released
Performance Improvements
Bug Fixes
New Markdown Features

Practice Markdown Line Breaks

The best way to understand Markdown line breaks is to experiment with them yourself.

Try creating a short document that includes:

  • A postal address using <br> tags
  • Contact information with hard line breaks
  • A short poem using line breaks
  • Normal paragraphs separated by blank lines
  • The same content previewed in your target Markdown editor

Related: Open the Markdown Editor to test your formatting with live preview, or keep the Markdown Cheat Sheet open for quick syntax reference.

Summary

Markdown provides several ways to control how text appears across different editors and platforms.

In this guide, you learned:

  • What Markdown line breaks are
  • The difference between soft and hard line breaks
  • When to use paragraph breaks
  • How the HTML <br> tag works
  • GitHub and CommonMark line break behavior
  • Best practices for consistent formatting
  • Common mistakes to avoid

Choosing the right line break method helps your Markdown render consistently in README files, documentation, note-taking apps, static site generators, and other Markdown-supported platforms.

Frequently Asked Questions

  1. 1

    How do I create a line break in Markdown?

    There are three common ways to create a line break: add two spaces at the end of a line, then press Enter; use the HTML <br> tag; or leave a blank line to start a new paragraph. The best method depends on the Markdown parser and your formatting needs.

  2. 2

    Why isn't my Markdown line break working?

    Markdown line breaks usually fail for one of these reasons: you only pressed Enter once, creating a soft line break instead of a visible new line; you forgot to add the two trailing spaces required for a hard line break; your Markdown parser renders soft line breaks differently; or HTML is disabled, so the <br> tag isn't supported. If you need predictable results across supported Markdown processors, use the HTML <br> tag or preview your document before publishing.

  3. 3

    Can I use a backslash (\) for a line break in Markdown?

    Yes. CommonMark allows you to end a line with a backslash (\) to create a hard line break. Many developers prefer this method because the backslash is visible in the source file, making it easier to maintain than trailing spaces.

  4. 4

    Which line break method should I use?

    The best method depends on your use case: use a blank line for normal paragraphs, two trailing spaces to follow traditional Markdown syntax, a backslash (\) when writing CommonMark-compatible documents, or <br> when you need explicit and predictable line breaks across supported Markdown processors.

  5. 5

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

    A line break moves text to the next line while keeping it in the same paragraph. A paragraph break starts an entirely new paragraph by leaving a blank line. Most articles and documentation should use paragraph breaks instead of multiple line breaks.

  6. 6

    Does GitHub support Markdown line breaks?

    Yes. GitHub Flavored Markdown supports hard line breaks using two trailing spaces, HTML <br> tags, and blank lines for paragraphs. This makes formatting README files and documentation straightforward.

  7. 7

    Does CommonMark support line breaks?

    Yes. CommonMark supports both soft and hard line breaks. To force a visible line break, you can use two trailing spaces, a backslash (\), or HTML <br> when supported by the parser.

  8. 8

    Should I use <br> or two spaces?

    Both methods work. Use two trailing spaces if you want to follow traditional Markdown syntax. Use <br> if you need more predictable rendering across different Markdown processors.

  9. 9

    Can I use multiple line breaks?

    Yes. You can add multiple <br> tags if extra spacing is required. However, avoid excessive empty space because it can reduce readability.

  10. 10

    Which Markdown editors support line breaks?

    Most popular editors support Markdown line breaks, including GitHub, GitLab, VS Code, Obsidian, Hugo, MkDocs, Docusaurus, and Jekyll. Always preview your document before publishing.