ABSTRACT RNAs are major drivers of phase separation in the formation of biomolecular condensates, and can undergo protein-free phase separation in the presence of divalent ions or crowding agents. Much remains to be understood regarding how the complex interplay of base stacking, base pairing, electrostatics, ion interactions, and particularly structural propensities governs RNA phase behavior. Here we develop an i ntermediate resolution model for con densates of RNA s (iConRNA) that can capture key local and long-range structure features of dynamic RNAs and simulate their spontaneous phase transitions with Mg 2+ . Representing each nucleotide using 6-7 beads, iConRNA accurately captures base stacking and pairing and includes explicit Mg 2+ . The model does not only reproduce major conformational properties of poly(rA) and poly(rU), but also correctly folds small structured RNAs and predicts their melting temperatures. With an effective model of explicit Mg 2+ , iConRNA successfully recapitulates experimentally observed lower critical solution temperature phase separation of poly(rA) and triplet repeats, and critically, the nontrivial dependence of phase transitions on RNA sequence, length, concentration, and Mg 2+ level. Further mechanistic analysis reveals a key role of RNA folding in modulating phase separation as well as its temperature and ion dependence, besides other driving forces such as Mg 2+ -phosphate interactions, base stacking, and base pairing. These studies also support iConRNA as a powerful tool for direct simulation of RNA-driven phase transitions, enabling molecular studies of how RNA conformational dynamics and its response to complex condensate environment control the phase behavior and condensate material properties. SIGNIFICANCE STATEMENT Dynamic RNAs and proteins are major drivers of biomolecular phase separation that has been recently discovered to underlie numerous biological processes and be involved in many human diseases. Molecular simulation has an indispensable role to play in dissecting the driving forces and regulation of biomolecular phase separation. The current work describes a high-resolution coarse-grained RNA model that is capable of describing the structure dynamics and complex sequence, concentration, temperature and ion dependent phase transitions of flexible RNAs. The study further reveals a central role of RNA folding in coordinating Mg 2+ -phosphate interactions, base stacking, and base pairing to drive phase separation, paving the road for studies of RNA-mediated phase separation in relevant biological contexts.