This paper describes the design, fabrication, and performance of a thin film humidity sensor fabricated in standard CMOS process, hence it may be combined with an integrated circuit. The sensor is based on a capacitance between interdigitated electrodes in the top metal layer and water adsorption in the polyimide layer. The design is optimized by analytical and then finite element models which show that, within the constraint of the CMOS structure, the sensitivity can be no greater than one third of the sensitivity of the polyimide alone. Experimental sensors were fabricated in-house before an improved design was fabricated in a commercial foundry. The different behavior of these sensors, despite their similar designs, leads to an investigation into the effects of fabrication process on the sensor linearity. Characterizing the polyimide film by contact angle, AFM and FTIR revealed that the difference in linearity of the response between the two sensors resulted from different etching techniques employed to pattern the film.