Playcode Classic

JavaScript Playground

This online JavaScript playground puts an editor, a live preview and a console in your browser. Write JavaScript, HTML and CSS, add npm packages and watch the page change as you type. Sign in to save and share a link. It’s part of Playcode Classic, Playcode’s free code tools.

Free. No account needed to start.

In a playground sandbox a young developer codes a little house on his laptop, and Play has built the same house from toy blocks, its window lit at the same moment as the one on the screen.

Change a line. See it on the page.

Edit HTML, CSS or JavaScript and the preview updates straight away. The console sits beside it.

Play stands on a stepladder by a framed window of code with a flame-orange paint roller, and in the window beside it a little house turns flame orange at the same moment.

Add packages from npm

Import a package, press Install, and it loads. No build setup.

A little conveyor belt delivers plain parcels through a hatch, and Play stacks them neatly.

Code together, live

Invite someone into your project and edit the same files at the same time. On the free plan, two people can work in a project at once.

Two developers code side by side at a long table, the same code on both screens with two coloured cursors, while Play passes a baton between their laptops.

Make the editor yours

Pick a light or dark theme, including One Dark Pro and Darcula, and arrange the panels the way you like.

Play pushes a big code panel across the room like furniture, past the preview and console panels, with paint swatches on the wall behind him.

Start on your laptop. Keep going on your phone.

Sign in on your phone’s browser and open the same project.

The same project on a laptop at a desk and on the young developer’s phone on a city bus, where Play peeks over the top of the phone and waves.

Watch it run

A minute in the editor: write code, see the preview, read the console.

Playground, compiler, sandbox or REPL?

ToolUse it to
JavaScript PlaygroundYou are hereBuild something with HTML, CSS and packages, and see it live.
JavaScript CompilerRun a snippet and read its output.
JavaScript SandboxTest a snippet in isolation.
JavaScript REPLType one expression and see what it returns.

Part of Playcode Classic

Playcode began in 2016 as a browser coding environment. This playground is one of its free code tools, which we now call Playcode Classic.

Playcode today is an AI platform for building and running websites and apps.

Play stands at the open gate of an old playground and presents what lies beyond it: a rocket ready on its launch pad.

Questions people ask

  • What is a JavaScript playground?

    A JS playground is a place to write JavaScript and see it run straight away, without setting up a project. This one gives you an editor, a live preview and a console in your browser.

  • Is the JavaScript playground free?

    Yes. Writing and running code is free and needs no account. Saving and sharing need a free account, which keeps up to three saved projects, public or private.

  • Do I need to install anything?

    No. Open the playground and start typing. It runs in your browser.

  • Can I use npm packages?

    Yes. Import a package and the editor offers to install it from npm.

  • Which frameworks can I use?

    Start from a JavaScript, TypeScript, React, Vue or Tailwind CSS template, or plain HTML, CSS and JavaScript.

  • How do I share my code?

    Sign in and save the project. In its Share tab, set Anyone with the link to Can view, then copy the link. Anyone with the link can open it.

  • Can I publish my project as a website?

    Yes. Publish it as a static page with hosting and HTTPS. A custom domain depends on your plan.

  • Does the playground work on a phone?

    Yes, in a phone’s browser. Longer code is easier on a bigger screen.

  • Is there AI help in the editor?

    Yes. The AI chat can write, explain and fix code. It uses credits: eligible new accounts get trial credits, and paid plans add a monthly allowance.

  • Is this playground part of Playcode?

    Yes. This playground is part of Playcode Classic, Playcode’s free code tools. Playcode began in 2016 as a browser coding environment. Today it is an AI platform for building and running websites and apps.

More free code tools

Open the playground.

Um foguete espera com a porta aberta e um assento vazio, e Play convida você a entrar. Lá no alto, outro foguete se afasta.