GitHub Flavored Markdown

GitHub Markdown Preview & README Tester

Paste your README, or load one from any public repository, and check tables, alerts, task lists, footnotes, Mermaid, and math before you push. Below the editor: a complete GitHub Markdown reference.

Jump to the syntax reference
Fetch a Public README or .md FileLive API

Paste owner/repo, a repo URL, or a link to any .md file on GitHub

325 words2,158 chars94 lines

GitHub Markdown reference (cheat sheet)

Every formatting feature GitHub supports in READMEs, issues, and pull requests — with the Markdown, the rendered result, and notes on where it works. Click Try in editor to load any example into the previewer above. Syntax follows GitHub’s official documentation. For syntax shared by every Markdown flavor, see the universal Markdown cheat sheet on MDConverter.

One to six # characters, then a space. GitHub builds an "Outline" menu from them and gives each one a link anchor.

Markdown
# A first-level heading
## A second-level heading
### A third-level heading
Result

A first-level heading

A second-level heading

A third-level heading

  • A space after the # is required: #Heading stays plain text.

Wrap text in ** or __ for bold, * or _ for italic, and ~~ for strikethrough. Styles can be nested.

Markdown
**This is bold text**

_This text is italicized_

~~This was mistaken text~~

**This text is _extremely_ important**

***All this text is important***
Result

This is bold text

This text is italicized

This was mistaken text

This text is extremely important

All this text is important

  • Markers must touch the text: ** bold ** with inner spaces is not bold.
  • Underscores do not work inside words (snake_case stays as-is) — use * for that.

GitHub has no Markdown syntax for these, but supports the HTML tags.

Markdown
H<sub>2</sub>O and x<sup>2</sup>

This is an <ins>underlined</ins> word.
Result

H2O and x2

This is an underlined word.

Start a line with > to quote it. Quotes can contain other Markdown, including lists and code.

Markdown
Text that is not a quote

> Text that is a quote
>
> > A nested quote
Result

Text that is not a quote

Text that is a quote

A nested quote

Single backticks for inline code; triple backticks (or ~~~) for a block. Add a language name for syntax highlighting.

Markdown
Use `git status` to list changed files.

```python
def greet(name):
    return f"Hello, {name}!"
```
Result

Use git status to list changed files.

python
def greet(name):
    return f"Hello, {name}!"
  • To show triple backticks inside a code block, wrap the block in four backticks.
  • GitHub uses Linguist language names (python, js, bash, diff, json, …).

Like a link with a leading !. Use relative paths for images in your repository. The <img> tag lets you set a width.

Markdown
![GitHub logo](https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png)

<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="48" alt="Small logo">
Result

GitHub logo

Small logo
  • Show a different image in dark mode with <picture> and <source media="(prefers-color-scheme: dark)" srcset="…">.
  • Always write alt text — it is what screen readers announce.

Start lines with -, *, or + for bullets, or numbers for an ordered list. Indent nested items to the parent's text.

Markdown
- George Washington
- John Adams

1. James Madison
2. James Monroe
   - Nested under item 2
Result
  • George Washington
  • John Adams
  1. James Madison
  2. James Monroe
    • Nested under item 2
  • Nest under "1. " with 3 spaces and under "- " with 2 — fewer spaces start a new list.

A list item starting with [ ] or [x]. In issues and pull requests the checkboxes are clickable and track progress.

Markdown
- [x] Write the press release
- [ ] Update the website
- [ ] \(Optional) Contact the media
Result
  • Write the press release
  • Update the website
  • (Optional) Contact the media
  • Escape a leading parenthesis with \ as shown, or it is not treated as a task.

Pipes separate columns; a row of hyphens under the header is required. Colons set alignment.

Markdown
| Left-aligned | Center-aligned | Right-aligned |
| :--- | :---: | ---: |
| git status | git status | git status |
| `git diff` | **bold** | \| pipe |
Result
Left-aligned Center-aligned Right-aligned
git status git status git status
git diff bold | pipe
  • GitHub Docs asks for a blank line before the table and at least three hyphens per column.
  • Escape a pipe inside a cell as \| — even inside backticks.

