Voltage-gated and osmosensitive chloride channel. Forms a homodimeric channel where each subunit has its own ion conduction pathway. Conducts double-barreled currents controlled by two types of gates, two fast glutamate gates that control each subunit independently and a slow common gate that opens and shuts off both subunits simultaneously. Displays inward rectification currents activated upon membrane hyperpolarization and extracellular hypotonicity (PubMed:16155254, PubMed:17567819, PubMed:19191339, PubMed:23632988, PubMed:29403011, PubMed:29403012, PubMed:36964785, PubMed:38345841). Contributes to chloride conductance involved in neuron excitability. In hippocampal neurons, generates a significant part of resting membrane conductance and provides an additional chloride efflux pathway to prevent chloride accumulation in dendrites upon GABA receptor activation. In glia, associates with the auxiliary subunit HEPACAM/GlialCAM at astrocytic processes and myelinated fiber tracts where it may regulate transcellular chloride flux buffering extracellular chloride and potassium concentrations (PubMed:19191339, PubMed:22405205, PubMed:23707145). Regulates aldosterone production in adrenal glands. The opening of CLCN2 channels at hyperpolarized membrane potentials in the glomerulosa causes cell membrane depolarization, activation of voltage-gated calcium channels and increased expression of aldosterone synthase, the rate-limiting enzyme for aldosterone biosynthesis (PubMed:29403011, PubMed:29403012). Contributes to chloride conductance in retinal pigment epithelium involved in phagocytosis of shed photoreceptor outer segments and photoreceptor renewal (PubMed:36964785). Conducts chloride currents at the basolateral membrane of epithelial cells with a role in chloride reabsorption rather than secretion (By similarity) (PubMed:16155254). Permeable to small monovalent anions with chloride > thiocyanate > bromide > nitrate > iodide ion selectivity (By similarity) (PubMed:29403012). {ECO:0000250|UniProtKB:P35525, ECO:0000250|UniProtKB:Q9R0A1, ECO:0000269|PubMed:16155254, ECO:0000269|PubMed:17567819, ECO:0000269|PubMed:19191339, ECO:0000269|PubMed:22405205, ECO:0000269|PubMed:23632988, ECO:0000269|PubMed:23707145, ECO:0000269|PubMed:29403011, ECO:0000269|PubMed:29403012, ECO:0000269|PubMed:36964785, ECO:0000269|PubMed:38345841}. This is the function of Ensembl gene identifier ENSG00000114859 (CLCN2, chloride voltage-gated channel 2).