The neuronal K/Cl transporter KCC2 exports chloride ions and thereby influences the efficacy and polarity of GABA signaling in the brain. KCC2 is also critical for dendritic spine morphogenesis and the maintenance of glutamatergic transmission in cortical neurons. Because KCC2 plays a pivotal role in the function of central synapses, it is of particular importance to understand the cellular and molecular mechanisms underlying its regulation. Here, we studied the impact of membrane diffusion and clustering on KCC2 function. KCC2 forms clusters in the vicinity of both excitatory and inhibitory synapses. Using quantum-dot-based single-particle tracking on rat primary hippocampal neurons, we show that KCC2 is slowed down and confined at excitatory and inhibitory synapses compared with extrasynaptic regions. However, KCC2 escapes inhibitory synapses faster than excitatory synapses, reflecting stronger molecular constraints at the latter. Interfering with KCC2-actin interactions or inhibiting F-actin polymerization releases diffusion constraints on KCC2 at excitatory but not inhibitory synapses. Thus, F-actin constrains KCC2 diffusion at excitatory synapses, whereas KCC2 is confined at inhibitory synapses by a distinct mechanism. Finally, increased neuronal activity rapidly increases the diffusion coefficient and decreases the dwell time of KCC2 at excitatory synapses. This effect involves NMDAR activation, Ca(2+) influx, KCC2 S940 dephosphorylation and calpain protease cleavage of KCC2 and is accompanied by reduced KCC2 clustering and ion transport function. Thus, activity-dependent regulation of KCC2 lateral diffusion and clustering allows for a rapid regulation of chloride homeostasis in neurons.