Catalyzes the transfer of sulfate from 3'-phosphoadenylyl sulfate (PAPS) to position 4 of non-reducing N-acetylgalactosamine (GalNAc) residues in both N-glycans and O-glycans (PubMed:11139592, PubMed:11445554). Transfers sulfate to the C-4 hydroxyl of terminal beta-1,4-linked GalNAc in the sequence GalNAc-beta-1,4GlcNAcbeta-R found on N-linked oligosaccharides and to the nonterminal beta-1,4- linked GalNAc in chondroitin and dermatan (PubMed:11445554). Required for biosynthesis of glycoprotein hormones lutropin and thyrotropin, by mediating sulfation of their carbohydrate structures (PubMed:11139592, PubMed:11445554). {ECO:0000269|PubMed:11139592, ECO:0000269|PubMed:11445554}. [Isoform 2]: Active against chondroitin but not against terminal beta-1,4-linked GalNAc. . This is the function of CHST9 (carbohydrate sulfotransferase 9, ENSG00000154080).