Markdown New Line Generator

Pick a line break method, edit the example, and see exactly how Markdown renders it. Everything runs locally in your browser.

Free · No sign-up · Runs in your browserLast updated

How do you add a new line in Markdown?

End the line with two spaces and press Enter — Markdown turns that into a single line break inside the same paragraph. A trailing backslash does the same thing in CommonMark and GitHub. For a new paragraph instead, leave one completely blank line between the two blocks of text.

markdown
Roses are red.  
Violets are blue.

This is a new paragraph.

The first two lines sit inside one paragraph separated by a <br>; the third becomes its own <p> element.

Try the Markdown New Line Generator

Markdown new line methods

Trailing spaces (two spaces)

Add two spaces at the end of a line to create a line break in Markdown.

Preview

This is a line with two spaces at the end.
This text appears on a new line.

Every way to create a new line in Markdown

Markdown distinguishes a line break (same paragraph, tight spacing) from a paragraph break (new block, real spacing). There are four ways to get a newline, and each one fails in a different place.

Two trailing spaces (the standard line break)

End a line with exactly two spaces, then press Enter. Every CommonMark-compliant renderer turns that into a <br> inside the current paragraph. The spaces are invisible, which is the single most common reason a Markdown new line silently fails.

markdown
Roses are red.  
Violets are blue.

Two lines inside one paragraph. In HTML: Roses are red.<br>Violets are blue.

Backslash at the end of the line

A trailing backslash produces the same hard line break, and unlike spaces it is visible in your source and survives editors that trim whitespace on save. CommonMark, GitHub, GitLab, Pandoc and the VS Code preview all support it.

markdown
Roses are red.\
Violets are blue.

Identical output to the two-space version, but the break is obvious when you read the raw Markdown.

Blank line for a new paragraph

One completely empty line closes the current paragraph and opens a new one. This is a paragraph break rather than a line break: you get a separate <p> element with real vertical spacing, and it works in every Markdown flavour without exception.

markdown
This is the first paragraph.

This is a second paragraph.

Two separate <p> elements with a margin between them, instead of one paragraph split over two lines.

HTML <br> tag

Markdown lets raw HTML through, so <br> is the escape hatch when a formatter strips your trailing spaces or when the Markdown syntax simply cannot reach. Platforms that sanitise HTML, such as Discord, Slack and Reddit, ignore it.

markdown
Line one.<br>Line two.<br />Line three.

Three lines inside one paragraph. <br> and <br /> are equivalent; the self-closing form matters only in strict XHTML.

New line inside a table cell

A Markdown table row has to stay on one physical line, so pressing Enter inside a cell ends the row instead of breaking the text. The HTML tag is the only option here — trailing spaces and backslashes are swallowed by the table parser.

markdown
| Step | Detail |
| --- | --- |
| Install | Run npm install<br>then restart the dev server |

The second cell shows “Run npm install” on one line and “then restart the dev server” on the next, inside a single cell.

Line break inside a list item

Trailing spaces work inside list items, but the continuation line must be indented to line up with the item text. Without that indentation the renderer closes the list and starts a new paragraph.

markdown
- First bullet, first line.  
  First bullet, second line.
- Second bullet.

One bullet containing two lines, followed by a second bullet — rather than three separate items.

Where each Markdown newline method works

The biggest surprise is that the same platform can behave differently in two places. GitHub renders a single Enter as a line break in comments but collapses it in a README, so always test the method where the content will actually live.

PlatformSupportNotes
GitHub issues & commentsFullA single Enter already becomes a line break; two spaces are not needed.
GitHub README / .md filesPartialRendered as CommonMark, so a single newline is collapsed. Use two spaces, a backslash or <br>.
GitLabFullTwo spaces, backslash and <br> all work in issues, MRs and repository files.
DiscordPartialShift+Enter inserts the break. Trailing spaces and HTML tags do nothing.
SlackPartialShift+Enter only. Slack's mrkdwn has no trailing-space or <br> syntax.
ObsidianFullSingle newlines break lines by default; enable Strict line breaks for CommonMark behaviour.
NotionPartialShift+Enter breaks a line inside a block; trailing spaces are stripped on paste.
RedditPartialA blank line is the reliable separator; HTML tags are removed by the sanitiser.
VS Code previewFullCommonMark by default; set markdown.preview.breaks to render single newlines as breaks.

How to add a new line in Markdown with this tool

  1. Choose a line break method

    Switch between trailing spaces, backslash, paragraph break and the HTML <br> tag using the tabs. Each tab loads a working example into the editor.

  2. Edit the example

    Type over the sample text. The two spaces or the backslash at the end of the line are what create the break, so keep them when you rewrite the sentence.

  3. Check the live preview

    The panel on the right renders your Markdown as you type, so you can confirm the newline lands where you expect before publishing.

  4. Copy the Markdown

    Use the copy button to put the exact syntax on your clipboard, invisible trailing spaces included.

Frequently Asked Questions

Why is my new line not working in Markdown?

Almost always because the two trailing spaces were removed. Most editors and formatters trim trailing whitespace on save, and a lone Enter is collapsed into an ordinary space by CommonMark. Switch to a backslash at the end of the line, or an HTML <br> tag, if you need a break that survives auto-formatting.

How many spaces do you need for a new line in Markdown?

Exactly two spaces at the end of a line, followed by Enter. More than two also works in most renderers, but two is the specified minimum and the safest choice. Spaces on an otherwise empty line do nothing at all.

What is the difference between a line break and a paragraph break in Markdown?

A line break keeps the text in the same paragraph and compiles to a <br> element, so the lines sit tightly together. A paragraph break, made with one blank line, closes the paragraph and opens a new <p> with real vertical spacing. Use line breaks for addresses and poetry, paragraph breaks for separate ideas.

Does pressing Enter once create a new line in Markdown?

It depends on the renderer. Plain CommonMark treats a single newline as a soft break and collapses it into a space. GitHub comment boxes, GitLab, Discord, Obsidian and Notion turn hard breaks on, so one Enter is enough there. Rendered README files on GitHub do not.

How do I add a new line inside a Markdown table cell?

Use the HTML <br> tag. A table row must stay on one physical line, so a real newline would end the row instead of breaking the text. Trailing spaces and backslashes are consumed by the table parser and produce nothing.

How do I add a line break inside a list item?

End the line with two spaces and indent the continuation line so it aligns with the item text, usually by two or four spaces. Without that indentation the renderer closes the list and treats the following line as a new paragraph.

How do I see trailing spaces in my editor?

Turn on whitespace rendering. In VS Code set editor.renderWhitespace to all; Sublime Text, JetBrains IDEs and Vim have the same option under names like Show Whitespace or list. Also check that trim trailing whitespace on save is disabled for Markdown files.

Can I use the HTML <br> tag in Markdown?

Yes, in anything that renders Markdown to HTML, including GitHub, GitLab, Obsidian, Jekyll, Hugo and MkDocs. It is ignored on platforms that sanitise HTML, such as Discord, Slack and Reddit, where the tag either disappears or shows up as plain text.

How do I add extra blank space between paragraphs in Markdown?

Repeated blank lines are collapsed into one, so stacking them changes nothing. Put a line containing only &nbsp; between the paragraphs, or use two <br> tags in a row. On a documentation site a CSS class or spacer component is the cleaner fix.

How do I add a new line in a GitHub README?

README files are rendered as CommonMark, so a single Enter is collapsed. End the line with two spaces or a backslash, or insert <br>. This differs from GitHub issues and pull request comments, where a single Enter already produces a line break.