Convert and preview Markdown

converts your Markdown to HTML and displays a live preview, ideal for writing READMEs, documentation or articles

What is Markdown?

Markdown is a lightweight markup language created by John Gruber in 2004. It lets you write formatted text using a simple syntax that is readable in its raw state, which is then converted to HTML.

This tool uses the GFM (GitHub Flavored Markdown) specification, the most widespread variant, which adds support for tables, checkboxes, code blocks with syntax highlighting and automatic links.

The preview on the right updates in real time as you type. The Submit button generates the corresponding HTML code, which you can copy or download.

Basic Markdown syntax

MarkdownRendered
# Heading 1<h1> heading
## Heading 2<h2> heading
**bold**bold
*italic*italic
`inline code`inline code
```php ... ```PHP code block
[text](url)Hyperlink
![alt](url)Image
- itemUnordered list
1. itemOrdered list
> quoteBlockquote
---Horizontal rule

Common use cases

  • GitHub README: writing the documentation for an open source project.
  • Technical documentation: writing guides, wikis or doc pages (MkDocs, Docusaurus, Hugo).
  • Blog articles: most CMS platforms (Jekyll, Ghost, Contentful) accept Markdown.
  • Comments and issues: GitHub, GitLab, Jira, Notion and Slack all support GFM.
  • Formatted emails: converting Markdown to HTML to embed in an HTML email.
  • Notes and slideshows: Obsidian, Notion, Marp and Reveal.js use Markdown.

Frequently asked questions

What is the difference between standard Markdown and GFM?

Standard Markdown (CommonMark) covers the basic elements: headings, lists, links, code. GFM (GitHub Flavored Markdown) adds tables, task lists (- [ ] item), fenced code with language (```php), mentions and automatic links. This tool uses GFM via the league/commonmark library.

Is the generated HTML safe?

Yes. The converter is configured to strip raw HTML tags (html_input: strip) and block unsafe links, which prevents XSS attacks. The HTML produced is suitable for embedding in an existing web page.

Can I include HTML in my Markdown?

As a security measure, raw HTML inserted into the Markdown is stripped during conversion. If you need custom HTML rendering, write the target HTML directly.

What is the maximum document size?

There is no strict server-side limit for this tool. For very long documents (more than a few thousand lines), the real-time preview may slow down depending on your browser.

Example request

curl -X POST https://cdrn.fr/api/v1/tools/markdown-formatter/execute \
  -H "Content-Type: application/json" \
  -d '{"input":"..."}'

Input schema

Field Type Required Default
input text

Endpoints

  • GET https://cdrn.fr/api/v1/tools - lists every available tool
  • GET https://cdrn.fr/api/v1/tools/markdown-formatter - returns the schema for this tool
  • POST https://cdrn.fr/api/v1/tools/markdown-formatter/execute - runs this tool with a JSON payload