Molecular switches: Highly efficient acido- and photoswitchable frequency doublers (see scheme) based on the indolinooxazolidine core are studied by means of hyper-Rayleigh experiments and quantum-chemical calculations.To optimize the nonlinear optical (NLO) contrast, a series of indolinooxazolidine derivatives with electron-withdrawing substituents in the para position on the indolinic residue have been synthesized. Their linear and nonlinear optical properties have been characterized by UV-visible absorption and hyper-Rayleigh scattering measurements, as well as by ab initio calculations. The two-way photo- or pH-triggered switching mechanism has been demonstrated by comparing the absorption spectra of the zwitterionic and protonated open forms (POF). Hyper-Rayleigh measurements have revealed that the second-order NLO contrast between the closed indolinooxazolidine and the open pi-conjugated colored forms remain very large upon substitution. Theory and measurements show that for the POFs the amplitude of the first hyperpolarizability follows the Hammett parameters of the withdrawing groups. However, because the measurements are performed in resonance, to recover this behavior, elaborate procedures including homogeneous and inhomogeneous broadenings, as well as single-mode vibronic structures are necessary to extrapolate to the static limit.