Preview HTML in a sandbox

Inspect HTML/CSS structure without scripts or external requests.

Processed only in this browser
Input and settings
Processing options

Input and results are processed in this browser, without saving them to a server, URL or persistent browser storage. Clipboard content and downloaded files may remain on your device.

How to use this tool

  1. Enter HTML and any inline CSS.
  2. Refresh the preview to inspect its structure.
  3. Account for blocked features before copying/saving sanitized HTML.

Render the heading, remove the script

Input and settings
<h1>Hello</h1><script>alert(1)</script>
Result
Hello heading rendered · script not executed

This does not test JavaScript behavior of a live application.

Processing rules and reading the result

Resource elements/URL-opening attributes are neutralized before DOMPurify allowlisting. Output uses an isolated iframe running only its hash-authorized renderer; CSP blocks connections, images, nested frames and form submission. Inline CSS is allowed only to inspect layout.

Limits and checks before use

Input and sanitized HTML are each limited to 200,000 characters. External CSS/fonts/images, SVG, embeds, forms and supplied scripts are removed or shown as text, so output may differ from the original site. Sanitized output is not a security certification.

Common questions

Why do buttons and links not work in the preview?

This is a read-only sandbox. Those permissions are withheld to prevent unintended navigation, submission or script execution.

Standards and references