We report a microfluidic approach to generating capsules of biopolymer hydrogels. Droplets of an aqueous solution of a biopolymer were emulsified in an organic phase comprising a cross-linking agent. Polymer gelation was achieved in situ (on a microfluidic chip) by diffusion-controlled ionic cross-linking of the biopolymer, following the transfer of the cross-linking agent from the continuous phase to the droplets. Gelation was quenched by collecting particles in a large pool of cross-linking agent-free liquid. The structure of microgels (from capsules to gradient microgels to particles with a uniform structure) was controlled by varying the time of residence of droplets on the microfluidic chip and the concentration of the cross-linking agent in the continuous phase. We demonstrated the encapsulation of a controlled number of polystyrene beads in the microgel capsules. The described approach was applied to the preparation of capsules of several polysaccharides such as alginate, kappa-carrageenan, and carboxymethylcellulose.