A Markdown preview turns plain-text markup into a rendered document while you write. Use it to check a README, release note, issue template, or documentation fragment before publishing it. The side-by-side editor makes structural problems visible without requiring a repository commit or a separate rendering service.
This tool uses the marked library with GitHub-flavored Markdown enabled. Conversion happens locally in your browser, and the page does not upload the Markdown to a server. The preview updates shortly after you stop typing and reports both the source word count and an estimated reading time.
How to Use the Markdown Preview
Edit Markdown, compare the rendered result with its HTML, and copy the generated markup.
- Enter or paste source text into the Markdown field.
- Select Preview to see the rendered document in the Markdown preview frame.
- Select HTML to inspect the generated markup in the read-only HTML field.
- Review the word count and estimated reading time below the editor.
- Select Copy HTML to copy the current generated markup.
GitHub-Flavored Markdown and the Generated HTML
Markdown uses punctuation to describe structure rather than appearance. A leading # creates a heading, asterisks can add emphasis, and fenced blocks preserve code. The renderer converts those constructs into HTML elements; it does not copy Markdown syntax into a styled text box.
GitHub-flavored Markdown, commonly shortened to GFM, extends the core syntax with features useful in technical writing. This preview enables GFM through marked, so tables, task-list items, strikethrough, autolinks, and fenced code blocks can be rendered. A compact table looks like this:
| Format | Ready |
| --- | ---: |
| JSON | Yes |
The preview applies a small built-in stylesheet for readable text, code blocks, tables, quotations, and responsive images. That styling is only part of the preview frame; Copy HTML copies the generated elements, not the frame's stylesheet or its <base> element. Pasting the result into another site can therefore look different until that site supplies its own CSS.
This is a Markdown renderer, not a GitHub page emulator. Repository-specific extensions, custom plugins, syntax highlighting, and the destination site's CSS may produce a different result. Check the final publishing system when exact visual parity matters.
Common Markdown Preview Problems
Formatting failures often come from ambiguous spacing or unclosed delimiters. Leave a blank line before a list or fenced code block when surrounding text could be interpreted as the same paragraph. Close code fences with the same backtick or tilde style, and keep table separator rows aligned with their header columns.
~~~js
const ready = true;
~~~
The optional language after an opening code fence becomes a class in the generated HTML, but this preview does not add a syntax-highlighting library. Code remains readable in a styled block without language-specific colors. Similarly, a single source line break is not necessarily an HTML line break; use a new paragraph or the syntax required by the renderer.
Relative links and images are another source of surprises. The frame receives generated HTML directly and does not set a repository base URL, so a path such as ./guide.md may not resolve as it would on a project host. Absolute links are more predictable for a standalone preview, but repository-relative paths should still be tested at their destination.
For markup that needs interactive rendering rather than Markdown conversion, use the HTML preview. To compare a revised document with an earlier version, use the text diff checker.
Raw HTML, Links, and Preview Security
The conversion itself runs in the browser and does not send the source to a formatting endpoint. The rendered result is placed in a sandboxed frame without script permission, so scripts contained in pasted Markdown cannot execute inside this preview. Links are assigned a new browsing context and may open outside the frame when selected.
That sandbox is a preview boundary, not an HTML sanitizer. marked can preserve raw HTML from the source, and Copy HTML includes the generated output as-is. Do not inject copied output from an untrusted author into an application page unless it passes through a suitable sanitizer with a policy appropriate to that application.
Rendered content can also refer to remote images or other external URLs. Although the converter itself makes no upload request, the browser may fetch a resource referenced by the Markdown when the preview renders it, which can disclose the viewer's IP address and request metadata to that resource's host. Remove external references when reviewing sensitive documents offline.
Treat links and copied markup as untrusted data. Inspect unfamiliar destinations before opening them, and avoid placing credentials, private repository content, or personal data into examples that will later be shared. Client-side conversion reduces one exposure path but does not make unsafe content trustworthy.
Reading Time, Accessibility, and Publishing Checks
The status line counts whitespace-separated source tokens as words and estimates reading time at roughly 230 words per minute, rounded to the nearest minute with a minimum of one. It is a planning estimate, not a linguistic analysis: code, URLs, table cells, and Markdown punctuation can affect the count.
Before publishing, check more than visual layout. Use meaningful link text, give images useful alternative text, keep heading levels in a logical order, and label code fences when the destination provides syntax highlighting. A preview can show structure, but it cannot determine whether the writing is understandable to a screen-reader user.
Also inspect the HTML view when downstream systems impose restrictions. Email editors, content-management systems, and documentation pipelines may remove elements or attributes. If you plan to transform the output into component markup, the HTML to JSX converter can handle a separate conversion step, but the result still needs review in its target application.
Frequently Asked Questions
Does this preview support GitHub-flavored Markdown?
Yes. It calls marked with GFM enabled, which covers constructs such as tables, task lists, strikethrough, autolinks, and fenced code blocks. A repository host can still add its own extensions and CSS, so the result is not a guarantee of pixel-for-pixel GitHub rendering.
Does the preview sanitize raw HTML?
No. Raw HTML may appear in the generated output, while the on-page preview relies on a sandboxed frame without scripts to limit execution. Sanitize copied HTML before inserting content from untrusted authors into another page.
Why does copied HTML look different elsewhere?
Copy HTML copies the renderer's output, not the preview frame's built-in stylesheet. The receiving page controls fonts, spacing, table borders, code styling, and other presentation. It may also filter elements or attributes according to its own security policy.
Are Markdown links and images opened or loaded locally?
Markdown-to-HTML conversion is local, and the source is not uploaded by the tool. However, a rendered remote image can cause the browser to request that external resource, and selecting a link navigates to its target. Remove remote references when that network activity is undesirable.
How is the reading-time estimate calculated?
The tool splits the Markdown source on whitespace, counts nonempty pieces, and divides the count by 230. It rounds the result and shows at least one minute. Code, URLs, and markup are included, so use the figure as a rough editorial guide.
References: GitHub Flavored Markdown specification · Marked documentation.