Polyelectrolyte complex (PEC) membrane based on sulfonated poly(ether ether ketone) and polyaniline (SPEEK-PANI) was developed for pH sensing application. Aniline was polymerized in the presence of SPEEK membrane by using in situ chemical oxidative polymerization to yield an ionically crosslinked SPEEK-PANI membrane. The fabricated membrane exhibited sensitivity in the physiological pH range of 2-8. The PEC membrane pH sensor showed good absorption properties in the near-infrared region (NIR). The membrane showed fast response during de-doping process (< 30 s), while longer response times are essential for doping process from low pH region to neutral or basic pH region, which is attributed to the presence of ionic interaction in the self-doped polyaniline structure. SPEEK-PANI membrane exhibited slightly higher water uptake as compared to neat SPEEK membrane. The membrane exhibited good stability as it was stored in 1M HCl solution for more than 2 years without physical or visual deterioration. A preconditioning step in 1 M HCl ensures obtaining reproducible results and allows for the pH sensor to be used repeatedly.