We report a flexible single-cell isolation method by imaging-assisted hydrogel formation. Our approach consists of imaging-aided selective capture of cells of interest by encasing them into a polymeric hydrogel, followed by removal of unwanted cells and subsequent release of isolated cells by enzymatic hydrogel degradation, thus offering an opportunity for further analysis or cultivation of selected cells. We achieved high sorting efficiency and observed excellent viability rates (>98%) for NIH/3T3 fibroblasts and A549 carcinoma cells isolated using this procedure. The method presented here offers a mask-free, cost-efficient and easy-to-use alternative to many currently existing surface-based cell-sorting techniques, and has the potential to impact the field of cell culturing and isolation, e.g. single cell genomics and proteomics, investigation of cellular heterogeneity and isolation of best performing mutants for developing new cell lines.