Zovo tools

JavaScript Playground Online

Type JavaScript or TypeScript, press Run, and see the value of each line at the end of that line. console.log output and errors land on their own lines too. No account and no install.

JavaScript Playground & TypeScript Scratchpad for VS Code and Cursor, free

Optional Zovo Pro, USD 19 once: benchmark selected code and save as snapshot test. 3 free tries for each.

Your file never leaves this browser. The page reads it on your computer. Nothing is uploaded, there are no tracking cookies, and it keeps working offline once loaded.

Drop a .js or .ts file here

or

Or type in the editor below. JavaScript and TypeScript files up to 2 MB. Opening a file never runs it.

scratch.js

Ctrl+Enter or Cmd+Enter runs the code. Tab inserts two spaces; press Escape, then Tab, to leave the editor. Your code is kept in this browser only, so it is still here when you come back.

Console and values

LineKindOutput

Open this in VS Code or Cursor

The free JavaScript Playground extension shows values while you type in any .js, .mjs, .cjs, .ts, .mts or .cts file in VS Code and Cursor. It runs your code with Node.js, so imports and require resolve from your node_modules, and each run is a fresh process with a time limit.

Free, MIT license. About JavaScript Playground for VS Code.

Zovo Pro

Benchmark selected code and save a file as a snapshot test. Zovo Pro, USD 19 once.

In the JavaScript Playground extension, Zovo Pro benchmarks the selected lines (runs per second, time per run and the spread) and saves a copy of the file with an assert.deepStrictEqual line for each plain value you see, ready for the Node.js test runner. Each Pro tool has 3 free tries. One payment covers the Pro tools in 22 Zovo extensions. Everything that is free stays free.

After a card payment you get a key on the page. With GitHub Sponsors you sign in from the extension. Details on the Zovo Pro page.

Related tools

Questions

Where does my code run?

In a Web Worker inside this browser tab, started fresh for each run. The worker has no access to the page, and the page's Content Security Policy sets connect-src to none, which the worker inherits: fetch, XMLHttpRequest and WebSocket fail there, and the page removes them as well. Nothing you type is sent anywhere. Open the Network tab of your browser tools to check: a run adds no request.

When does the code run?

Only when you press Run or Ctrl+Enter (Cmd+Enter on a Mac), or while you type if you tick Run while I type. Opening a file only loads it into the editor, so a file you did not write never runs by itself.

What happens with an endless loop?

The run is stopped at the time limit (5 seconds unless you pick 2 or 10) and the page says so. A loop that runs a million times keeps the first 100 values of each line and counts the rest, so the page stays fast.

What do the values on each line show?

The value of each expression statement and each new variable, such as total = 42. A line inside a loop shows each value it took, joined with a dot. console.log, info, warn, error, table and dir show on the line that called them, a promise shows its result once it settles, and an error shows on the line that threw. Click a line to see all of its values below the editor.

Does TypeScript work?

Yes, with no setup. Pick TypeScript (a .ts file picks it for you). Types, interfaces, generics, satisfies, enums and parameter properties work: the types are removed and every line keeps its number. Types are not checked. A namespace with values does not run here.

Can I use import, require or Node.js modules?

No. A browser has no Node.js and no node_modules, so import lines are flagged and require throws an error on its line. document and the DOM are not there either, because the code runs in a worker. The free JavaScript Playground extension for VS Code runs your file with Node.js, where imports and require resolve from your project.

Is my code saved?

The page keeps the code you type in this browser's local storage, so it is still here when you come back. It is not sent anywhere. Save file downloads it to your computer, and Copy code with values copies it as Markdown with the values as comments.

What is free and what is Zovo Pro?

Everything on this page is free. In the VS Code extension, inline values, value history, Copy Code with Values as Markdown and Show Which Lines Ran are free too. Benchmark selected code and Save as snapshot test are Zovo Pro, with 3 free tries each. One USD 19 payment covers the Pro tools in every Zovo extension.