Catalysis of the hydrolysis of the 6-sulfate groups of the N-acetyl-D-galactosamine 6-sulfate units of chondroitin sulfate and of the D-galactose 6-sulfate units of keratan sulfate.
EC:3.1.6.4; MetaCyc:3.1.6.4-RXN; Reactome:R-HSA-2263490 "Defective GALNS does not hydrolyse sulfate from Gal6S in keratan sulfate"; reactome:R-HSA-1630304 "GALNS oligomer hydrolyses sulfate from Gal6S in keratan sulfate"