Skip to content
S

Sablejs

Run user plugins, rules, formulas, and AI-generated JavaScript safely in…

by ErosZyFree

#1841in AI
0In stores

Description

sablejs is a JavaScript sandbox for running untrusted code in the browser, such as user plugins, business rules, formulas or code written by…

Highlights

  • Ahead-of-time compilation to host JavaScript
  • Sandbox mode that copies data into the guest
  • Explicit capabilities for guest code
  • Source maps and inspectable compiler IR
  • Examples for Node, browsers, Workers, Deno and Bun
  • TypeScript support

Ratings & Reviews

No ratings yet

Be the first to rate Sablejs.

People also visit

R

Run

A secure and efficient alternative to `eval` for coding agents

Developer Tools
Launch
S

Sandbox

All-in-One Sandbox for AI Agents that combines Browser, Shell, File, MCP and…

AI
Launch
C

cloudflare/sandbox-sdk

Build sandboxed applications for secure, isolated code execution on Workers

AI Skills
Get
E

E2B

Provide AI agents with secure, isolated sandboxes featuring real-world tools

AI
Launch
V

VibeBox

Open-source, per-project micro-VM sandbox

AI
Launch
S

sandboxd

Open-source, self-hosted AI app builder

AI
Launch

Sablejs FAQ

What is sablejs for?

Running user-authored or AI-generated JavaScript, such as plugins, rules and formulas, safely inside a browser or other JavaScript host.

Which JavaScript version does it accept?

ES5.1 scripts with no imports that return their result as the final expression. Downlevel modern code with Babel or SWC first.

How does it keep the host safe?

In the default sandbox mode, plain globals are copied recursively, so guest mutations don't reach the host object graph, and guest code only gets capabilities you pass explicitly.

Is version 2 stable?

No, v2 is in beta and the latest npm tag stays on v1 until it is stable. O1 is the default optimization level; O2 and Os are experimental.

What are the best Sablejs alternatives?

Popular alternatives to Sablejs include Sandbox, E2B and VibeBox. See all Sablejs alternatives

Developer Stuff

Badges