String Utilities Công cụ đã được cập nhật 2 ngày trước

Markdown Previewer

Markdown Previewer renders GitHub Flavored Markdown into HTML on the server and shows both the rendered page and its HTML source. Raw HTML and unsafe links are stripped, and front matter is hidden from the preview. Copy the HTML, download it as a standalone file, or switch to a preview-only view. Input is limited to 200,000 characters.

Luôn miễn phí Dễ sử dụng Kết quả ngay lập tức Riêng tư và an toàn

Sử dụng Markdown Previewer

Markdown

Dữ liệu đầu vào

HTML

Kết quả hiển thị

(Đã khử trùng)
Trực tiếp

Xem trước

Nội dung đã được hiển thị của bạn sẽ xuất hiện tại đây

Nhấp vào Xem trướchoặc sử dụng +Ctrl Enter

Liên kết công cụ
Đã sao chép vào khay nhớ tạm.
Hãy giúp cải thiện công cụ này

Đọc nội dung

Tìm hiểu cách thức hoạt động của công cụ này và khi nào nên sử dụng nó.

See your Markdown as a finished page

Markdown Previewer renders Markdown into HTML and shows you two things side by side: the rendered page as a reader would see it, and the HTML source that produced it. It is a quick way to check that a README, a blog draft, an issue comment or a set of notes will look right before you publish it, and to get clean HTML you can paste into a CMS or email template.

The previewer follows GitHub Flavored Markdown (GFM), the dialect most people already write in, and it strips raw HTML and unsafe links during conversion, which is why the output panel is labelled Sanitized.

The three panels

Input

The top editor, marked with a Markdown badge, is where you write or paste. Its header has a clipboard icon (Paste from clipboard), a trash icon (Clear all) and the main Preview button. The footer shows a running character count and the reminder "Supports GitHub Flavored Markdown".

Rendered Output

The middle panel, marked HTML, holds the generated HTML source in a read-only editor. Use Copy to copy that source, or Download to save it as a standalone HTML file. The footer shows the HTML character count and a Switch View button.

Preview

The bottom panel, marked Live, displays the HTML rendered in the page. A Refresh preview icon in its header renders the current input again.

How rendering works

Rendering is done on the server. When you click Preview, your Markdown is sent to the site's Markdown API, which converts it with the league/commonmark library using its GitHub Flavored Markdown converter, and the HTML is sent back and shown. The endpoint returns the HTML and does not store your text. Input is limited to 200,000 characters per request; larger documents are rejected with an error message.

Two safety settings in the converter shape the output:

  • Raw HTML in your Markdown is stripped. Tags like <div> or <details> written directly in the Markdown are removed rather than passed through, so a pasted <script> never reaches the preview.
  • Unsafe links are dropped. A link whose target uses a scheme such as javascript: keeps its text but loses its address.

If your document starts with a YAML front matter block between --- lines, that block is removed before rendering, so the preview shows only the body, as most static site generators would.

What GFM features you can use

FeatureExampleResult in preview
Tables| Name | Role | with a |---|---| rowAn HTML table
Strikethrough~~old price~~Struck-through text
Autolinkshttps://example.com in plain textA clickable link
Fenced code```js ... ```A code block with a language class
Task lists- [x] DoneA list item with a disabled checkbox, ticked or unticked

Syntax highlighting colours are not applied; code blocks are shown in a plain monospaced style with the language noted as a class in the HTML.

Step-by-step preview

  1. Type in the Input editor or click the clipboard icon. When you paste with that icon, the previewer renders automatically a moment later.
  2. Click Preview to render what you typed. The button shows "Rendering" while it waits for the server, and a toast confirms when the preview is updated.
  3. Scroll to the Preview panel to read the result. On a phone the page scrolls there for you.
  4. If you only want to read the page, click Switch View. The HTML source panel collapses and the button changes to Split View; click it again to bring the source back.
  5. After editing the input, click Preview again or the Refresh preview icon. The panel does not re-render on every keystroke.
  6. Click Copy for the HTML source, or Download to save a file named like markdown-preview-2026-10-26T14-05-09.html, stamped with the date and time.
  7. Click Clear all to empty everything.

About the downloaded HTML file

