Run unsafe user generated JavaScript in the browser
I needed a way to let users write JavaScript to create plugins for a site I'm building. I couldn't find a solution I was happy with, so ended up building one that run's it in a web worker on a separate domain from your main site. Hopefully I haven't missed anything. If so, please let me know! My website has an interactive demo you can write code in the browser textarea, and see the output on the right. Interactive Demo: https://workerbox.net/ Github: https://github.com/markwylde/workerbox
Run unsafe user generated JavaScript in the browser launched on November 19, 2022 with 113 votes, #360 of 3,471 launches that month and more than 90% of that year's launches. The site was still online in September 2026, 3 years on.
In plain words
This tool allows developers to safely execute user-generated JavaScript code in the browser by running it in a web worker on a separate domain, isolating it from the main site. It's designed for developers building platforms that need to support user-created plugins or extensions. The solution includes a sandbox security model and an interactive demo where users can write and test code directly in the browser.
written from the facts on this page · September 2026
From the sources
A secure sandbox for you to run end user JavaScript safely away from your own application. The following is a demo of using WorkerBox to create a plugin architecture for a web UI. There are messages on the right, and an action bar that you can add commands to. It will be impossible for you to effect the DOM of this page, without using the deliberately exposed methods on the scope. For this demo, you can't edit the scope, as it's hard coded into the demo app. You can edit the code below and see the results on the right. Running How does it work? An iframe is inserted into the page from a completely separate domain. The iframe then creates a web worker, and handles posting messages between…from workerbox.net
Does a similar job
all alternatives →
Execute JavaScript in a WebAssembly QuickJS sandbox2024 · github.com · ▲206This TypeScript package allows you to safely execute JavaScript code within a WebAssembly sandbox using the QuickJS engine. Perfect for isolating and running untrusted code securely, it leverages the lightweight and fast QuickJS engine compiled to WebAssembly, providing a robust environment for code execution. Features - *Security*: Run untrusted JavaScript code in a safe, isolated environment. - *File System*: Can mount a virtual file system - *Custom Node Modules*: Custom node modules are mountable - *Fetch Client*: Can provide a fetch client to make http(s) calls - *Test-Runner*: Includes…
- SJSandbox.js - Run user code in a sandboxed environment2012 · engineering.versal.com · ▲31
- IWI wrote a .NET to JS compiler. Here's an XNA demo compiled to JS.2011 · hildr.luminance.org · ▲103
- SUSpeed up your site by running JavaScript when the browser is idle2022 · npmjs.com · ▲94
- BBBrowser based deep fakes in pure JavaScript2021 · filter.mot.omg.lol · ▲117
- MTMy Turbo Pascal compiler in JavaScript2013 · teamten.com · ▲101
More dev tools this month
the category →

open-source IDE for thoughtful software design. Contribute to devdotfast/whiteboard development by creating an account on GitHub.
Dev tools · 27d ago · github.com

Contribute to reladraw/reladraw development by creating an account on GitHub.
Dev tools · 25d ago · github.com
OpenBot▲362Grok Bot alternative: free, local, open-source, multiplayer
Dev tools · 22d ago · openbot.run
Talanoa▲343Hi HN, I’m a fullstack developer, and honestly, I’ve lost count of how many side projects I’ve worked on over the years. But one idea kept coming back to me: a different kind of email client. It first came to me in 2014: “What if we could handle emails more like conversations?” Every year, I’d revisit this concept in my “Build Notes.” Ten years later, no one had built exactly what I had in mind — so I finally decided to do it myself. That’s how Talanoa was born. I wanted something focused on people, not timelines. I was tired of marking messages as unread just to remember to reply later, or…
Dev tools · 20d ago · talanoa.email
CoreSpeed▲332One MCP for everything your agents need: apps, memory, tools
Dev tools · 28d ago · corespeed.io
Source: Show HN post ↗
Launched alongside, November 2022
the whole month →



I made a thing! In 2014, I was holding a stack of iPhones and thought to myself: "Hey, if I had each phone display a playing card, I could click a button and they'd shuffle themselves" I pared that idea all the way down to this: trading cards made of e-ink displays. Right now, each card costs me about $20 each, but with only a bit more scale, I think I can get that down to $10. In doing this project, I learned how to design electronics and circuit boards. I learned Rust and wrote my first driver, I upped my CAD skills, 3D printed, and did my first resin casting. I generated the images on the…
Dev tools · 2022 · wyldcard.io

