Analysis of gas (especially CO2) components in air is very important for many industrial applications such as environmental protection and disaster monitoring. It is essential to distinguish the absorption lines of the measured gas from the mixed spectral lines of the various gases in the spectral measurement for gas analysis. The conventional narrowband filter is not sufficient to separate the sharp spectrum of the CO2. In this paper, we present a design method for narrowband optical filter by combining a narrowband filter and a wideband filter.