The downloaded file wraps the rendered HTML in a minimal document: a doctype, a <head> with a UTF-8 charset declaration, and your content inside <body>. It has no stylesheet, so when you open it in a browser it uses default browser styles. That makes it a clean starting point for pasting into another site, but it will not look exactly like the preview panel on this page.

Good uses for the previewer

  • Checking that a table's columns line up before committing a README.
  • Making sure list indentation produces the nesting you intended.
  • Converting a Markdown draft to HTML for a CMS that only accepts HTML.
  • Confirming that a document with front matter renders without the metadata showing.
  • Reviewing user-submitted Markdown, since embedded HTML and script links are stripped during conversion.

What to watch out for

  • Your platform may differ. GitHub, GitLab, Reddit and static site generators each add their own extensions. Footnotes, math, emoji shortcodes, diagrams and heading anchor links are not part of this previewer's output.
  • Raw HTML will not show. If your document deliberately uses HTML blocks, they will be missing here even if your target platform allows them. Remove them deliberately with Markdown Remove HTML if you want the source to match what this preview shows.
  • Task list checkboxes are read-only. They show the state written in your Markdown and cannot be clicked to change it.
  • Images load from their original URLs. The preview shows images by pointing at the addresses in your Markdown; local file paths on your computer will not load.
  • Requires a connection. Rendering is server-side, so it will not work offline.

Troubleshooting a preview that looks wrong

  • A list renders as one paragraph. Add a blank line between the paragraph above and the first list item, and check that every item starts with a marker followed by a space.
  • A table appears as plain text with pipes. The second row must be the separator row of dashes, and each row needs the same number of columns.
  • Everything after a point turns into code. A fenced code block was opened and never closed. Add the missing closing fence.
  • Your metadata shows at the top. Front matter is only recognised when the very first line is --- and the block is closed by another --- on its own line.
  • An error toast appears. Check your connection and the size of the input; anything over 200,000 characters is refused.

Related Markdown tools

If the preview reveals long blank gaps, Markdown Remove Empty Lines can help, and if you need YAML front matter at the top of the file, Markdown Metadata Generator builds it from JSON.

Frequently Asked Questions

Câu hỏi thường gặp

Các câu trả lời ngắn gọn cho những thắc mắc mà người dùng thường đặt ra trước khi tin tưởng vào kết quả.

GitHub Flavored Markdown, rendered on the server by the league/commonmark library. That includes tables, strikethrough, autolinks and fenced code blocks.

The converter is set to strip raw HTML from the input, so tags written directly in your Markdown are removed for safety.

No. It renders when you click Preview, click the Refresh preview icon, or paste with the clipboard button.

It is sent to the site's API to be converted and the HTML is returned to your browser. The endpoint does not save it.

A YAML block between --- lines at the very start of the document is removed before rendering, so only the body is shown.

Up to 200,000 characters per request. Longer input returns an error.

A standalone HTML file named markdown-preview- followed by the date and time, containing the rendered HTML inside a minimal page with no stylesheet.

It hides the HTML source panel so you can focus on the rendered preview. The button then reads Split View; click it to show the source again.

Bình luận (0)

Dành cho các cuộc thảo luận của người dùng, các trường hợp ngoại lệ và các mẹo bổ sung.
Để lại bình luận
Bình luận của bạn sẽ được hiển thị công khai sau khi gửi.
Chưa có bình luận nào. Hãy là người đầu tiên bình luận!
Hãy cho chúng tôi biết!
Báo cáo sự cố liên quan đến công cụ này

Hãy mô tả vấn đề mà bạn gặp phải để chúng tôi có thể tìm hiểu và cải thiện công cụ này.

Điều gì hữu ích nhất
Vui lòng cung cấp thông tin về dữ liệu đầu vào, kết quả mong đợi, kết quả thực tế, trình duyệt/thiết bị và ảnh chụp màn hình (nếu có thể).
Nút chụp màn hình sẽ chụp lại trang web trong trình duyệt và đính kèm hình ảnh được tạo ra vào biểu mẫu này.
Ảnh chụp màn hình toàn trang
Được ghi lại trên trình duyệt của bạn bằng newisty.
Chưa có ảnh chụp màn hình nào được chụp.
Công cụ Báo cáo