This Letter presents a spatial filter based on saturated absorption in gas as an alternative to the solid pinhole in a lens-pinhole-lens filtering system. We develop an analytic model that describes this process and demonstrate spatial filtering with simulations and experiments. We show that an ultraviolet laser pulse focused through ozone will have its spatial profile cleaned if its peak fluence rises above the ozone saturation fluence. Specifically, we demonstrate that a 5 ns 266 nm beam with 4.2 mJ of the initial energy can be effectively cleaned by focusing through a 1.4% ozone-oxygen mixture, with about 76% of the main beam energy transmitted and 89% of the sidelobe energy absorbed. This process can be adapted to other gases and laser wavelengths, providing alignment-insensitive and damage-resistant pinholes for high-repetition-rate high-energy lasers.