DevTools Logo

Dart Playground

About this tool

The Dart Playground compiles and runs real Dart entirely in your browser with the official DartPad 0.0.6 client, its pinned Dart SDK 3.12.0 runtime, DDC and dart2wasm assets hosted by DevTools.

The first Run loads about 31 MB of compiler/runtime assets and can take tens of seconds. A live timer tracks it; the initialized runtime and browser cache make later runs faster, while Stop or the 120-second timeout destroys a stuck sandbox.

How to use this tool

  1. Write main

    Start from void main() { print('hi'); }

  2. Run

    Functions, classes, recursion and print output use official Dart semantics.

  3. Keep it single-file

    Flutter, dart:io, packages and multi-file projects are outside this playground.

Frequently asked questions

Is this a real Dart compiler?

Yes. The playground uses the official DartPad 0.0.6 browser runtime with its pinned Dart SDK 3.12.0, DDC and dart2wasm assets hosted by DevTools.

Is my Dart uploaded to DartPad?

No. Nothing is sent to dartpad.dev or any compile API.

Will Flutter or pub packages work here?

No. This is a single-file Dart console playground. Flutter, dart:io, third-party packages and multi-file projects are outside its browser sandbox.

Why is the first Run slower?

The first Run downloads about 31 MB of compiler/runtime assets and may take 10–30 seconds depending on the device and connection. Warm runs are commonly under a few seconds. A live timer is shown, and the isolated runtime is stopped after 120 seconds.