About one-third of people in the developed world will undergo cataract surgery in their lifetime. Although marked improvements in surgical technique have occurred since the development of the current approach to lens replacement in the late 1960s and early 1970s, some critical steps of the procedure can still only be executed with limited precision. Current practice requires manual formation of an opening in the anterior lens capsule, fragmentation and evacuation of the lens tissue with an ultrasound probe, and implantation of a plastic intraocular lens into the remaining capsular bag. The size, shape, and position of the anterior capsular opening (one of the most critical steps in the procedure) are controlled by freehand pulling and tearing of the capsular tissue. Here, we report a technique that improves the precision and reproducibility of cataract surgery by performing anterior capsulotomy, lens segmentation, and corneal incisions with a femtosecond laser. The placement of the cuts was determined by imaging the anterior segment of the eye with integrated optical coherence tomography. Femtosecond laser produced continuous anterior capsular incisions, which were twice as strong and more than five times as precise in size and shape than manual capsulorhexis. Lens segmentation and softening simplified its emulsification and removal, decreasing the perceived cataract hardness by two grades. Three-dimensional cutting of the cornea guided by diagnostic imaging creates multiplanar self-sealing incisions and allows exact placement of the limbal relaxing incisions, potentially increasing the safety and performance of cataract surgery.