February 1, 2025 10 min read MDTools Team

Markdown Cheatsheet — Complete Syntax Reference (2025)

Every Markdown syntax element in one place. Bookmark this page — it covers headings, text formatting, lists, links, images, code, tables, blockquotes, and extended syntax with copy-ready examples.

Headings

Create headings by placing one to six # characters before your heading text. More # symbols = smaller heading.

# H1 — Page Title (use only once per page)
## H2 — Major Section
### H3 — Sub-section
#### H4 — Sub-sub-section
##### H5
###### H6

Alternatively, for H1 and H2 only, underline with = or -:

Heading 1
=========

Heading 2
---------

Text Formatting

**Bold text**
__Also bold__

*Italic text*
_Also italic_

***Bold and italic***
___Also bold and italic___

~~Strikethrough~~

`Inline code`

Lists

Unordered Lists

- Item one
- Item two
  - Nested item (indent with 2 spaces)
  - Another nested item
- Item three

* Also works with asterisks
+ Or plus signs

Ordered Lists

1. First item
2. Second item
3. Third item
   1. Nested ordered item
   2. Another nested item

Task Lists (GitHub Flavored Markdown)

- [x] Completed task
- [ ] Incomplete task
- [ ] Another pending task

Links and Images

[Link text](https://example.com)
[Link with title](https://example.com "Tooltip text")

[Reference-style link][ref-id]
[ref-id]: https://example.com

![Alt text for image](image.png)
![Alt with title](image.png "Image title")



Blockquotes

> This is a blockquote.
> It can span multiple lines.
>
> Use a blank > line for a new paragraph within the quote.

> Nested blockquote:
>> This is nested one level deep.
>>> And this is nested two levels deep.

Code Blocks and Syntax Highlighting

Fenced Code Blocks

```
Plain code block (no syntax highlighting)
```

```javascript
// JavaScript with syntax highlighting
const greeting = 'Hello, Markdown!';
console.log(greeting);
```

```python
# Python with syntax highlighting
def hello():
    print("Hello, Markdown!")
```

```bash
# Shell commands
npm install marked
node convert.js
```

Indented Code Blocks

    Indent with 4 spaces or 1 tab
    to create a code block
    without backticks

Tables

| Left align | Center align | Right align |
|:-----------|:------------:|------------:|
| Cell       |    Cell      |        Cell |
| Cell       |    Cell      |        Cell |


| Column 1 | Column 2 |
|----------|----------|
| Value    | Value    |

Alignment is set by the position of the colon (:) in the separator row.

Horizontal Rules

---
***
___

(Three or more hyphens, asterisks, or underscores — all produce a horizontal rule)

HTML in Markdown

Most Markdown parsers allow inline HTML for elements Markdown doesn't support natively:

<details>
  <summary>Click to expand</summary>
  Hidden content here.
</details>

<br> for a line break
<mark>Highlighted text</mark>
<sup>Superscript</sup>
<sub>Subscript</sub>

Extended Syntax

These elements are part of GitHub Flavored Markdown (GFM) or other popular extensions:


Here is a statement.[^1]
[^1]: This is the footnote text.


Term
: Definition


:smile: :thumbsup: :rocket:


==highlighted text==

Escaping Special Characters

Use a backslash to display literal Markdown syntax characters:

\*Not italic\*
\# Not a heading
\[Not a link\]
\`Not code\`

Markdown Editors

Need a good Markdown editor? Here are five popular options:

  • VS Code — Free, built-in Markdown preview, extensions for live preview and linting. Best for developers.
  • Typora — Paid ($15 one-time), renders Markdown inline as you type for a WYSIWYG feel. Very popular with writers.
  • Obsidian — Free for personal use, note-linking, backlinks, graph view. Best for knowledge management.
  • Zettlr — Free, open-source, academic-focused with citation support (Pandoc integration).
  • MarkText — Free, open-source, clean WYSIWYG Markdown editor for Windows, Mac, and Linux.

For a detailed comparison, read our Top 5 Markdown Editors guide.

Convert Markdown to Other Formats

Once you've written your Markdown, MDTools can convert it to any format you need — entirely in your browser: