</>MDTooltools

Markdown Headings

Create a heading in Markdown by starting a line with 1–6 hash characters (#) followed by a space. One # is an H1, two ## an H2, down to ###### for H6.

Basic heading syntax

Put the hashes at the very start of the line and leave one space before the text. Blank lines before and after the heading keep every parser happy.

# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6

Alternate syntax for H1 and H2

H1 and H2 can also be written by underlining the text with equals signs or hyphens. This "setext" style only exists for the first two levels.

Heading 1
=========

Heading 2
---------

Best practices

Use exactly one H1 per document, keep levels sequential (do not jump from H2 to H4), and always include the space after the hashes — "#Heading" without a space is not recognized by many parsers, including GitHub.

GitHub automatically generates anchor links from headings: "## My Section" becomes #my-section.

Frequently Asked Questions

Why is my Markdown heading not working?

The most common cause is a missing space after the hash characters. "#Title" is plain text in most parsers; "# Title" is a heading. Also check the heading starts at the beginning of the line.

How many heading levels does Markdown support?

Six levels, H1 through H6, written with one to six hash characters. Levels beyond six are not supported — a line starting with seven hashes renders as plain text.

Try it live

Paste this syntax into the free markdown to html converter and see the rendered output instantly — no signup, everything runs in your browser.

Open Markdown to HTML Converter

More Markdown syntax: