We fabricated a gas sensor for the detection of a carbon monoxide (CO) and ammonia (NH3) gas using single walled carbon nanotubes (SWNTs) and polyaniline(PANI) composite. The SWNTs were dispersed in sodium dodecyl sulfate (SDS) and were applied over the electrodes of an interdigitated electrodes (IDEs) by photolithography. By using this method, the active area for gas sensing can be denned more clearly than with simple dropping or stamping, though it is still difficult to control the concentration of dispersed composite. Our sensor showed faster response to the CO gas than the NH3 gas. The CO increased the conductance of the composite, while NH3 showed an opposite response. Nevertheless, the composite were more adsorptive to CO than NH3. In addition, we observed CO and NH3 gases were mixed carefully with the same concentrations of 5 ppm.