A light-inducible dimerization domain is used to create a genetically encoded, light-switchable transactivator of gene expression. The system allows rapid blue light–mediated activation of transgenes containing an appropriate activation sequence with low background and high induction. We developed a light-switchable transgene system based on a synthetic, genetically encoded light-switchable transactivator. The transactivator binds promoters upon blue-light exposure and rapidly initiates transcription of target transgenes in mammalian cells and in mice. This transgene system provides a robust and convenient way to spatiotemporally control gene expression and can be used to manipulate many biological processes in living systems with minimal perturbation.