JavaScript playground
Run JavaScript in a sealed sandbox and read what it logs to the console.
Press Run, or Ctrl + Enter (⌘ + Enter on a Mac) while typing. The code runs in a sealed frame that cannot reach other sites.
Result
Console
- Messages from console.log and errors appear here.
Missing a feature or found a bug in JavaScript playground? Tell me on X (@_andrewtran) or by email.
How to use JavaScript playground
- Write JavaScript in the box.
- Select Run, or press Ctrl + Enter.
- Read your console.log messages and any errors in Console.
Questions and answers
Is my data sent anywhere?
No. Everything runs in your browser on this device. Nothing you paste is uploaded or stored.
Can my code call an API or load a library?
No. The frame is blocked from the network, so paste the code you need into the box.
Where are the other options?
This page opens Code playground with one choice already made. Every option of that tool is still here, and its own page says more about it.
Related tools
Code playground
Try HTML, CSS and JavaScript together and see the result and the console, in a sealed sandbox.CSS playground
Try CSS against live HTML and see the result as soon as you run it.HTTP client
Send GET, POST, PUT, PATCH and DELETE requests from your browser and read the status, headers and body.Format JSON
Pretty-print, minify and validate JSON, with optional key sorting.