A new platform for structured web apps

With the Dart platform, you can write code that runs on servers and in modern web browsers. Dart compiles to JavaScript, so your Dart web apps will work in multiple browsers (not just ours).

The Dart platform includes a language, libraries, an editor, a virtual machine (VM) for both servers and browsers, and a compiler to JavaScript.

Dart is still in preview, so try it out and tell us what you think.

New! Be part of the global Dart hackathon. Learn more and register today.

Get started

Read a technical overview, take a language tour, or download Dart Editor. Or play with Dart code right here in your browser.

main() { print('Hello, Dart!'); }
main() {
  print('Hello, Dart!');
}
int fib(int n) {
  if (n <= 1) return n;
  return fib(n - 1) + fib(n - 2);
}

main() {
  print('fib(20) = ${fib(20)}');
}
class Point {
  Point(this.x, this.y);
  distanceTo(Point other) {
    var dx = x - other.x;
    var dy = y - other.y;
    return Math.sqrt(dx * dx + dy * dy);
  }
  var x, y;
}

main() {
  Point p = new Point(2, 3);
  Point q = new Point(3, 4);
  print('distance from p to q = ${p.distanceTo(q)}');
}