Skip to content

Rich Text to Clean HTML Converter

Paste formatted text from Word, Google Docs, or any application. Get clean, semantic HTML with all proprietary junk stripped. See exactly what was removed.

📄 Rich Text Input — paste from Word, Docs, or any formatted source
✨ What gets cleaned: Word classes (MsoNormal), inline styles, empty tags, XML namespaces (o:p), data attributes, and unnecessary wrappers. Bold/italic spans converted to semantic <strong> and <em> tags.

Related Tools

HTML Encoder & Decoder Strip HTML Tags Markdown to HTML Converter HTML to Markdown Converter Rich Text to Markdown

How to Use

  1. Paste Your Formatted Text — Open Google Docs, Word, or any document. Select and copy (Ctrl+C) the text you want to convert. Click the white input area below and paste (Ctrl+V). Your formatted text appears visually.
  2. View the Clean HTML — The Clean HTML tab shows your content as properly formatted, semantic HTML — all Word junk stripped. The Original HTML tab shows the raw paste for comparison. The Preview tab renders the clean result visually.
  3. Copy or Download — Click Copy Clean HTML for the cleaned code, or Download .html for a complete HTML document with proper DOCTYPE and charset. The stats bar shows how many tags were removed and the size reduction.

About the Rich Text to HTML Converter

Rich Text to HTML turns formatted text pasted from Word, Google Docs, a web page or an email into short, semantic HTML. The paste usually carries classes, inline fonts, empty spans and wrapper elements. You get <h2>, <p>, <strong>, <ul> and <table> without the clutter, ready for a CMS code view, an email template or a static page. Three tabs show the cleaned HTML, the original HTML your browser received, and a preview.

What the cleaner keeps and removes

The result is printed one block per line with two-space indentation. An element with no block-level children is printed on a single line, and pre blocks keep their exact spacing.

Worked example

Word-style HTML, shortened:

In the pasted HTMLWhat the cleaner does
<p class=MsoNormal><b><span style='font-size:14pt; font-family:Calibri'>Q3 Report<o:p></o:p>Class, fonts and o:p removed; b becomes strong
Two paragraphs with mso-list:l0 level1 (marker 1.) and level2 (marker o)A numbered list with a bulleted list nested in its first item
<span style='font-style:italic'>receipts</span><em>receipts</em>
<span style='color:red'>Due <u>Friday</u></span>Color dropped, underline kept
<p class=MsoNormal><o:p>&nbsp;</o:p></p>Empty paragraph removed
<img src="file:///C:/…/clip_image001.png">Removed, because a file on your computer cannot load on the web

Clean HTML:

<p><strong>Q3 Report</strong></p>
<ol>
  <li>
    Collect <em>receipts</em>
    <ul>
      <li>Scan them</li>
    </ul>
  </li>
</ol>
<p>Due <u>Friday</u></p>

Limitations

Practical tips

Cleaning happens locally in your browser, so the documents you paste stay on your device.

Frequently Asked Questions

What does this tool remove from Word HTML?

Microsoft Word generates HTML with proprietary XML namespaces (o:p, w:sdt), MsoNormal classes, excessive inline styles (font-family, font-size, line-height on every element), empty spans and paragraphs, and deeply nested wrapper divs. This tool strips it, converting to clean semantic HTML with proper strong, em, h1-h6, ul, ol, table, and a tags — Word's bullet and numbered paragraphs are rebuilt as real lists, and empty table cells are kept so columns never shift. Images that Word references from your own computer (file paths) cannot load on the web, so they are left out.

Does it convert Word bold/italic to proper HTML tags?

Yes. Word often uses span elements with inline styles like font-weight:bold instead of strong tags. This converter detects bold, italic, underline, and strikethrough styles on spans and converts them to proper semantic HTML tags (strong, em, u, del). This produces cleaner, more accessible, and more SEO-friendly HTML.

How is this different from the Rich Text to Markdown tool?

This tool outputs clean HTML code — you get tags like <h2>, <strong>, <table>. The Rich Text to Markdown tool outputs Markdown syntax — ##, **, | table |. Use this tool when you need HTML for a website or CMS. Use the Markdown tool when you need Markdown for a static site generator, README, or documentation.

Does it handle Google Docs paste?

Yes. Google Docs produces cleaner HTML than Word but still includes custom data attributes, docs-internal classes, and span-based formatting. This converter strips the Docs-specific markup — including the invisible bold wrapper Docs puts around every paste, which would otherwise make the whole document bold — while preserving the actual content structure: headings, nested lists, tables, links, and text formatting.

Can I see how much cleanup was done?

Yes. The stats bar shows: original tag count, clean tag count, number of tags removed, original size, clean size, and percentage reduction. Word pastes are usually the most bloated, so they tend to shrink the most; already-clean HTML changes very little.

Is my pasted content sent to a server?

No. All cleaning happens locally in your browser using JavaScript and the native DOMParser API. Your content never leaves your device — nothing is transmitted, stored, or processed externally. This makes it safe for confidential documents.