JavaScript / TypeScript Playground
Write and run JavaScript or TypeScript with a live console.
TypeScript editor
Top-level await is supported. Code runs in a sandboxed iframe with no access to this page, your cookies or the network origin.
Console
Run your code to see console output here.
About the JavaScript / TypeScript Playground
A browser-based editor that runs JavaScript or TypeScript instantly. TypeScript is transpiled locally, then the code executes inside a sandboxed iframe with console.log, warn, error and table captured into a timestamped console. Supports top-level await, an execution timeout for runaway loops, auto-run, and a view of the compiled JavaScript.
Examples
TypeScript snippet
const n: number = 40 + 2; console.log(n);Output
LOG 42Keyboard shortcuts
- Copy the main outputCtrl / ⌘ + Shift + C
- Download the resultCtrl / ⌘ + S
- Share this toolCtrl / ⌘ + Shift + S
- Reset the inputsAlt + R
- Open the tool search paletteCtrl / ⌘ + K
Related tools
JavaScript Object to JSON
Dev Utilities
Convert a JS object literal into strict, valid JSON.
JS/CSS Minifier
Dev Utilities
Conservatively strip comments and whitespace from JS or CSS.
Package Manager Command Converter
Dev Utilities
Convert install/run/exec commands between npm, yarn, pnpm and bun.
Package.json Validator
Dev Utilities
Validate package.json fields, semver ranges, and scripts.
UUID Validator
Dev Utilities
Validate and inspect UUIDs, including version and timestamp.
.htaccess Redirect Generator
Dev Utilities
Generate Apache .htaccess redirect and rewrite rules.
Frequently asked questions
Version 1.0.0 · Updated 2026-08-17 · Runs entirely in your browser