The manufacturing of sensors based on sustainable and renewable materials is becoming increasingly important to achieve independence from fossil raw materials. It is known that hydrogels based on lignin, the polyphenolic biopolymer in lignocellulosic biomass, are able to react to environmental influences such as pH value, temperature or ion concentration. This effect can be used for sensor applications. For this purpose, ligninsulfonate hydrogel was simultaneously generated and bound to glass surfaces via a two-step synthesis. First, the etched oxide substrates were silanized using (3-acryloxypropyl)methyldimethoxysilane (APMDMS). Thereafter, the hydrogel was bound to the surface via a radical polymerization process. Here, the lignosulfonate solution, which included the crosslinker polyethyleneglycoldiacrylate (PEGDA) and ascorbic acid, was applied directly to the functionalized surface.The functionalized surface was analyzed using XPS, AFM, SEM, ATR-IR, profilometer, contact angle, and QCM. The layer thickness was found to vary between 1.8–8.6 µm as a function of the amount of precursor lignin solution applied. The porous structure exhibited pore sizes of 4–6 µm.For the sensor tests, solutions of sodium(I) and magnesium(II) salts at different concentrations were used. The hydrogels reacted with shrinking and swelling processes, depending on the selected cation and its concentration. This effect was reproducible over several cycles and the initial state could be reestablished at the end of the tests.