Prion-like RNA binding proteins (RBPs) such as TDP43 and FUS are largely soluble in the nucleus but form solid pathological aggregates when mislocalized to the cytoplasm. What keeps these proteins soluble in the nucleus and promotes aggregation in the cytoplasm is still unknown. We report here that RNA critically regulates the phase behavior of prion-like RBPs. Low RNA/protein ratios promote phase separation into liquid droplets, whereas high ratios prevent droplet formation in vitro. Reduction of nuclear RNA levels or genetic ablation of RNA binding causes excessive phase separation and the formation of cytotoxic solid-like assemblies in cells. We propose that the nucleus is a buffered system in which high RNA concentrations keep RBPs soluble. Changes in RNA levels or RNA binding abilities of RBPs cause aberrant phase transitions.