Embeddable Node.js sandboxes

Embed Node.js anywhere ✨

Drop an isolated, ephemeral Node.js sandbox into any website. No infrastructure to run.

index.html
<iframe  src="https://nodebox.microlink.io/e?template=showcase&amp;theme=microlink"  title="Nodebox"  width="100%"  height="427"  style="border:0;background:transparent"  loading="lazy"  allow="clipboard-write"></iframe>

01 /Why Nodebox

Run Node.js code directly in your product without spinning up or maintaining your own execution infrastructure. Nodebox gives you a fully managed, secure and isolated sandbox that you can embed anywhere with one iframe.

03 /Built for

  • Interactive docsTurn code samples into a hands-on experience.
  • AI agentsLet agents write and run Node.js code safely.
  • Tutorials & educationGive learners a real Node.js in the browser.
  • Developer toolsAdd code execution to products and internal tools.

04 /Embed it

Add a fully featured Node.js sandbox to any website with a few lines of code. This snippet follows the example and theme you pick in the playground above.

index.html
<iframe  src="https://nodebox.microlink.io/e?template=showcase&amp;theme=microlink"  title="Nodebox"  width="100%"  height="427"  style="border:0;background:transparent"  loading="lazy"  allow="clipboard-write"></iframe>

05 /FAQ

What is Nodebox?

Nodebox is a Node.js sandbox you can embed in any website with one iframe. Visitors edit the code and press run, and it runs on a real Node.js 24 runtime with npm packages. There’s nothing to host on your side, and the code never runs in the visitor’s browser. It’s built by Microlink for interactive docs, tutorials, AI agents and developer tools.

Is this CodeSandbox’s Nodebox?

No, the two aren’t related. CodeSandbox’s Nodebox, the runtime behind Sandpack, runs inside the browser: the page downloads a runtime first, and modules like fs and net are browser stand-ins. StackBlitz WebContainers work the same way. This Nodebox runs the code on a real Node.js runtime on Microlink’s servers.

How does Nodebox work?

When a reader presses run, the code goes to the Microlink API, which starts a fresh sandbox, installs the packages the code imports, runs it and throws the sandbox away. Once its packages are cached, a run usually takes under a second. The reader sees the console output, then the result: the value the code returns, or the value of its last line, printed as text the way Node.js prints it. HTML and images show as text, not rendered.

How do I add Nodebox to my website?

Open the playground, write your code, pick a theme and copy the embed code. It’s a single lazy-loaded iframe that works in plain HTML, React or any docs platform that accepts one. If your site sets a Content-Security-Policy, add https://nodebox.microlink.io to frame-src. The code lives in the iframe URL, so to change an embed later, edit it in the playground and paste the new embed code. On a page with many snippets, make the key examples runnable and show the rest as plain code, since every run counts toward your readers’ daily limit.

What can I configure in the embed?

The code, the theme, every color, the font, line numbers, the border, and the API call panel, which shows the snippet as a ready-to-paste API call. The playground writes all of it into the iframe URL. The embed fills the width of its container and fits its height to the code, scrolling past 16 lines. The theme doesn’t switch with the reader’s dark mode.

Can I share a snippet?

Yes. Every playground URL carries its code, so you can send the link. Add a title and a description and the link gets its own page title and social card.

Can I run the same code from my backend or an AI agent?

Yes. Turn on the API call panel to see your snippet as a ready-to-paste Microlink API call in JavaScript, cURL, Python, Ruby, PHP, Go or the CLI, or press “Copy Microlink API request” next to the result for the raw request URL.

Does the embed show Nodebox branding?

Yes. Every embed has an “Open in Nodebox” button with the Nodebox logo in its footer, which opens the snippet in the playground. It can’t be removed.

Can I lock a snippet, hide setup code or show output up front?

No to all three. Readers can always edit the code, every line is visible, and output appears only after a run. Readers’ edits last until they reload the page, which brings back your original.

Can my page control the embed?

No. There’s no JavaScript API: your page can’t run the embed, change its code after it loads or read its result. Everything is set through the iframe URL.

Does the embedded code help my page’s SEO?

Not reliably. Search engines treat an iframe as a separate page, so keep the explanation you want to rank as text on your own page and use the embed to make it runnable.

Is Nodebox free?

Yes. Embeds cost nothing for you or your readers, and paying doesn’t change what your readers get, since embeds always run on the free plan. In the playground, or when you call the API from your own code, a free Microlink API key gives you 25 runs per day. Paid plans start at $49 per month for 46,000 runs per month, with 60-second runs and access to external APIs.

What limits do my readers have?

You can’t raise these limits for your readers. Loading a page costs nothing; a run counts only when a reader presses run. Each IP address gets 5 runs per day, up to 2 at a time, so readers on one office network share them, and each run gets up to 15 seconds, 64 MB of memory and 5 KB of code. More in the rate limit docs.

What does a reader see after using all their free runs?

In place of the result, the embed says “You used all of today’s free runs. Add a Microlink API key to keep running code.” The code stays editable, and “Open in Nodebox” takes it to the playground, where the reader can add a key of their own.

What happens when the code throws or hits a limit?

The error takes the place of the result, with its name and message. A run that goes past its time or memory limit stops with a TimeoutError or a MemoryError.

Are results cached?

Yes. Identical code is answered from the Microlink cache, which every visitor shares, so a Math.random() snippet shows the same number until its code changes. In the playground, turn on “Skip the cache on every run” to run it fresh each time.

Can my code call external APIs?

Only on a paid Microlink plan, in the playground or through the API, where fetch and the http module work as usual. Embeds can’t reach other websites.

Can I install any npm package?

Any public package written in JavaScript, scoped ones included. Require or import it and Nodebox detects it and installs it on the fly. Pin a version by appending it to the name, like require('[email protected]'). Private packages can’t be installed, since there’s no way to pass a registry token. Packages that load native binaries, such as bcrypt or sharp, are blocked by the sandbox, so use a pure JavaScript alternative like bcryptjs.

Does Nodebox support TypeScript?

No. Nodebox runs JavaScript on Node.js only, with require, import and top-level await; there’s no TypeScript, Deno, Bun or Python. Type annotations are a syntax error, so remove them before you run the snippet.

Can I use files, read input or start a server?

No. A snippet is a single file that runs once and returns its result. The fs module can’t read host files or write to disk, process.stdin is empty so readline prompts get no answer, and calling listen() to start a server fails.

Is it safe to run untrusted code?

Yes, your readers’ edits included. Each run happens in an isolated sandbox on Microlink that can’t read host files, write to disk or spawn child processes, and the sandbox is discarded after the run.

Is my code private, and can I use secrets?

Treat the code as public. It travels in the embed URL and in the API request, so anyone who can see your page can read it. There’s no way to pass environment variables or secrets, so keep API tokens and passwords out of snippets.

What data does Nodebox collect about my readers?

Microlink receives the code and the reader’s IP address, which it uses to count free runs. The embed sets no cookies and loads no analytics.

Can I self-host Nodebox?

No. Every run executes on the Microlink API, so there’s no version you can run on your own servers.

Where do I report a bug or ask for help?

Open the snippet in the playground, with “Open in Nodebox” if it’s an embed, and use the Feedback button in the corner. With “Attach” on, the report includes the snippet and the last run’s request ID, so Microlink can replay what you saw.

Give your product a Node.js runtime.

Embed a secure, ephemeral Node.js environment in minutes.