By using composite films of hydrolyzed Nafion and dyes having a terminal N-phenyl group, an optical humidity sensor has been fabricated. In the reflection mode, the optical intensity of the absorption peaks which depend on the dyes used was influenced by relative humidity. In dry air, the alkyl amine group reacted with SO3H of hydrolyzed Nafion and formed a proton additive. Sorption of water molecules induces the deprotonation of the quaternized ammonium group.