Purpose This study aims to develop a pH-functional thin-film sensor for non-invasive measurement of spoilage of packed fish. Design/methodology/approach At first, polymers of natural origin such as hydroxy(propyl)methyl cellulose, potato dextrose agar and starch alongside a pH sensitive-mixed indicator formulation were used to produce thin film sensor. The developed thin film sensor was tested for monitoring the spoilage of seafood stored at 4°C. Using ultraviolet-visible and Fourier-transform infrared spectroscopy, the halochromic sensor was characterised. In addition, the halochromic response of the thin film was directly correlated to the total volatile base nitrogen emitted by the packaged fish, pH, microbial activity and sensory evaluation. Findings The results suggested the developed biopolymer-based thin film sensor showed different colours in line with the spoilage of the packed fish, which could be well correlated with the total volatile base nitrogen, microbial activity and sensory evaluation. In addition, the thin film sensors exhibited a high degree of biodegradability. The biopolymers-based thin film halochromic sensor has exhibited excellent biodegradability along with sensitiveness towards the spoilage of the packed fish. Originality/value In the future, consumers and retailers may prefer seafood containers equipped with such halochromic sensors to determine the degree of food deterioration as a direct indicator of food quality.