We have developed hydrogel-based virtual microfluidics as a simple and robust alternative to complex engineered microfluidic systems for the compartmentalization of nucleic acid amplification reactions. We applied in-gel digital multiple displacement amplification (dMDA) to purified DNA templates, cultured bacterial cells and human microbiome samples in the virtual microfluidics system, and demonstrated whole-genome sequencing of single-cell MDA products with excellent coverage uniformity and markedly reduced chimerism compared with products of liquid MDA reactions.