Compaction of the preimplantation embryo is the earliest morphogenetic process essential for mammalian development, yet it remains unclear how round cells elongate to form a compacted embryo. Here, applying live mouse embryo imaging, we demonstrate that cells extend long E-cadherin-dependent filopodia onto neighbouring cells, which control the cell shape changes necessary for compaction. We found that filopodia extension is tightly coordinated with cell elongation, while retraction occurs before cells become round again before dividing. Laser-based ablations revealed that filopodia are required to maintain elongated cell shapes. Moreover, molecular disruption of the filopodia components E-cadherin, alpha/beta-catenin, F-actin and myosin-X prevents cells from elongating and compacting the embryo. Finally, we show that early filopodia formation triggered by overexpressing myosin-X is sufficient to induce premature compaction. Our findings establish a role for filopodia during preimplantation embryonic development and provide an in vivo context to investigate the biological functions of filopodia in mammals.