Learn how to create line breaks in markdown using trailing spaces or backslashes. The difference between line breaks and paragraphs.
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 (\).
Two spaces at the end of a line force a line break. (Spaces shown as visible here but are invisible in practice.)
A backslash at the end of the line also forces a break. More visible than trailing spaces.
A blank line creates a new paragraph with more vertical spacing than a line break.
Paragraph one
Paragraph two
| Platform | Supported | Notes |
|---|---|---|
| GitHub | Yes | Both trailing spaces and backslash work |
| GitLab | Yes | — |
| Discord | Yes | Regular Enter creates a line break |
| Slack | Yes | Shift+Enter for line break |
| Yes | Double space or double newline | |
| Stack Overflow | Yes | — |
| Notion | Yes | Shift+Enter for line break |
| Obsidian | Yes | — |
Line one Line two
Line one Line two
A single newline in markdown source is ignored — the text joins into one line. Add two trailing spaces or use a backslash.
Line one<br>Line two
Line one Line two
While <br> HTML works on some platforms, it's not valid in all markdown renderers. Use trailing spaces or backslash instead.
Trailing spaces are invisible and often stripped by editors. A backslash (\) at end of line is more reliable and visible.
A line break (two spaces + Enter) gives a small break. A paragraph (blank line) gives a larger gap. Use paragraphs for separate ideas.
Many code editors strip trailing whitespace. If using the two-space method, add an exception for .md files.
Everything you need to know.
By design, markdown treats single newlines as spaces — text flows into one paragraph. For a hard line break, end the line with two spaces or a backslash.
A horizontal rule creates a visual divider across the page. In markdown, use three or more hyphens (---), asterisks (***), or underscores (___) on their own line. Horizontal rules separate sections and improve document readability.
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 line break rendered instantly with professional themes.