MDtoTEXT Star

Markdown Cheat Sheet: Every Syntax Rule You'll Ever Need

I've been writing in markdown for maybe eight years now, and I still forget the exact syntax for stuff like nested blockquotes or definition lists. So I put together this cheat sheet. It's the reference I wish I had when I started.

Everything here works in MDtoTEXT, GitHub, Obsidian, VS Code, and most other markdown editors. If something doesn't render right in your tool, it probably uses a different flavor — but this covers the common ground.

Headings

Six levels, just like HTML. One hash for H1, six for H6. I rarely go past H4, honestly.

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

Basic Formatting

The stuff you'll use every single day.

**bold text**
*italic text*
~~strikethrough~~
`inline code`
**bold with *italic* inside**

Pro tip: some editors let you use underscores too (_italic_), but I stick with asterisks because they're easier to spot when scanning.

Links

Inline links are the most common. Reference links are cleaner if you use the same URL multiple times.

// Inline link
[MDtoTEXT](https://md-to-text.vercel.app/)

// Link with title on hover
[MDtoTEXT](https://md-to-text.vercel.app/ "Free markdown editor")

// Reference link (cleaner for repeated URLs)
[MDtoTEXT][1]

[1]: https://md-to-text.vercel.app/

Images

Same as links but with an exclamation mark in front. The text in brackets is the alt text — important for accessibility.

![Alt text](https://example.com/image.jpg)

// With title on hover
![MDtoTEXT screenshot](/screenshot.png "Editor preview")

Lists

Unordered with dashes or asterisks, ordered with numbers. Nested lists just need four spaces of indent.

// Unordered
- Item one
- Item two
  - Nested item
  - Another nested
- Item three

// Ordered
1. First step
2. Second step
3. Third step

Code Blocks

Fenced code blocks with language highlighting. This is where most of my writing happens — documenting APIs, sharing configs, showing examples.

```python
def hello():
    print("Hello world")
```

```javascript
const greet = () => console.log("Hi");
```

Tables

Tables are clunky in markdown, I'll be honest. But they work. Use dashes for the header separator and pipes for columns.

| Feature | Free | Pro |
|---------|------|-----|
| Live preview | Yes | Yes |
| Export HTML | Yes | Yes |
| API access | No | Yes |

// Right-aligned columns
| Left | Center | Right |
|:-----|:------:|------:|
| a | b | c |

I usually use an online table generator for anything more than four columns. Life's too short to align pipes by hand.

Blockquotes

Great for callouts, citations, or just making something stand out visually.

> This is a blockquote.
> It can span multiple lines.

> Nested quotes use more angle brackets.
>> Like this.
>
> Back to the outer level.

Task Lists

Checkboxes you can click in supported editors. Perfect for README files and personal notes.

- [x] Write the cheat sheet
- [ ] Add more examples
- [ ] Publish to blog

Horizontal Rules

Three dashes or three asterisks. I use dashes because asterisks sometimes look like a bold section divider.

---
***

Mermaid Diagrams

In editors that support it (like MDtoTEXT), you can embed flowcharts, sequence diagrams, and more inside fenced code blocks tagged mermaid.

```mermaid
graph TD
    A[Start] --> B{Is it markdown?}
    B -->|Yes| C[Write in MDtoTEXT]
    B -->|No| D[Convert to markdown]
    C --> E[Export as HTML]
    D --> C
```

LaTeX Math

Inline math with single dollar signs, display math with double. Handy for technical writing.

Inline: $E = mc^2$

Display:
$$\int_{a}^{b} x^2 dx$$

Escaping Special Characters

If you need to show an actual asterisk or hash without it being treated as formatting, put a backslash in front.

\*This is an asterisk, not italic\*
\# This is a hash, not a heading

Common Mistakes I Still Make

Wrapping Up

Print this page, bookmark it, or just keep it open in a tab. Every time you forget how to do nested blockquotes or right-aligned table columns, it'll be here. And if you want to test any of these examples live, open up MDtoTEXT — it handles all of this syntax out of the box, including Mermaid and LaTeX.

Read more: How to Write Markdown: Beginner's Guide — if you want the tutorial version instead of a reference.

Bookmark this cheat sheet and share it