An electrochemical sensor that can resist biofouling even when operated in complex biological medium is developed for the determination of dopamine. It is based on the use of the conducting polymer poly(3,4-ethylenedioxythiophene) (PEDOT) that is doped with the water insoluble ionic liquid (IL), 1-ethyl-3-methylimidazolium bis(trifluoromethylsulfonyl)imide. A glassy carbon electrode modified with PEDOT/IL is shown to enable accurate determination of dopamine, as a model analyte in the presence of high concentrations of proteins, and resist biological fouling even in native serum. It exhibited a low limit of detection of 33nM for the detection of dopamine, with a wide linear range from 0.2 to 328μM (at 0.2V vs. saturated calomel electrode). The PEDOT/IL modified glassy carbon electrode has a porous microstructure, high electrical conductivity and good stability. The sensor can be used to quantify dopamine in human urine samples with satisfying accuracy. Graphical abstract An antifouling electrochemical sensor capable of detecting target in complex biological samples was developed based on the use of a conducting polymer (PEDOT) that wasdoped with awater insoluble ionic liquid.