The morphology of dendritic spines, the postsynaptic compartment of most excitatory synapses, decisively modulates the function of neuronal circuits as also evident from human brain disorders associated with altered spine density or morphology. Actin filaments (F-actin) form the backbone of spines, and a number of actin-binding proteins (ABP) have been implicated in shaping the cytoskeleton in mature spines. Instead, only little is known about the mechanisms that control the reorganization from unbranched F-actin of immature spines to the complex, highly branched cytoskeleton of mature spines. Here, we demonstrate impaired spine maturation in hippocampal neurons upon genetic inactivation of cyclase-associated protein 1 (CAP1) and CAP2, but not of CAP1 or CAP2 alone. We found a similar spine maturation defect upon overactivation of inverted formin 2 (INF2), a nucleator of unbranched F-actin with hitherto unknown synaptic function. While INF2 overactivation failed in altering spine density or morphology in CAP-deficient neurons, INF2 inactivation largely rescued their spine defects. From our data we conclude that CAPs inhibit INF2 to induce spine maturation. Since we previously showed that CAPs promote cofilin1-mediated cytoskeletal remodeling in mature spines, we identified them as a molecular switch that control transition from filopodia-like to mature spines.