String Utilities उपकरणम् अद्यतनम् कृतम् :दिनाङ्कः

Markdown to HTML Converter

Markdown to HTML Converter turns Markdown into an HTML fragment on the site's server using the league/commonmark library. Choose GitHub Flavored Markdown for tables, strikethrough and task lists, or strict CommonMark. Keep Sanitize on to filter the result through HTML Purifier and see a safe live preview. Copy the markup or download converted-markdown.html; input is limited to 200,000 characters.

सदा निःशुल्कम् सरलम् to use Instant फलानि गोपनीयम् च सुरक्षितम्

उपयोगः :उपकरणम्

Markdown to HTML

Convert Markdown into clean HTML with optional sanitization and live-safe preview.

Paste Convert

Input Markdown

Paste your Markdown content here

Output HTML

Generated HTML code
Preview is rendered only when sanitized output is enabled.

Preview

Safe visual rendering of sanitized HTML
Sanitized preview
Preview will appear here...
Security note
Keep sanitization enabled when previewing generated HTML. When sanitization is off, the HTML output remains available as code only.
उपकरणम् सम्बन्धः
प्रतिलिखितम् पर्यन्तम् क्लिपबोर्ड.
साहाय्यम् Improve This उपकरणम्

पठतु विषयवस्तु

शिक्षताम् कथम् उपकरणम् कार्यम् च यदा पर्यन्तम् उपयोगः एतत्.

From Markdown source to HTML markup

The Markdown to HTML Converter takes Markdown you paste in and returns the HTML a browser understands: <h2> for ##, <ul><li> for dash lists, <a href> for links, <pre><code> for fenced code and so on. You can choose between two Markdown dialects, decide whether the HTML is passed through a sanitiser, look at a live preview, and then copy the markup or download it as converted-markdown.html.

It is useful whenever a destination accepts HTML but not Markdown: a CMS field, an email template, a static page, a forum that takes HTML, or a documentation system that wants pre-rendered markup.

What powers the conversion

Conversion happens on the site's server. When you press Convert, the page sends your Markdown, the dialect you picked and the sanitiser setting to a PHP endpoint. The server converts the text with the league/commonmark library and, when sanitising is on, cleans the result with HTML Purifier against a fixed allowlist of tags. The HTML is returned to your page and shown in the output editor. The endpoint returns the result without storing it, but because the text is transmitted, avoid pasting confidential material you are not allowed to send to a third-party service.

A few rules apply on every conversion, whichever options you choose:

  • Input limit: up to 200,000 characters per request. Longer input is rejected with a validation message.
  • Front matter is dropped: a YAML block at the very top, between two --- lines, is removed before conversion so it does not show up as text in your HTML.
  • Raw HTML in the Markdown is stripped: inline tags you typed directly, such as <b> or <span>, are removed and their text remains, while a block of HTML on its own lines, such as a <div> block, is dropped together with its content. This happens even with Sanitize off.
  • Unsafe links are neutralised: a link to a javascript: address is output as an anchor without an href.

CommonMark or GitHub Flavored?

The dropdown at the top offers CommonMark and GitHub Flavored (GFM), with GFM selected by default. The difference matters more than people expect:

Markdown featureCommonMarkGitHub Flavored (GFM)
Headings, emphasis, lists, quotes, code, links, imagesYesYes
Pipe tablesNo, left as a paragraph of textYes, converted to <table>
~~strikethrough~~No, tildes stay as textYes, becomes <del>
Bare addresses like www.example.comStay plain textBecome clickable links
Task lists - [x] doneBrackets stay as textConverted to checkbox items (see Sanitize below)

Choose CommonMark when the HTML must match a strict CommonMark renderer elsewhere, or when you deliberately want table-like text left alone. Choose GFM for README files, GitHub content and most everyday writing.

The Sanitize switch

Sanitize is on by default. With it on, the converted HTML is filtered so only a known set of elements survives: headings, paragraphs, line breaks and horizontal rules, bold, italic, underline, strikethrough, lists, links, images, blockquotes, preformatted code, spans, divs and table elements. Script, iframe, object and embed elements are never allowed.

That allowlist has two side effects worth knowing:

  • Table column alignment is removed. GFM marks aligned columns with an align attribute on each cell, which the sanitiser does not keep. With Sanitize off the attribute stays.
  • Task list checkboxes are removed. The list items remain, but the checkbox inputs are stripped, so - [x] done becomes a plain bullet reading done. With Sanitize off the disabled checkbox inputs stay.

