This paper describes a microfluidic device for the microencapsulation of cells in alginate beads to enhance cell viability. The alginate droplet including cells was gelified with calcified oleic acid, using two-phase microfluidics. The on-chip gelation had generated monodisperse spherical alginate beads, which could not be readily obtained via conventional external gelation in a calcium chloride bath. However, the prolonged exposure of encapsulated cells to the toxic oil phase caused serious damage to the cells. Therefore, we proposed the formulation of a rapid oil-exchange chip which transforms the toxic oleic acid to harmless mineral oil. The flushing out of oleic acid after the gelation of alginate beads effected a dramatic increase in the viability of P19 embryonic carcinoma cells, up to 90%. The experimental results demonstrated that the cell viability was proportional to the flow rate of squeezing mineral oil.