HTML runner
Assemble HTML, JS and CSS into a single runnable document: script/style are parsed with raw-text rules (so `if (a < b)` is not treated as a tag), block counts are reported, and risky APIs (document.cookie, storage, frame escape, fetch) raise warnings. Nothing is executed here.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Result
The result can be copied directly.
Paste HTML / JS / CSS to see the assembled document
Characters: 0 · Lines: 0 · Script blocks: 0 · Style blocks: 0
What this tool does
- Turn a demo snippet into a downloadable single-file page.
- Check for privileged API calls before pasting a script into a page.
- Verify that JS and CSS are recognised instead of being eaten as tags.
Example
Input
<h1>Hi</h1>
<script>document.cookie</script>
<style>p{color:red}</style>Output
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>HTML runner</title>
<style>body{margin:0;padding:16px;font:14px/1.6 system-ui,sans-serif;color:#111}</style>
</head>
<body>
<h1>Hi</h1>
<script>document.cookie</script>
<style>p{color:red}</style>
</body>
</html>
script/style use raw-text rules; calls such as `document.cookie` only raise warnings.
Frequently asked questions
Does it run my script on a server?
No. The tool only parses, assembles and scans for risk; the script runs only when you hit run in the sandbox iframe on the page.
How are the warnings decided?
Fixed regexes scan the raw script text for document.cookie, localStorage/sessionStorage, top/parent.location and fetch/XMLHttpRequest. They are hints, not a security guarantee.
Is `if (a < b)` treated as a tag?
No. script and style use raw-text rules, so the inner text is kept verbatim until the closing tag.
Can it replace the browser debugger?
No. It only assembles a runnable page; the console and breakpoints still come from the browser devtools.
Keywords:html-runnersandboxdeveloper