Markdown Convert logo Markdown Convert

Markdown Syntax Guide & Cheat Sheet

Everything you need to write and format Markdown — from basic syntax to advanced features like math formulas, flowcharts, and tables. Includes tips for exporting to Word (.docx) and PDF.

Try the Converter →

By Markdown Convert Team  ·  Published March 2026

Table of Contents

  1. What is Markdown?
  2. Headings
  3. Text Formatting
  4. Lists
  5. Links & Images
  6. Code Blocks & Inline Code
  7. Tables
  8. Blockquotes
  9. Math Formulas (KaTeX)
  10. Flowcharts & Diagrams (Mermaid)
  11. Converting to Word & PDF
  12. Exporting AI Responses (ChatGPT, Claude)

1. What is Markdown?

Markdown is a lightweight markup language created by John Gruber in 2004. It lets you write formatted text using plain text characters — no complex editors required. A # becomes a heading, **bold** becomes bold, and - item creates a bullet list.

Today, Markdown is used everywhere: GitHub READMEs, developer documentation, note-taking apps (Obsidian, Notion), AI chat outputs (ChatGPT, Claude, Gemini), and more. The problem is that many platforms output Markdown as raw text, making it hard to share as a polished document.

That's where Markdown Convert comes in. Paste your Markdown, click convert, and download a properly formatted Word (.docx) or PDF file — tables, code blocks, math formulas, and diagrams included.

Quick start: Visit markdownconvert.net, paste your Markdown text, click "Convert to WORD Format", then download.

2. Headings

Use the # symbol followed by a space to create headings. The number of # symbols determines the heading level (1–6).

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

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5

Heading 6

Tip for Word export: Headings in Markdown map directly to Word heading styles (Heading 1, Heading 2, etc.), making your document easy to navigate and style in Word.

3. Text Formatting

Markdown supports bold, italic, strikethrough, and combined formatting using simple characters around your text.

Markdown**Bold text** *Italic text* ***Bold and italic*** ~~Strikethrough~~ `Inline code` > A blockquote line
Rendered

Bold text

Italic text

Bold and italic

Strikethrough

Inline code

A blockquote line

Horizontal Rule

Add a horizontal rule (divider) with three dashes ---, asterisks ***, or underscores ___ on their own line.

4. Lists

Unordered Lists

Use -, *, or + followed by a space to create bullet points. Indent with 2 or 4 spaces for nested lists.

Markdown- Item one - Item two - Nested item - Another nested - Item three
Rendered
  • Item one
  • Item two
    • Nested item
    • Another nested
  • Item three

Ordered Lists

Use numbers followed by a period and space. The actual numbers don't matter — Markdown will render them in sequence.

Markdown1. First step 2. Second step 3. Third step 1. Sub-step A 2. Sub-step B
Rendered
  1. First step
  2. Second step
  3. Third step
    1. Sub-step A
    2. Sub-step B

Task Lists (Checkboxes)

GitHub Flavored Markdown (GFM) supports task lists with - [ ] (unchecked) and - [x] (checked).

- [x] Completed task - [ ] Pending task - [ ] Another item

6. Code Blocks & Inline Code

Markdown has two ways to display code: inline (within a sentence) and fenced blocks (for multi-line snippets with syntax highlighting).

Inline Code

Wrap text in single backticks: `const x = 1` renders as const x = 1.

Fenced Code Blocks

Use triple backticks and optionally specify the language for syntax highlighting:

Markdown```javascript function greet(name) { return `Hello, ${name}!`; } console.log(greet("World")); ```
Rendered
function greet(name) {
  return `Hello, ${name}!`;
}
console.log(greet("World"));

Supported Languages

Common language identifiers: javascriptpythonjavatypescriptbashsqlcsshtmljsongorustccpp

Tip: Code blocks are fully preserved in Word export with a monospace font and syntax highlighting. This makes your technical documents look professional.

7. Tables

Tables use pipes | to separate columns and hyphens - to create the header row divider. Colons : in the separator row control alignment.

Markdown| Name | Role | Level | |---------|-----------|--------| | Alice | Developer | Senior | | Bob | Designer | Mid | | Carol | Manager | Lead | Left: |:---| Center: |:---:| Right: |---:|
Rendered
NameRoleLevel
AliceDeveloperSenior
BobDesignerMid
CarolManagerLead
Word export tip: Tables are one of the most requested features. Markdown Convert preserves table borders, headers, and alignment perfectly in both Word (.docx) and PDF exports.

8. Blockquotes

Use > at the start of a line for blockquotes. Stack multiple >> for nested quotes.

Markdown> "The best way to predict the future > is to invent it." — Alan Kay > Outer quote >> Nested quote >>> Deeply nested
Rendered
"The best way to predict the future is to invent it." — Alan Kay
Outer quote
Nested quote
Deeply nested

9. Math Formulas (KaTeX / LaTeX)

Markdown Convert supports mathematical expressions using KaTeX syntax — the same notation used in academic papers and AI responses.

Inline Math

Wrap formulas in single dollar signs: $E = mc^2$

Block Math

Wrap formulas in double dollar signs on their own lines:

$$ \int_0^\infty e^{-x^2} dx = \frac{\sqrt{\pi}}{2} $$ The quadratic formula: $x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$ Matrix example: $$ \begin{pmatrix} a & b \\ c & d \end{pmatrix} $$
Tip: When exporting AI-generated responses that contain LaTeX formulas, use Word (.docx) export for the best formula rendering quality. PDF export also works well for most formulas.

