Write JavaScript, run it in your browser, and share the result as a link. No sign-up, nothing to install.
Run it with ⌘/Ctrl + Enter. Runs isolated in your browser — nothing is uploaded.
Runs in an isolated worker in your browser — no access to this page, its cookies or storage — and stops after 5 seconds.
Paste or type JavaScript, press Run, and the console fills in: every console.log, warnings and errors with the line they came from, and the value of the last line — the way a browser’s developer console would show it. async/await works at the top level, so you can await a promise without wrapping anything in a function.
Strictly speaking, JavaScript is not compiled ahead of time; the engine parses and runs it directly, which is what happens here. The code runs in an isolated worker inside your own browser, with no access to this page, its cookies or its storage, and it is stopped after five seconds so a loop that never ends cannot freeze the tab. When it works, Share as link turns the code into a page that runs it again for whoever opens it.
Write or paste your code in the editor, or start from one of the examples. Tab indents; ⌘/Ctrl + Enter runs.
Read the console. Logs appear in order, warnings and errors are highlighted, an error marks its line in the editor, and the last line’s value is shown with ←.
Press Share as link to publish a page with the code and its console. Whoever opens it sees the code run, and can edit a copy back here.
A student is stuck on an exercise: write a function that groups a list of orders by customer and totals each group. Their version returns NaN for one customer, and they want a second pair of eyes without asking anyone to install Node or clone a repository.
They paste the function and a few sample orders, press Run, and log the result: one order’s price is the string "9.50", so the sum turns into string concatenation and then NaN. They fix the parse, run it again to confirm the totals, and use Share as link to send the working version to their study group. Each person who opens the link sees the code and the same console output, and anyone who wants to try a variation clicks Edit a copy.
No — the code runs in a worker, which has no page to draw on, so document, window, alert and DOM methods do not exist here. That is what lets it run untrusted code safely. Timers, promises, fetch to public APIs that allow it, Map, Set, classes and the rest of the language all work. For code that builds a web page, paste the page into the HTML viewer instead, where scripts run against a real document.
Every run gets five seconds, measured from when your code starts. Code still running after that — almost always a loop whose exit condition never becomes true — is stopped, and the console says so. Without that limit, a while (true) would lock up the browser tab. Shorten the work or fix the loop condition and run it again.
It is the value of the last expression in your code, shown the way a browser console shows the result of what you typed. A file that ends with total or items.length shows that value without a console.log. If the last line is a statement such as a for loop, there is no value and nothing is shown. Code that uses await at the top level runs as an async function, so its last value is not shown either — console.log it instead.
A page with your code, highlighted, and a console that runs the code when the page is opened, plus an Edit a copy link that brings it back into this editor. You choose the visibility before publishing: Public on Explore (pre-selected) is listed where others can browse, and Private can only be opened by someone with the link. Leave secrets such as API keys out of shared code.
No. Running happens entirely in your browser; nothing is uploaded or stored. Your code only leaves your machine if you use Share as link, which publishes it on purpose.
Links gratuitos duram 7 dias com uma conta gratuita. Em um plano pago, cada página que você publica fica online permanentemente.
Ver preços