writejs.io

comment ⌘/ select ⌘D run ⌘↩ clear ⌘L

A JavaScript playground that stays out of your way

writejs.io is a free online JavaScript editor and console. Open the page, type code, hit ⌘↩ — the result appears instantly on the right. No signup, no project setup, no waiting.

Live console

Runs your code in a sandboxed iframe and pretty-prints logs, objects, errors, and promise results — like the browser DevTools console.

Prettier built in

Press ⌘S and your code is formatted with Prettier, keeping your cursor in place. Toggle it off any time.

VS Code-style shortcuts

⌘/ toggles comments, ⌘D selects the next occurrence and edits all of them at once, quotes auto-close.

12 color themes

One Dark, Dracula, Monokai, GitHub, Solarized, Nord, Gruvbox, Oceanic Next, Tokyo Night and more — your pick is remembered.

Modern JavaScript

ES6+ syntax highlighting including template literals with ${ } interpolation, plus top-level await.

Private by default

Your code is saved to your browser's local storage and never leaves your machine. Close the tab, come back — it's still there.

FAQ

How do I run JavaScript code online?

Type or paste your code into the editor on the left and press ⌘↩ (or click Run). The output — console logs, return values, and errors — appears in the console on the right.

Is writejs.io free?

Yes, completely free, with no account and no limits. It's a static page — everything runs locally in your browser.

How do I format my JavaScript code?

Press ⌘S or click Format. Code is formatted with Prettier and your cursor position is preserved. You can disable format-on-save with the checkbox in the toolbar.

Is my code saved if I close the tab?

Yes. The editor content, theme, and settings are saved to your browser's local storage automatically, so everything is restored when you come back. Nothing is uploaded anywhere.

Does it support modern JavaScript (ES6+)?

Yes — your code runs directly in your browser's engine, so anything your browser supports works: arrow functions, template literals, destructuring, async/await (including top-level await), classes, and more.

What keyboard shortcuts are available?

⌘↩ run · ⌘S format · ⌘L clear console · ⌘/ toggle comment · ⌘D select next occurrence (multi-edit) · Esc exit multi-select · Tab indent.