There has been substantial interest in miniaturizing optical systems by flat optics. However, one essential optical component, free space, fundamentally cannot be substituted with conventional local flat optics with space-dependent transfer functions, since the transfer function of free space is momentum-dependent instead. Overcoming this difficulty is important to achieve the utmost miniaturization of optical systems. In this work, we show that free space can be substituted with nonlocal flat optics operating directly in the momentum domain. We derive the general criteria for an optical device to replace free space and provide two concrete designs of photonic crystal slab devices. Such devices can substitute much thicker free space. Our work paves the way for the utmost miniaturization of optical systems using a combination of local and nonlocal flat optics.