We apply wavelet-based numerical homogenization to the simulation of an optical waveguide filter. The filter is composed of a straight waveguide with small gratings engraved on one of its sides. We use numerical homogenization to find two different simplified models of the filter. First, we derive a one-dimensional model of the filter by performing the homogenization only in one coordinate direction. Second, we compute approximate subgrid models of the different parts of the filter by solving a small size problem. We then use those subgrid models to solve a large problem on a coarse grid that does not resolve the gratings.