Instant preview, clean code, all in your browser
Edit visually on the left and adjust the HTML on the right. Clean messy code with one click, open HTML or DOCX files, keep smaller drafts locally in your browser, and export the result when you are done.
Features
The page combines a WYSIWYG editor, a code viewer and an HTML cleaner in one free online tool.
Visual editor on the left
Format headings, paragraphs, links, lists, images, tables, colors and alignment without touching raw code.
Source editor on the right
Edit syntax-highlighted HTML with tag matching, line wrapping and a resizable code area.
Panels stay in sync
Changes in the visual editor update the code, and source edits refresh the preview in real time. You can work in either panel.
Import and export
Open .html, .htm and .docx, then download a clean HTML file, a ZIP package with images, or a DOCX document.
Built-in cleaning tools
Great for pasted Word or other rich-text documents, copied website HTML, or AI-generated text that needs cleanup before publishing.
Local draft saving
Smaller drafts are auto-saved in your browser using localStorage, so your backup stays on your device.
How to use
The fastest workflow for editing and cleaning HTML.
- Paste or open content. Type directly in the text areas, paste from Word or a website, or load an existing HTML or DOCX file.
- Edit visually or in code. Use the rich-text toolbar for quick formatting, then jump to the source panel when you want direct HTML control.
- Run cleanup. Turn on the rules you need under the source code, then click Clean to remove unnecessary markup and normalize the source.
- Download the result. Save as HTML or DOCX. The result is zipped when the HTML references local images.
Control panel
These controls allow fast editing and safe cleanup. Try the Demo content to see how the buttons work and what the cleaning options actually do.
Under the WYSIWYG
- Open Doc or HTML lets you load a file by clicking the button or dragging it into the editor area.
- Demo loads a sample page with inline styles and other messy markup so you can test the editor and cleanup tools safely.
- HTML downloads the source code. If the page contains images, the export becomes a ZIP package with the HTML file and an images folder. If there are no images, it downloads a single
.htmlfile. - Docx exports the visual editor content as a Word document, so the tool also works as a simple online document editor even when you are not focused on raw HTML.
The download buttons and cleanup controls appear only when there is content in the editor. Extremely large documents are intentionally limited because they can freeze your browser.
Above the source
- Undo reverses the last cleaning or other source edit. Note that there's a separate Undo above the visual editor and the source code.
- New page clears the editor and starts from an empty document.
- Lipsum appends 5 paragraphs of "Lorem ipsum" placeholder dummy text after the current content.
- Encoding changes how special characters are written into HTML and reloads the visual editor accordingly.
- Auto scroll keeps the two editors synchronized while scrolling.
- Indentation reformats the code with line breaks and nesting so the markup is easier to read.
- Compress removes extra line breaks and comments to make the file smaller.
- ๐ Copy copies the source code to the clipboard.
Cleaning options
Turn a rule on for the next full cleanup, or run a single cleanup rule instantly when needed.
Clean runs all enabled rules at once and also fixes markup errors.
Inline styles
Removes style, align, valign and similar layout attributes from tags.
Classes & IDs
Deletes class and ID attributes if you need neutral, reusable markup.
Empty tags
Removes elements that do not wrap meaningful content, like <p></p>.
Tags with 1 space
Deletes tags that contain only a single blank space, such as <p> </p>.
Repeated spaces
Collapses successive non-breaking spaces and related spacing noise.
Comments
Deletes HTML comments wrapped in <!-- ... -->.
Tag attributes
Strips most attributes except href of links and src of images, so essential elements still work.
To plain text
Removes HTML tags and leaves plain text only.
Smart s
Adjusts non-breaking spaces in headings and paragraphs so short words are less likely to be stranded at line endings.
AI characters
Normalizes quotes, unusual dashes, hidden characters and other copy-paste artifacts common in AI tools and word processors.
<script> and <style> blocks are removed. Keep CSS and JavaScript in separate files if you still need them.
Quick recap
Main tools built into the editor for writing, cleaning and transforming HTML.
Interactive source editor
Edit visually and in code simultaneously in connected panels with live preview.
HTML cleaning
Remove inline styles, classes, empty tags and unnecessary markup.
Word to HTML conversion
Publish DOCX content online by easily converting it into clean, usable HTML.
AI character remover
Get rid of quotes, unusual dashes and hidden copy-paste characters from AI-generated text.
Lorem-Ipsum generator
Insert placeholder dummy text when you need content for a demo or layout.
Tag attribute remover
Strip unwanted attributes while keeping essential content intact.
What's new in 2026
HTML Online is now 11 years old, and the latest update makes the editor faster, cleaner and easier to use than ever.
- AI character remover cleans up smart quotes, strange dashes, invisible characters and other artifacts left behind by AI tools and word processors.
- Smart s improve readability by automatically adjusting non-breaking spaces in headings and paragraphs.
- Drag and drop Word or HTML files opens .docx, .html and .htm files instantly by dropping them into the editor area.
- Drafts saved in localStorage help keep your latest draft in the browser on your own device.
- Much faster loading means the old loading animation is gone.
- Save as HTML or Docx exports your work either as a clean HTML file or as a DOCX document.
- Simplified interface keeps the cleaning tools visible all the time instead of hiding them in a dropdown.
Frequently Asked Questions
Find your answer quicker before contacting us.
Can I embed this HTML editor on my own website?
Not as a free plugin. There is no public installable version you can simply add to your site. If you only want to display the editor inside your own page, embedding it with an iframe may be the simplest allowed solution.
Can I use it offline?
Yes, after the page has fully loaded. Internet access is needed to open the editor and load its assets, but once everything is loaded in the browser, you can keep working even if you go offline.
Is HTML editing private?
Your edited documents are not stored by this website, and there is no database connected directly to the editor. However, complete privacy can never be guaranteed because third-party services such as hosting providers, Cloudflare, analytics tools, your browser, and installed browser extensions may still access page activity or content.
Do I need to install anything to use this tool?
No installation is required. The editor runs directly in your browser, so you can start editing HTML instantly without downloading software, plugins or extensions.