A blockquote whose first line is [!NOTE], [!TIP], [!IMPORTANT], [!WARNING], or [!CAUTION]. GitHub shows each with its own color and icon.

Markdown
> [!NOTE]
> Useful information that users should know, even when skimming content.

> [!TIP]
> Helpful advice for doing things better or more easily.

> [!IMPORTANT]
> Key information users need to know to achieve their goal.

> [!WARNING]
> Urgent info that needs immediate user attention to avoid problems.

> [!CAUTION]
> Advises about risks or negative outcomes of certain actions.
Result
Note

Useful information that users should know, even when skimming content.

Tip

Helpful advice for doing things better or more easily.

Important

Key information users need to know to achieve their goal.

Warning

Urgent info that needs immediate user attention to avoid problems.

Caution

Advises about risks or negative outcomes of certain actions.

  • Alerts cannot be nested inside other elements (such as list items).
  • GitHub recommends at most one or two per document, not back to back.

Hide long content behind a clickable summary. Leave a blank line after </summary> so the Markdown inside renders.

Markdown
<details>
<summary>Click to see the build log</summary>

```bash
npm run build
✓ Compiled successfully
```

</details>
Result
Click to see the build log
bash
npm run build
✓ Compiled successfully
  • Add the open attribute (<details open>) to show the section expanded by default.

Add [^label] where the note applies and [^label]: text anywhere in the file. GitHub numbers them and moves them to the bottom.

Markdown
Here is a simple footnote[^1].

A footnote can also have multiple lines[^2].

[^1]: My reference.
[^2]: To add line breaks within a footnote, add 2 spaces to the end of a line.  
This is a second line.
Result

Here is a simple footnote1.

A footnote can also have multiple lines2.

This is a second line.


Footnotes

  1. My reference. ↩

  2. To add line breaks within a footnote, add 2 spaces to the end of a line. ↩

  • Footnotes are not supported in GitHub wikis.

A fenced code block with the language mermaid becomes a diagram: flowcharts, sequence diagrams, Gantt charts, and more.

Markdown
```mermaid
flowchart LR
    A[Push] --> B{Tests pass?}
    B -->|Yes| C[Deploy]
    B -->|No| D[Fix]
```
Result

Diagrams are drawn in the browser — click "Try in editor" to see this one rendered.

  • Render a block containing only "info" to see which Mermaid version GitHub runs.
  • GitHub also renders geojson, topojson, and stl code blocks as maps and 3D models.

Inline math between $...$ or $`...`$; display math between $$...$$ or in a ```math block. GitHub renders it with MathJax.

Markdown
Inline: $\sqrt{3x-1}+(1+x)^2$

$$\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)$$

```math
E = mc^2
```
Result

Inline: 3x−1+(1+x)2\sqrt{3x-1}+(1+x)^2

(∑k=1nakbk)2≤(∑k=1nak2)(∑k=1nbk2)\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)

E=mc2E = mc^2

  • A literal $ on the same line as math: write <span>$</span> outside the expression, or \$ inside it.

In .md files, a single newline is a space. End a line with a backslash, two spaces, or <br> to break it; leave a blank line for a new paragraph.

Markdown
This example\
Will span two lines

This is a new paragraph.
Result

This example
Will span two lines

This is a new paragraph.

  • In issues, pull requests, and discussions, every newline is a line break.

A backslash shows a Markdown character literally. HTML comments are hidden from the rendered page. Three hyphens make a rule.

Markdown
Let's rename \*our-new-project\* to \*our-old-project\*.

<!-- This comment will not appear in the rendered Markdown -->

---

Text after the rule.
Result

Let's rename *our-new-project* to *our-old-project*.


Text after the rule.

GitHub-specific shortcuts that only work on github.com: @mentions, #123 issue references, :emoji: shortcodes, and color chips for hex/rgb/hsl values in backticks (issues, PRs, and discussions only).

Markdown
@octocat :+1: This PR looks great — it fixes #42.

The background color is `#0969DA`.
Result

