JavaScript Tester with Console

Client-sideNo sign-upFree

Run JavaScript in a sandboxed iframe and see console.log/warn/error output.

Quick facts

Category
Validators
Best for
Quickly checking what a pasted function actually logs or throws, without opening dev tools
JavaScript
Runs in a sandboxed iframe (sandbox="allow-scripts", no allow-same-origin) - it can't reach this page, your cookies, or storage.
Console output (0)
// Click "Run code" to execute your JavaScript and see console.log/warn/error output here
Just checking for a syntax error without running anything? Use the JavaScript Validator instead. Need to reformat the code first? Try the JavaScript Formatter.
In-content slot
Was this tool helpful?
On this page

Overview

Paste a JavaScript snippet, click Run, and see exactly what it logs - not just whether it parses. Unlike the JavaScript Validator, which only checks syntax without ever executing anything, this tool actually runs your code and streams console.log, console.warn, and console.error output back to a console panel. Execution happens inside an iframe locked down with sandbox="allow-scripts" and, critically, no allow-same-origin - that combination gives the iframe an opaque origin, which the browser treats as unable to access this page's DOM, cookies, or localStorage, and unable to navigate the parent page, even though the code inside it can still run. A runtime error is caught and shown as a console message instead of crashing the page. A fresh iframe is created for every run, so nothing carries over between runs.

Best for: Quickly checking what a pasted function actually logs or throws, without opening dev tools

How to use this tool

  1. Paste JavaScript and click Run code. Nothing executes until you explicitly run it.
  2. Code runs inside a sandboxed iframe. sandbox="allow-scripts" with no allow-same-origin gives it an opaque origin.
  3. console.* output streams back via postMessage. Only messages from that exact iframe window are accepted and rendered.
  4. Errors are caught, not crashed. A thrown error or unhandled rejection shows up as a console message instead of breaking the page.

Why use this tool

Actually executes, unlike the Validator

See real console output and runtime errors, not just a syntax check.

Opaque-origin sandbox

No allow-same-origin means the code can't reach this page's DOM, cookies, or storage.

Fresh iframe every run

Each run gets a brand-new global scope, so state never leaks between runs.

Nothing installed, nothing uploaded

Runs entirely in your browser - no server ever sees the code you paste.

Frequently asked questions

No. The iframe is sandboxed with sandbox="allow-scripts" and no allow-same-origin, which gives it an opaque, unique origin. Browsers block an opaque-origin frame from reading this page's DOM, cookies, or storage, and from navigating the parent page - scripts can run, but they run isolated.

The Validator only checks that your code parses as valid syntax and never runs it. This tool actually executes the code in a sandboxed iframe and shows you its real console output and any runtime errors.

It's caught and shown as a console message in the output panel, along with any error surfaced by the window's error or unhandledrejection listeners - it won't crash the tool or this page.

Yes - top-level async code, timers, and Promises all run normally inside the sandbox, and any console output they produce (even after the initial synchronous run) is still streamed back and rendered.

Explore more free tools

Formatters, converters, validators, and generators - all free and running entirely in your browser.

Browse more tools