The circulation of light within dielectric volumes enables storage of optical power near specific resonant frequencies and is important in a wide range of fields including cavity quantum electrodynamics, photonics, biosensing and nonlinear optics. Optical trajectories occur near the interface of the volume with its surroundings, making their performance strongly dependent upon interface quality. With a nearly atomic-scale surface finish, surface-tension-induced microcavities such as liquid droplets or spheres are superior to all other dielectric microresonant structures when comparing photon lifetime or, equivalently, cavity Q factor. Despite these advantageous properties, the physical characteristics of such systems are not easily controlled during fabrication. It is known that wafer-based processing of resonators can achieve parallel processing and control, as well as integration with other functions. However, such resonators-on-a-chip suffer from Q factors that are many orders of magnitude lower than for surface-tension-induced microcavities, making them unsuitable for ultra-high-Q experiments. Here we demonstrate a process for producing silica toroid-shaped microresonators-on-a-chip with Q factors in excess of 100 million using a combination of lithography, dry etching and a selective reflow process. Such a high Q value was previously attainable only by droplets or microspheres and represents an improvement of nearly four orders of magnitude over previous chip-based resonators.