Rendered only on github.com.

  • These depend on GitHub's data (users, issues, emoji set), so previewers — including this one — show them as plain text.

README templates

Start from a proven structure: copy a template or load it into the editor and fill it in.

LIBRARY_README.md· Ready-to-use template

Complete production template with Shields.io badges, architecture overview, installation, quickstart, API documentation, and contributing guidelines.

# AwesomeLib 🚀

[![CI/CD Status](https://img.shields.io/badge/build-passing-brightgreen.svg)](https://github.com)
[![npm version](https://img.shields.io/badge/npm-v1.0.0-blue.svg)](https://npmjs.com)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Code Coverage](https://img.shields.io/badge/coverage-98%25-brightgreen.svg)](https://codecov.io)

A blazing-fast, zero-dependency TypeScript library for high-throughput data pipelines.

> [!NOTE]
> AwesomeLib requires Node.js v18.0.0 or higher. For legacy environments, see [v1.x branch](https://github.com).

## ⚡ Highlights

- **Ultra-Fast**: Sub-millisecond pipeline processing
- **Zero Config**: Drop-in replacement for standard parsers
- **100% Type-Safe**: Written in strict TypeScript with full JSDoc comments

## 📦 Installation

```bash
npm install awesomelib
# or with pnpm
pnpm add awesomelib
# or with yarn
yarn add awesomelib
```

## 🚀 Quick Start

```typescript
import { createPipeline, transform } from 'awesomelib';

const pipeline = createPipeline({
  mode: 'streaming',
  bufferSize: 1024,
});

const result = await pipeline.process({
  input: 'data://stream-01',
  transforms: [transform.clean, transform.validate],
});

console.log('Processed successfully:', result.summary);
```

## 🛠️ Feature Comparison

| Capability | AwesomeLib | Legacy Libs | Native Fallback |
| :--- | :---: | :---: | :---: |
| **Stream Processing** | ✅ Real-time | ⚠️ Buffered | ❌ Manual |
| **Memory Footprint** | ⚡ < 15MB | 🐌 > 120MB | ⚠️ Variable |
| **Async Parallelism** | ✅ Built-in | ❌ Single-thread | ⚠️ Custom workers |

## 🤝 Contributing

We love contributions! Please read our [Contributing Guide](CONTRIBUTING.md) and [Code of Conduct](CODE_OF_CONDUCT.md) before submitting pull requests.

## 📄 License

MIT © [Awesome Team](https://github.com)

How close is this preview to GitHub?

Close enough to catch nearly every formatting mistake, but not byte-for-byte — GitHub’s renderer isn’t available outside GitHub. Here’s exactly what matches and what differs.

Same as GitHub

  • GFM tables, task lists, strikethrough, and autolinks
  • All five alert types, collapsed sections, and footnotes
  • Heading anchors (#section links) using GitHub’s slug rules
  • Single newlines are spaces, as in .md files
  • Mermaid diagrams and $ / $$ / ```math / $`…`$ math syntax

Different from GitHub

  • Parser: marked here, GitHub’s own pipeline there — rare edge cases differ
  • Math: KaTeX here, MathJax on GitHub — a few rare commands differ
  • @mentions, #123 references, :emoji: shortcodes, and color chips are GitHub-only
  • GitHub strips style/class/id attributes; this preview keeps inline styles
  • Styling is GitHub-like, not GitHub’s exact CSS

README looks fine here but broken on GitHub? Work through 16 reasons GitHub Markdown doesn’t render — each with a tested fix.

Private by design

Your text is rendered in your browser and never uploaded. Fetched READMEs come straight from GitHub to your browser.

Autosaved drafts

Your README is saved in this browser as you type. Press Ctrl+S to download it as README.md.

Any public repo

Paste owner/repo, a repository URL, or a link to a specific .md file. Relative image links are fixed automatically.

Frequently asked questions

What is a GitHub Markdown preview and why test before committing?

GitHub renders .md files with GitHub Flavored Markdown (GFM), a superset of CommonMark that adds tables, task lists, strikethrough, autolinks, and alert callouts. Previewing first lets you catch broken tables, unclosed code fences, and missing images before they land in your repository, instead of pushing a string of "fix README formatting" commits. This tool uses the open-source marked parser with GFM enabled, so the output is very close to GitHub's, though not pixel-identical.

How do I create GitHub alerts like [!NOTE] and [!WARNING]?

Start a blockquote whose first line is exactly one of > [!NOTE], > [!TIP], > [!IMPORTANT], > [!WARNING], or > [!CAUTION], then write the alert text on the following lines, each starting with >. Uppercase is the documented form and the most portable across other renderers.

Why does my Markdown table not render on GitHub?

The usual causes are: (1) the delimiter row (| --- | --- |) is missing or has a different number of cells than the header row; (2) an unescaped pipe character (|) inside a cell splits it into extra columns — escape it as \|; (3) the table is inside an HTML block or indented code block. Adding a blank line before the table is also a good habit, because many other Markdown renderers require it.

Does GitHub support Mermaid diagrams and LaTeX math in Markdown?

Yes. GitHub renders Mermaid diagrams from fenced code blocks tagged ```mermaid, and math written as $...$ (inline) or $$...$$ (display). GitHub also accepts $`...`$ for inline math and ```math code blocks. Note that GitHub renders math with MathJax, while this previewer uses KaTeX, so a few rarely used commands can differ.

Why are my images broken on GitHub but fine on my computer?

macOS and Windows file systems are usually case-insensitive, but paths in a Git repository are case-sensitive, so logo.PNG and logo.png are different files on GitHub. Also use paths relative to the Markdown file (for example ./assets/logo.png), never absolute file:/// paths from your machine.

Is my document uploaded or saved to any server?

No. Parsing, syntax highlighting, and diagram rendering all happen in your browser. When you fetch a public README, your browser downloads it directly from GitHub; nothing passes through or is stored on our servers.

More Markdown Tools & Guides

All tools are free, run in your browser, and require no account.

Live Markdown PreviewerTool

Edit Markdown with a real-time preview, Mermaid, KaTeX math, drag-and-drop files, and one-click export.

Open the tool
Mermaid Live EditorTool

13 diagram types with examples, live rendering, and SVG/PNG download.

Open the tool
LaTeX Math PreviewTool

Typeset equations as you type, with a copy-ready KaTeX cheat sheet of 180+ commands.

Open the tool
README Template GeneratorTool

Pick sections, fill in your project, and download a GitHub-ready README.md with badges and a TOC.

Open the tool
AI Markdown ViewerTool

Paste ChatGPT, Claude, or Gemini output and read it formatted, with tables, code, and math.

Open the tool
What Is Markdown?Guide

A plain-English introduction: what Markdown and .md files are, where it came from, and where it is used.

Read the guide
Markdown in Google DocsGuide

Preview .md files in Drive, edit in Docs' Markdown mode, and paste, convert, or export Markdown.

Read the guide
Best Online Markdown ViewersGuide

Six free tools tested with the same document: rendering, privacy, and phone support compared.

Read the guide
GitHub Markdown Not Rendering?Guide

16 causes found by symptom — tables, lists, image paths, code fences, alerts, Mermaid, math — with tested fixes.

Read the guide
Markdown Preview in VS CodeGuide

Preview shortcuts, settings verified on VS Code 1.141, built-in Mermaid and math, extensions, and fixes.

Read the guide
How to Open an .md FileGuide

Open and read Markdown files formatted on Windows, Mac, Linux, iPhone, Android, Word, and Google Docs.

Read the guide
Markdown Preview in Any EditorGuide

Exact preview shortcuts for Visual Studio, JetBrains, Zed, Xcode, Sublime, Neovim, Obsidian, and more.

Read the guide
Preview Markdown in a BrowserGuide

Six free ways to read .md files in Chrome, Edge, Firefox, or Safari — compared for privacy and features.

Read the guide