Alkali-metal ions, particularly sodium (Na+) and potassium (K+), are the messengers of living cells, governing a cascade of physiological processes through the action of ion channels. Devices that can monitor, in real time, the concentrations of these cations in aqueous media are in demand not only for the study of cellular machinery, but also to detect conditions in the human body that lead to electrolyte imbalance. In this work, conducting polymers are developed that respond rapidly and selectively to varying concentrations of Na+ and K+ in aqueous media. These polymer films, bearing crown-ether-functionalized thiophene units specific to either Na+ or K+, generate an electrical output proportional to the cation type and concentration. Using electropolymerization, the ion-selective polymers are integrated as the gate electrode of an organic electrochemical transistor (OECT). The OECT current changes with respect to the concentration of the ion to which the polymer electrode is selective. Designed as a single, miniaturized chip, the OECT enables the selective detection of the cations within a physiologically relevant range. These electrochemical ion sensors require neither ion-selective membranes nor a reference electrode to operate and have the potential to surpass existing technologies for the detection of alkali-metal ions in aqueous media.