Green fluorescent protein (GFP) and its derivatives revolutionized the study of proteins. Spinach is a recently reported in vitro evolved RNA mimic of GFP, which as genetically encoded fusions, makes possible live-cell, real-time imaging of biological RNAs, without resorting to large RNA-binding protein-GFP fusions. To elucidate the molecular basis of Spinach fluorescence, we have solved its co-crystal structure bound to its cognate exogenous chromophore, revealing that Spinach activates the small molecule by immobilizing it between a base triple, a G-quadruplex, and an unpaired guanine. Mutational and NMR analyses indicate that the G-quadruplex is essential for Spinach fluorescence, is also present in other fluorogenic RNAs, and may represent a general strategy for RNAs to induce fluorescence of chromophores. The structure has guided the design of a miniaturized 'Baby Spinach', and provides the foundation for structure-driven design and tuning of fluorescent RNAs.