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 intermediate resolution model for condensates of RNAs (iConRNA) that can capture key local and long-range structural features of dynamic RNAs and simulate their spontaneous phase transitions with Mg 2+ . Representing each nucleotide using 6 to 7 beads, iConRNA accurately captures base stacking and pairing and includes explicit Mg 2+ . The model not only reproduces 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 environments control the phase behavior and condensate material properties.