How to add a line break in markdown without starting a new paragraph. Two spaces, backslash, or HTML br tag methods explained.
A hard line break forces the text to move to the next line without creating a new paragraph. In standard markdown, a single newline in the source does not create a visible line break — you need either two trailing spaces, a backslash, or an HTML <br> tag at the end of the line.
Add exactly two spaces at the end of a line, then press Enter. The spaces are invisible but force a line break.
A backslash at the end of a line creates a hard line break. Supported by GitHub Flavored Markdown.
The HTML <br> element works on platforms that allow HTML in markdown.
| Platform | Supported | Notes |
|---|---|---|
| GitHub | Yes | Two spaces and backslash both work |
| GitLab | Yes | — |
| Discord | Yes | Shift+Enter creates a line break in the UI |
| Slack | Yes | — |
| Notion | Yes | — |
| Obsidian | Yes | — |
Line 1 Line 2 (single newline)
Line 1 Line 2 (two trailing spaces)
A single newline in markdown source is treated as a space, not a line break. You must use trailing spaces, backslash, or <br>.
Trailing spaces are invisible in most editors. If you can't see them, use a backslash or <br> instead — they're explicit.
Content where every line matters (verse, addresses, lyrics) should use consistent line break syntax throughout rather than relying on paragraph breaks.
Everything you need to know.
Markdown collapses single newlines into spaces. This allows text to flow naturally when source files are edited. For a visible line break, use two trailing spaces or a backslash at the end of the line.
In markdown, pressing Enter once doesn't create a visible line break — the text continues on the same line. To force a line break (without starting a new paragraph), end the line with two spaces or a backslash (\).
Markdown uses indentation (spaces or tabs) to nest content inside lists and blockquotes. Standard markdown doesn't support arbitrary text indentation — indent is functional, not decorative. Use 2-4 spaces to nest list items and blockquote continuations.
Markdown headings are created with hash symbols (#). One hash for H1 (largest), two for H2, up to six for H6 (smallest). Headings structure your document and create a hierarchy that readers and search engines can follow.
Paste your markdown and see hard line break rendered instantly with professional themes.