Run code online
A scratchpad for JavaScript, TypeScript and SQL. Everything executes on your own machine — nothing is sent to a server, so you can try a snippet that touches real data without handing it to anyone.
How to use it
- Pick a language, or load the example to see the shape.
- Write or paste your code.
- Select Run. Output appears on the right.
Questions
Where does my code run? In your browser, in an isolated worker. It has no access to this page, and no request carries your code anywhere. Most online runners send everything you type to a server to be executed — which is fine for a puzzle, and not fine for a snippet containing a real connection string.
What happens to an infinite loop? It is stopped after five seconds. The worker is terminated from outside, which is the only reliable way — a runaway loop on the main thread would freeze the tab with no way back. Anything printed before the stop is kept.
Does the TypeScript get type-checked? No. Types are stripped and the result is run. A scratchpad should not refuse to execute because an annotation is imperfect, and there is no tsconfig here to check against.
How does the SQL work? It is real SQLite, compiled to WebAssembly and served from this site rather than a CDN. Each run gets a fresh in-memory database, so create your tables in the same script as your query.
Can I use npm packages or read files? No. There is no package installation and no file system — this is a scratchpad for snippets, not a development environment. fetch works, but remember that a request you make goes wherever you point it.