A novel intelligent pH‐sensing indicator based on gelatin film and anthocyanin extracted from dragon fruit skin (Hylocereus polyrhizus) (DFSE) as a natural dye was developed to monitor food freshness by the casting method. Anthocyanin content of DFSE was 15.66 ± 1.59 mg/L. Dragon fruit bovine gelatin films were characterized by Fourier transform infrared spectroscopy (FTIR) and observed by a scanning electron microscope (SEM). Moisture content, mechanical properties, water solubility, water vapor permeability (WVP), light transmittance, color, and pH‐sensing evaluations were evaluated for potential application. FTIR spectroscopy revealed that the extracted anthocyanin could interact with the other film components through hydrogen bonds. When the extract was added, films showed a smooth and clear surface as observed by SEM. The addition of anthocyanin increased the moisture content, thickness, and water solubility of the films, but decreased the WVP and light transmittance of films. Also, the incorporation of 15% v/v DFSE decreased the tensile strength from 17.04 to 12.91 MPa, increasing the elongation at break from 91.19% to 107.86%. The films showed higher ΔE with increasing DFSE content, which indicated that the film had good color variability. A significant difference in the color of the films was observed with exposure to different pH buffer solutions. The findings demonstrated that gelatin film incorporated with DFSE could be used as a visual indicator of pH variations to monitor the freshness of foods during storage time.