Skip to content
Back to Journal
GuideMay 5, 2026·2 min read

How to Add a Line Break in Markdown

Force a new line without a paragraph break in markdown. Two spaces, backslash, and HTML br tag methods.

The quick answer: Add two spaces at the end of a line before pressing Enter. Or put a backslash at the end of the line.

Why Pressing Enter Doesn't Create a Line Break

In markdown, a single newline collapses into a space. This is intentional — it lets you wrap long lines in your source without affecting the output. To force a visible line break without starting a new paragraph, you need an explicit method.

Method 1: Two Trailing Spaces

Add exactly two spaces at the end of a line: First line Second line

The spaces are invisible, which is why this trips people up. Use a code editor that shows whitespace characters if you rely on this method.

Method 2: Backslash (GFM)

A backslash at the end of a line creates a hard line break in GitHub Flavored Markdown: First line\ Second line

This is more explicit than trailing spaces and easier to see in source code.

Method 3: HTML br Tag

Use the HTML
element — works wherever HTML is allowed: First line
Second line

This is the most explicit and portable method.

Paragraph Break vs Line Break

A line break moves to the next line within the same paragraph — same vertical spacing, just a new line.

A paragraph break (a blank line in source) creates a new paragraph with extra vertical space above it.

Use line breaks for poetry, addresses, and lyrics. Use paragraph breaks for prose.


Full reference: Markdown Hard Line Breaks.

MT

MarkdownTools Team

May 5, 2026

Try it free

Make your AI output beautiful

Paste markdown from ChatGPT or Claude. Pick a theme. Export as PDF or HTML in seconds.

Open App — It's Free