A fiber optic pH sensor has been fabricated using nile blue entrapped in an ammonia catalyzed silica sol-gel film coated on glass substrate by dip-coating. The sensor was fixed on the end of an optical fiber. The sensor showed pH sensitivity when dipped into liquids at different pHs. Linear and reproducible responses were obtained in standard buffer solutions in the pH range 6.0~8.5. which encompasses the clinically-relevant range. The effects of interferences on the determination of pH were also investigated. The sensors were successfully applied to the determination of pH in different commercial ionic drinks.