Map and filter
Input: const nums = [1, 2, 3, 4, 5, 6]; const evenSquares = nums.filter(n => n % 2 === 0).map(n => n * n); console.log(evenSquares);
Output: [4, 16, 36]
500+ fast, free tools. Most run in your browser only; Image & PDF tools upload files to the backend when you run them.
Run JavaScript in a sandboxed iframe — instant execution with console output capture.
JavaScript Online Runner executes JavaScript code in a sandboxed iframe with no external dependencies. It uses a native browser Blob URL approach — your code is wrapped in a minimal console-override shim, loaded into a hidden iframe with the 'allow-scripts' sandbox flag, and output is relayed back via postMessage. Console.log, console.error, console.warn, and console.info calls are all captured and displayed with colour-coded labels. Runtime errors are caught by a window error listener. Because the tool uses no CDN or bundler, it loads instantly on any connection. The Share Link feature encodes your snippet as a base64 URL fragment so you can share runnable code directly from the address bar without any backend. This tool is ideal for quickly testing JavaScript expressions, DOM-free algorithms, async flows, and JSON transformations.
Input: const nums = [1, 2, 3, 4, 5, 6]; const evenSquares = nums.filter(n => n % 2 === 0).map(n => n * n); console.log(evenSquares);
Output: [4, 16, 36]
Input: const wait = ms => new Promise(r => setTimeout(r, ms)); (async () => { console.log('start'); await wait(500); console.log('after 500ms'); })();
Output: start after 500ms
Input: const user = { name: 'Ada', roles: ['admin', 'editor'], meta: { last: '2026-01-01' } }; const { name, roles: [primary] } = user; console.log(JSON.stringify({ name, primary }, null, 2));
Output: { "name": "Ada", "primary": "admin" }