A flow cytometry technique featuring the all-optical measurement of nuclear mechanical properties is developed by integrating Brillouin spectroscopy with microfluidics.