Skip to content

HTML Editor

Write visually and watch clean HTML code update as you type, or edit the code directly.

Visual
Loading editor…
More cleaning options →
PreviewScripts don't run here. Need to run JavaScript? Use HTML Viewer
Runs in your browser — your document is saved only on this device. Clear removes it.

How to use

  1. Keep Clean on paste turned on, then paste text from Word or Google Docs into the visual editor.
  2. Set Code style on sync to Formatted (2 spaces) or Compact for code generated by your visual edits.
  3. Choose a Clean up preset, then click Clean up to apply it.
  4. Click Preview to check the document.
  5. Set Download as to Full document or Fragment, then click Download .html.

Examples

Clean up text copied from Word

Input
<p class=MsoNormal style="margin-bottom:0cm"><b><span lang=EN-US style="font-size:14pt;mso-ansi-language:EN-US">Product update</span></b><o:p></o:p></p>
<p class=MsoNormal><span lang=EN-US>New&nbsp;features are <i>live</i>.</span><o:p></o:p></p>
Output
<p><strong>Product update</strong></p>
<p>New features are <em>live</em>.</p>

Remove extra CMS markup

Input
<div class="wp-block" style="margin:0" data-block="7">
  <p class="has-text"><span style="color:#333">Read our <a href="/guide" class="link" target="_blank">guide</a>.</span></p>
  <p></p>
</div>
Output
<div>
  <p>Read our <a href="/guide">guide</a>.</p>
</div>

Clean up presets explained

  • Default — the classic htmlcleanup.com set: removes all attributes except href and src, unwraps spans, deletes empty and whitespace-only tags, blank lines and &nbsp;. Best for pasting into a CMS.
  • Word / Google Docs — removes the leftovers of Office markup (mso-* styles, Mso classes, <o:p>, comments, the Google Docs wrapper), turns b/i into strong/em, keeps links and images with their attributes.
  • Text structure only — bare headings, paragraphs, lists and tables without scripts, iframes or attributes other than href/src.

Need a specific option, like removing only tables or comments? Open the document in the HTML Cleaner with 21 individual options. Writing in Markdown? Try the Markdown Viewer & Editor. Need the table as Markdown or LaTeX? Use the Table Formatter.

FAQ

Can I edit HTML source code directly?

Type or paste HTML into the code panel; the visual editor updates without rewriting your code. Scripts, forms and other unsupported markup stay in the code until you edit visually, which removes them. Choose Keep editing in code in the warning to keep working in the code panel.

Can I open a Word document in this editor?

Word files can't be opened directly; copy their text from Word or Google Docs instead. Open file accepts .html, .htm, .xhtml and .txt files.

Is there a file size limit?

Files larger than 10 MB are rejected. Above 2 MB of code, live sync pauses; click Sync to update the other panel. Cleaning documents over 1 MB runs in a background worker with a 15-second timeout.

Does the HTML preview run JavaScript?

Scripts and event handlers do not run in the visual editor or Preview. Use HTML Viewer if you need to run JavaScript.

Is my HTML uploaded or saved?

Editing, cleaning and formatting run in your browser, and the tool does not send your document to a server. Your draft is saved in this browser when local storage is available; Clear deletes it. External images and other resources can still load from their original URLs, exposing your IP address to those servers.