In order to widen the measurement range of pH values, a pH sensor based on the deposition of intelligent hydrogel on the cladding of a fiber Bragg grating (FBG) is developed. The key material, i.e., intelligent hydrogel, which is mainly made from N-isopropylacrylamide and sodium alginate, can respond to pH changes within the range from 0 to 14. By means of a spiral coating under the condition of ultraviolet light, an uninterruptible spiral-coating-layer structure is constructed. This new craft creates a more sensitive hydrogel layer with an optimal overlay thickness. In addition, with the addition of poly ethylene glycols (PEGs) in the hydrogel, half the response time can be saved compared with the pH sensor without PEG. Experimental results have confirmed that the FBG-based pH sensor can realize the successful measurement of the entire range of pH values, showing fast response and high sensitivity.