Overview
The HTML Viewer helps you inspect HTML content after sanitization. It is designed for quick previewing of trusted or untrusted markup in a safe, client-side workflow. Use it to check cleaned source, spot removed elements, and verify links and media before publishing or sharing.
Use cases
- Previewing HTML snippets before publishing.
- Checking sanitized content from user submissions.
- Inspecting links, images, and attributes in generated markup.
- Verifying cleaned HTML after export or conversion.
- Reviewing unsafe or malformed HTML in a safe way.
How it works
- 1
Paste your HTML into the input field.
- 2
The tool sanitizes the markup on the client side.
- 3
Review the preview and the cleaned HTML source.
- 4
Inspect links, images, attributes, and validation messages.
- 5
Copy the sanitized result if everything looks correct.
Examples
Before publishing a blog snippet
Input: <p>Hello <script>alert(1)</script><a href='https://example.com'>link</a></p>
Output: <p>Hello <a href="https://example.com">link</a></p>
Scripts are removed while safe content remains.
Reviewing user-generated content
Input: <img src='photo.jpg' onerror='alert(1)'><strong>Nice post</strong>
Output: <img src="photo.jpg"><strong>Nice post</strong>
Dangerous event handlers are stripped from elements.
FAQ
Is this HTML Viewer safe to use?
Yes. It is intended for client-side previewing of sanitized HTML and should not execute active scripts in the output area.
Does it remove scripts and unsafe attributes?
Yes. The sanitizer is meant to remove common XSS vectors such as script tags and event handlers.
Can I inspect links and images separately?
Yes. The viewer can help you review extracted links, images, and key attributes for validation.
Is my HTML sent to a server?
No. The tool is designed for client-side only logic with no external APIs.
