We prove that the category of boolean inverse monoids is dually equivalent to the category of boolean groupoids. This generalizes the classical Stone duality between boolean algebras and boolean spaces. As an instance of this duality, we show that the boolean inverse monoid Cn associated with the Cuntz groupoid Gn is the strong orthogonal completion of the polycyclic (or Cuntz) monoid Pn. The group of units of Cn is the Thompson group Vn,1.