WYSIWYG HTML Editor

Write rich text visually and get sanitized HTML live — scripts, inline styles, event handlers and embeds are stripped, keeping semantic tags and safe links.

Type or paste rich text and use the toolbar. The cleaned, safe HTML updates live below. Have HTML already? Turn on Edit source and paste it into that panel. HTML you paste or put in the Edit source box is cleaned before it reaches the editor: scripts, styles, event handlers, frames and embeds are removed, and an image from another site is not loaded until you choose Show images.

Clean HTML
Formatted HTML will appear here…

A visual editor that outputs clean HTML

Write and format text the way you want it to look — bold, italic, underline, headings, bulleted and numbered lists, and links — using the toolbar, and this tool shows the underlying HTML live as you edit. Every keystroke is passed through a sanitizer that keeps only semantic tags, a safe href and title on links, and a safe src and alt on images, so the markup you copy is tidy and ready to paste into a CMS, email template, static site or blog. It also works the other way round: turn on Edit source and the clean-HTML panel becomes an editor of its own, so HTML you already have can be pasted straight in and edited visually above. Everything runs in your browser, so your content is never uploaded.

Safe by default

Pasted content from Word, Google Docs or web pages is notorious for smuggling in inline styles, class attributes, empty span wrappers and even script tags. This editor strips scripts, style and on* event-handler attributes, unwraps non-semantic wrappers down to their text, drops form controls and embeds such as svg, canvas, audio and video (a picture element goes too, with the images inside it), and removes unsafe link and image URLs such as javascript: schemes. Other images stay, with their alt text. The result is formatted one element per line so it is easy to read and diff. When you only need to convert or pretty-print instead of edit, reach for the Markdown to HTML and HTML formatter tools.

Frequently asked questions

Is my content uploaded to a server?

No. All editing and sanitizing happens locally in your browser with JavaScript, and nothing you type or paste is ever sent or uploaded. Nor is it kept in this browser: a reload or a closed tab opens the editor on its sample again, so copy or download what you wrote before you leave the page. An image from another site that you paste or put in the Edit source box is not fetched until you press Show images; then your browser loads it from that site, as any page showing the picture would.

What HTML does it keep and what does it remove?

It keeps semantic tags such as headings, paragraphs, lists, bold, italic, underline, code, blockquote, links and images, plus a safe href and title on each link and a safe src and alt on each image. It removes scripts, inline styles, class and id attributes, event handlers, form controls and embeds such as svg, canvas, audio and video, and it unwraps non-semantic wrappers so only clean markup remains.

How is this different from a Markdown or HTML formatter?

This is a visual editor: you format text directly and it produces the HTML. Markdown to HTML converts Markdown syntax, and the HTML formatter only re-indents existing markup. Use this when you want to write and style content without touching code.