Open source · 2026
A code playground whose share links are safe to open
A free HTML, CSS and JavaScript playground with a live preview and console, an HTML viewer, a formatter and an HTML to Markdown converter. The preview runs in a locked sandbox, so even code from a shared link cannot touch the page, drafts or the network.
- For
- Open source
- Role
- Design and engineering
- Year
- 2026
- Industry
- Developer Tools

Overview
A playground that shares code by link is, by design, a way to run a stranger's JavaScript on your screen.
HTML Playground treats that seriously: every run happens in a fresh sandboxed frame with its own security policy, and shared code never runs until you press Run.
The problem
- Shared playground links run someone else's code.
- Infinite loops can freeze the tab.
- Many playgrounds need an account to save or share.
What it had to do
- Preview code cannot reach the page, its storage, cookies or the network.
- Share links with no server.
- A viewer, formatter and converter for everyday HTML jobs.
How I built it
A real sandbox
Each run gets a new iframe with only allow-scripts, an opaque origin and a CSP that blocks all network access unless the user switches it on.
Trust nothing from the frame
Console messages are accepted only from the current frame with a random run id, and shown as text, never HTML.
Tested against hostile links
Reading parent storage, cookies, navigating the top page, opening windows, fetch and image beacons were all tried and all blocked.
What shipped
- Playground with HTML, CSS and JS tabs, console, Run and Stop, and share links.
- HTML viewer with scripts off by default.
- Beautify and minify, and HTML to Markdown.
What came of it
- Live at html.vivekbhange.tech and open source under the MIT licence.
What it does not do
- The editors are plain text boxes without syntax highlighting.
- In Firefox and Safari an infinite loop can still freeze the tab until Stop or reload.
Built with
Useful?
Have something like this to build?
Built by Vivek Bhange, Full-Stack AI Engineer in Pune, India. Open for freelance and collaboration.
More work
See all work
Developer tools · 2026
Dev Tools
Fourteen browser-only developer utilities, from a JSON formatter and JWT decoder to regex, diff and cron tools. Nothing you paste is uploaded.
Astro
View case study
Developer tools · 2026
TagLens
Reads Content Credentials, IPTC and EXIF in your browser to show why a photo gets an “AI info” label, and strips private data without uploading.
AstroWebAssembly
View case study
Developer tools · 2026
Private PDF
Merge, split, compress, convert, watermark and protect PDFs entirely in the browser. Files are never uploaded, and the page cannot connect anywhere else.
AstroWebAssembly
View case study