Alkali-metal ions are the messengers of all living cells, governing a cascade of physiological processes through the action of ion channels. Sodium (Na +) and potassium (K +) are the two alkali metals found in human blood serum. 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 and dysfunctions, but also to detect conditions in the human body that lead to electrolyte imbalance, such as hypernatremia, hyperkalemia or dehydration. In this work, we developed conducting polymers 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 + ions, generated an electrical output proportional to the cation type and concentration. Using electropolymerization, we deposited the ion-selective polymers onto microscale gold patterns and integrated them as the gate electrode of an organic electrochemical transistor (OECT). The OECT current changed with respect to the concentration of the ion to which the polymer electrode was selective. Designed as a single, miniaturized chip, the OECT enabled the selective detection of Na + and K + within a physiologically relevant range. These electrochemical ion sensors required neither a complex functionalization route to fabricate, nor ion-selective membranes or a reference electrode to operate. Such customized conducting polymers have the potential to surpass existing technologies for the detection of alkali-metal ions in aqueous media and for further development into implantable medical devices.