Skip to content
Back to blog
Tuesday, November 17, 2026

Markdown Line Breaks with Copyable Examples

Add a line break in Markdown with a backslash or spaces. Compare paragraph spacing, fix missing breaks in a README and preview a real PNG.

Markdown Line Breaks with Copyable Examples

For a new line within the same Markdown paragraph, end the first line with a backslash or two spaces, then press Enter. For a new paragraph, leave a blank line. Use the backslash if your editor removes trailing spaces.

Try both in a short release note

Copy the contents of the code block. The first example keeps the owner and date together. The second gives each its own paragraph.

### One paragraph, two lines

Owner: Docs team\
Review: Friday

### Two paragraphs

Owner: Docs team

Review: Friday
Desired resultWhat to type
New line in the same paragraphEnd the first line with a backslash or two spaces.
Two paragraphsLeave an empty line between them.
A separate source line that can render as a spacePress Enter once without a marker.

CommonMark calls these marked and unmarked line endings hard and soft line breaks. CommonMark line break rules

Why the same text looks different in a GitHub README

GitHub shows a plain newline as a break in issues, pull requests and discussions. In a Markdown file such as a README, the two lines can run together. Add a hard break and check the file preview. If it disappears on save, check for trimmed trailing spaces. If the backslash prints literally, check that it is the last character on a line inside the paragraph. GitHub's line break guide

Compare the spacing in an exported PNG

Paste the example into the image editor. We tested it there and downloaded the PNG below. The editor also displays an ordinary newline as a break, so check the README itself before publishing there. For a slide or release update, use the image to keep the spacing shown in the preview. Try the example in Markdown2Image

PNG comparing a line break within one paragraph with two separate paragraphs

Open the original PNG