Abstract Ionic liquids containing photochromic spiropyran derivatives have been synthesized. The salts with octyl functional groups are viscous liquids at room temperature and exhibit drastic color changes between yellow and purple when irradiated with UV and visible light. The salts with butyl and methyl functional groups are solids with no photochromic properties.