Sulfotransferase that utilizes 3'-phospho-5'-adenylyl sulfate (PAPS) as sulfonate donor to catalyze the transfer of sulfate to position 6 of non-reducing N-acetylglucosamine (GlcNAc) residues within keratan-like structures on N- and O-linked glycans and within O-linked mucin-type glycans (PubMed:11042394, PubMed:11726653, PubMed:35939855, PubMed:38034954, PubMed:9722682). Selectively transfers the sulfate group onto the terminal GlcNAc of alpha1,3-Man or alpha1,6-Man antenna of complex-type N-glycans depending on glycan composition. Only sulfates terminal GlcNAc of alpha1,3-Man antenna of G0 complex-type N- glycans. Can sulfate keratan-type N-acetyllactosamine (LacNAc) repeats generating epitopes for self versus non-self immune recognition by C- type lectins (PubMed:35939855, PubMed:38034954). Transfers the sulfate group primarily on core 2 GlcNAcbeta1-6(Galbeta1-3)GalNAcalpha-Ser/Thr and with lower efficiency on extended core 1 GlcNAcbeta1-3Galbeta1- 3GalNAcalpha-Ser/Thr based O-linked glycans on peripheral node addressins (PNAds) expressed on the lumenal side of high endothelial venules (HEVs). Shares substrate specificity with CHST4 and both contribute to generate sialyl 6-sulfo Lewis X determinant (also known as MECA-79 epitope) for SELL recognition, a prerequisite for continuous lymphocyte homing into peripheral lymph nodes and antigen immune surveillance (By similarity) (PubMed:9722682). Has no activity toward alpha-linked GlcNAc moiety exposed at the non-reducing ends or to internally located GlcNAc residues (PubMed:11042394). {ECO:0000250|UniProtKB:Q80WV3, ECO:0000269|PubMed:11042394, ECO:0000269|PubMed:11726653, ECO:0000269|PubMed:35939855, ECO:0000269|PubMed:38034954, ECO:0000269|PubMed:9722682}. This is the function of Ensembl gene identifier ENSG00000175040 (CHST2, carbohydrate sulfotransferase 2).