Histone deacetylases (HDACs) play a crucial role in numerous biological processes and therefore are targeted in anticancer research and in the field of epigenetics. Dithienylethenes (DTEs) and fulgimides were functionalized with hydroxamic acids, which is a known moiety binding to zinc dependent HDACs, to gain photoswitchable HDAC inhibitors. The new DTE based inhibitors showed moderate photochromic properties in polar solvents and the inhibitory activity changes up to a factor of four. The photochromic performance of the prepared fulgimide inhibitors was very good, even in aqueous buffer. They achieved a maximum three-fold difference in inhibitory activity. Docking experiments using the crystal structures of the tested enzymes gave a rationale for the observed moderate differences in the activities of the inhibitors.