10. Flowcharts & Diagrams (Mermaid)

Mermaid lets you create diagrams from text inside a fenced code block with the mermaid language tag. Markdown Convert renders these diagrams in both the preview and exported documents.

Flowchart

```mermaid graph TD A[User Input] --> B{Valid?} B -- Yes --> C[Process] B -- No --> D[Show Error] C --> E[Download Result] ```

Sequence Diagram

```mermaid sequenceDiagram User->>App: Paste Markdown App->>API: Convert request API-->>App: Word document App-->>User: Download file ```

Gantt Chart

```mermaid gantt title Project Timeline dateFormat YYYY-MM-DD section Phase 1 Research :a1, 2024-01-01, 14d Design :a2, after a1, 7d section Phase 2 Development :b1, after a2, 21d Testing :b2, after b1, 7d ```
Word export note: Mermaid diagrams are rendered as images and embedded in your Word document, so they look exactly the same as in the preview.

11. Converting Markdown to Word & PDF

Once you've written your Markdown, converting to a professional document takes just a few seconds. Here's the complete workflow:

  1. Paste your Markdown into the text input area on the left side of the converter.
  2. Click "Convert to WORD Format" to generate a rich preview with formatted tables, code blocks, headings, and diagrams.
  3. Review the preview on the right side to ensure everything looks correct. You can go back and edit your Markdown if needed.
  4. Choose your format: Click "Download Word" for a .docx file, or "Download PDF" for a PDF document.
  5. Done! Your formatted document is downloaded and ready to share.

What's Preserved in Export?

Tips for Best Results

Word Export Pitfalls & Fixes (Real Examples)

Most Markdown exports look perfect in preview but break in Word because Word is stricter about tables, line breaks, and nested structures. Here are the most common issues and how to fix them.

1) Tables can break when cells contain line breaks

Problem: Multi-line content inside a table cell (especially when mixed with lists or code) may cause unexpected wrapping or layout glitches in Word.

Markdown (problematic)| Item | Notes | |---|---| | A | Line 1<br>Line 2 | | B | - bullet 1 - bullet 2 |
Markdown (recommended)| Item | Notes | |---|---| | A | Line 1 / Line 2 | | B | bullet 1; bullet 2 |
Fix: Prefer a single line per table cell. If you must keep multiple points, separate them with semicolons or slashes. For complex structure, move the list outside the table.

2) Nested lists may lose indentation in Word

Problem: Inconsistent indentation (2 spaces vs 4 spaces) can render fine in some Markdown viewers but export poorly to Word.

Markdown (inconsistent)- Level 1 - Level 2 - Level 3
Markdown (consistent)- Level 1 - Level 2 - Level 3
Fix: Use a consistent 4-space indentation per nesting level for the most stable Word export.

3) Blank lines inside lists can split the list in Word

Problem: Extra blank lines between list items may cause Word to treat them as separate lists or insert large spacing.

Markdown (problematic)1. First item 2. Second item
Markdown (recommended)1. First item 2. Second item
Fix: Avoid blank lines inside lists. If you need paragraphs under a list item, indent the paragraph under that item.

4) Very wide tables should be simplified (or split)

Problem: Tables with many columns may overflow the page width in Word, creating cramped text or broken layouts.

Fix: Split a wide table into smaller tables, shorten headers, or move optional columns into a separate section. After export, you can also set the document to landscape orientation in Word.

Need help?

If some content or formatting still doesn't export correctly, feel free to email us at [email protected] with a short sample and a screenshot. We'll do our best to help.

12. Exporting AI Responses to Word & PDF

AI assistants like ChatGPT, Claude, Gemini, and Grok output their responses in Markdown format. This is great for reading on screen, but when you need to share a polished document, you need to convert it first.

Why AI Responses Use Markdown

Modern AI models are trained to respond using Markdown because it's human-readable in plain text and renders beautifully in supported environments. A response with **key term**, tables comparing options, and ```python code blocks is far more useful than unformatted prose.

Common Use Cases

📊

Research Reports

Ask ChatGPT to analyze data, then export the table-filled response as a Word document for your presentation.

📝

Meeting Minutes

Let AI summarize your notes into structured bullet points and headings, then download as .docx to share with the team.

💻

Technical Documentation

Export AI-generated API docs or code tutorials — complete with syntax-highlighted code blocks — into a professional PDF.

🎓

Study Materials

Convert AI-generated study guides, flashcard lists, and math-formula-filled explanations into printable PDFs.

📧

Email Drafts

Use "Convert to Plain Text" mode to strip Markdown formatting from AI drafts before pasting into your email client.

📈

Business Proposals

AI-assisted proposals often include comparison tables and numbered sections — export directly to Word for final polish.

Step-by-Step: ChatGPT to Word

  1. In ChatGPT, get a response with formatting (ask for a table, code, or headings if needed).
  2. Select all the response text and copy it (Ctrl+A / Cmd+A, then Ctrl+C / Cmd+C).
  3. Open markdownconvert.net and paste into the input area.
  4. Click "Convert to WORD Format" and review the preview.
  5. Click "Download Word" to save your .docx file.
Privacy note: Your content is not stored on our servers. The Word export is processed securely and not retained. See our Privacy Policy for details.