GGfor Tools

Markdown Formatter

Format Markdown or convert HTML and plain text into Markdown. Choose your source format, review the result, and copy Markdown or sanitized HTML.

Choose HTML for rich-text paste. Plain text mode escapes Markdown syntax. Markdown mode preserves code and punctuation.

Loading formatter…

HTML Preview

Preview updates after formatting. Scripts and external resources are blocked in the preview. Complex HTML layouts may need manual adjustment.

Markdown formatting guide

Format Markdown for documentation, README files, and articles

Markdown uses plain-text markers for headings, lists, links, and code. This online Markdown formatter helps you make existing Markdown consistent or convert HTML into editable Markdown. Use it when preparing a README, moving an article into a Markdown editor, or organizing documentation.

Which source format should you choose?

Choose the format of your input before converting. A line that starts with # can be a heading in Markdown or literal text in Plain text mode.

Markdown: format an existing document

Use this mode for .md content. It standardizes Markdown formatting while preserving code punctuation, nested lists, and explicit hard line breaks. Embedded code is not reformatted, and paragraphs are not reflowed to a fixed width.

HTML: convert structure to Markdown

Choose HTML for markup or rich-text paste. Convert headings, paragraphs, links, image references, lists, and basic tables. Styling and page layouts are not reproduced; review complex tables and unusual HTML after conversion.

Plain text: keep syntax as text

Choose Plain text when symbols such as # and * should remain visible rather than create headings or emphasis. Markdown syntax is escaped, and HTML tags are kept as text instead of being converted into document structure.

How to format Markdown or convert HTML

  1. Select and paste

    Select Markdown, HTML, or Plain text, then paste your source into the input box. Keep the original document for comparison.

  2. Format and review

    Click Format to Markdown. Compare the output and HTML preview, paying attention to code blocks, list nesting, links, and table columns.

  3. Copy the result

    Copy Markdown for a Markdown editor, or Copy HTML for HTML source. After changing the input or its format, run the formatter again to enable copying the updated result.

Markdown formatting and conversion examples

These short examples show how the selected source format changes the result. Code samples stay in English so you can compare the syntax directly.

HTML heading and link to Markdown

In HTML mode, document structure becomes editable Markdown syntax, including the link destination.

Input · HTML

<h2>Quick start</h2>
<p>Read the <a href="https://example.com/docs">guide</a>.</p>

Output · Markdown

## Quick start

Read the [guide](https://example.com/docs).

Consistent list markers with nested items

Markdown mode can normalize list markers while keeping child items nested under their parent.

Input · Markdown

* Parent
  * Child

Output · Markdown

- Parent
  - Child

Keep a heading marker as literal text

Plain text mode escapes the leading # so a Markdown renderer displays the marker instead of creating a heading.

Input · Plain text

# Release notes

Output · Markdown

\# Release notes

Check the result in your destination editor

The preview supports common Markdown and GitHub Flavored Markdown features, but editors may render details differently. Scripts and external resources are blocked in this preview. Image references remain in the output even when the image is not displayed here.

Markdown formatter FAQ

What is the difference between formatting Markdown and converting HTML?

Formatting starts with Markdown and makes its syntax consistent. HTML conversion reads elements such as headings, lists, and links and writes corresponding Markdown. Select the matching source format so tags or literal symbols are handled as intended.

Can I paste content from Word or a web page?

Select HTML mode before pasting. If the clipboard includes HTML, the tool uses that structure for conversion. If only plain text is available, the original rich formatting cannot be recovered automatically. Review headings, lists, and tables after pasting.

Does the tool support tables and code blocks?

Markdown mode supports fenced code blocks and pipe tables. HTML mode converts basic tables with a header row; merged cells and complex layouts may need manual editing. Check code indentation and language labels in the output before publishing.

Why does a single line break not create a new line in the preview?

A single newline inside a Markdown paragraph is usually a soft break. Use two trailing spaces or a backslash before the newline for a hard break, or add a blank line to start a new paragraph.

What does Copy HTML include?

Copy HTML copies the sanitized HTML markup generated from your result. It does not include the preview frame or its stylesheet, and it does not copy a rich-text document. Markdown output retains source syntax, so review raw HTML before using it elsewhere.

Is the source text uploaded for conversion?

The formatter performs conversion in your browser without sending the source to a conversion API. This describes the conversion function, not all site services. See the site privacy policy for information about analytics and other data handling.

Privacy Policy