The development of a novel green optical pH sensor for a wide range pH values is described based on theimmobilization of grape extract on an optically transparent agarose biopolymer. Siahe Sardasht grape isa famous variety of grape in Iran that is used for red grape juice concentrate. The anthocyanins of SiaheSardasht grape were extracted and used as a suitable dye for the preparation of a pH optical sensor, by itsimmobilization on a transparent agarose film. In an optimized coupling, pH of 10 and a dye concentrationof 100 mg L−1, a sensitive sensor with long term stability was obtained. The sensor responds rapidly to thepH changes in a range of 1–10 with a response time of 3.0 min and repeatability better than 0.3% (RSD).The sensor was mounted in the quartz cells and successfully applied for pH monitoring. No evidence ofleaching of the dye or any signal drift was observed.