The preview panel only renders sanitised HTML. Turn Sanitize off and the badge changes to Preview disabled; the HTML is still produced and available as code, but the page will not render it. This keeps the page itself safe when you convert content you did not write.

How to convert

  1. Paste Markdown into Input Markdown, or press Paste.
  2. Pick GitHub Flavored (GFM) or CommonMark from the dropdown.
  3. Leave Sanitize on unless you need alignment attributes or task-list checkboxes in the output.
  4. Press Convert. The button shows a spinner while the server works.
  5. Read the HTML in Output HTML and check the rendered result in Preview.
  6. Use the copy icon to copy the markup, or the download icon to save converted-markdown.html.

The footers show character and word counts for both input and output, handy for spotting a conversion that dropped more than expected. The clear icon empties both editors and the preview.

What you get, and what you do not

The output is an HTML fragment: the body content only, with no <!DOCTYPE>, <html>, <head> or stylesheet. That is exactly what CMS editors and templates expect. If you open the downloaded file directly in a browser it will display with default browser styling, which is normal. Fenced code blocks keep their language as a class, for example class="language-php", so a syntax highlighter on your site can pick them up. Headings do not get automatic id attributes, so add anchors yourself if you need in-page links.

Good practice

  • Keep Sanitize on for anything you will paste into a public page. It is the safer default and removes anything outside the allowlist.
  • Use GFM when your Markdown has tables. Under CommonMark they come out as a single paragraph of pipes.
  • Write formatting in Markdown, not inline HTML. Raw tags are stripped, so <u> or <span style> in your source will not reach the output.
  • Check images. Image paths are copied as written. Relative paths such as images/a.png only work if the same path exists where you publish the HTML.

Limitations

  • 200,000 characters per conversion; an internet connection is required because conversion runs on the server.
  • Raw HTML inside Markdown is always stripped; it cannot be passed through.
  • With Sanitize on, table alignment and task-list checkboxes are lost.
  • No full-page wrapper, CSS theme or syntax highlighting is added.
  • No extensions beyond CommonMark and GFM, so footnotes, definition lists, math and heading IDs are not supported.

Related tools

If you need a printable file rather than markup, use the Markdown to PDF Converter. For plain text with no tags at all, use the Markdown to Text Converter.

Frequently Asked Questions

सामान्यप्रश्नाः

Short उत्तरम् for the प्रश्नः उपयोक्तारः ask before trusting the फलम्

Choose GitHub Flavored (GFM), the default, for most content. It supports pipe tables, strikethrough, automatic links and task lists. Choose CommonMark only when you need strict CommonMark output without those extensions.

With Sanitize on, the align attribute that GFM adds to table cells is not on the sanitiser allowlist and is removed. Turn Sanitize off to keep it, bearing in mind the preview will then be disabled.

The preview only renders sanitised HTML. When the Sanitize switch is off, the HTML is still generated and shown as code, but the page will not render it.

No. The converter strips raw HTML from the Markdown source in both flavours and with either Sanitize setting. Inline tags are removed and their text kept, while standalone HTML blocks are dropped with their content.

Yes. The Markdown is sent to the site's server, converted with the league/commonmark library and, if Sanitize is on, cleaned with HTML Purifier. The result is returned to your page and the code does not save it.

No. converted-markdown.html contains the HTML fragment exactly as shown in the output panel, without doctype, head or styles. Wrap it in your own template if you need a standalone page.

A front matter block at the very start of the document, between two lines of three dashes, is removed before conversion, so it does not appear in the HTML.

Yes. Each conversion accepts up to 200,000 characters. Split longer documents into parts.

टिप्पण्यः (:गणना)

For उपयोक्ता discussion, धारः प्रकरणम् and follow-up सुझावः
त्यजतु टिप्पणी
Your टिप्पणी will appear सार्वजनिकम् after submission.
न टिप्पण्यः अद्यापि. प्रथमम् पर्यन्तम् टिप्पणी!
कृपया अस्मान् सूचयत।
प्रतिवेदनम् an issue with this उपकरणम्

Describe the issue you encountered so we can investigate and improve the उपकरणम्

किम् सहायता अधिकतमम्
Include the निवेशः expected फलम् actual फलम् browser/device, and a पटलम् when साहाय्यम्
The पटलम् button ग्रहीतु the पृष्ठम् in the आलोकः and attaches the जनयतु प्रतिमा to this प्रारूपम्
Full-page पटलम्
न्यूइस्टी-उपकरणेन तव ब्राउजरे ग्रहीतम्।
न पटलम् ग्रहीतु yet.
उपकरणम् प्रतिवेदनम्