Essential bifunctional enzyme that catalyzes both the N-deacetylation and the N-sulfation of glucosamine (GlcNAc) of the glycosaminoglycan in heparan sulfate (PubMed:11087757, PubMed:10758005, PubMed:10664446, PubMed:12590599, PubMed:12692154, PubMed:16020517, PubMed:16056228, PubMed:18337501). Modifies the GlcNAc-GlcA disaccharide repeating sugar backbone to make N-sulfated heparosan, a prerequisite substrate for later modifications in heparin biosynthesis (Probable). Plays a role in determining the extent and pattern of sulfation of heparan sulfate (Probable). Participates in biosynthesis of heparan sulfate that can ultimately serve as L-selectin ligands, thereby playing a role in inflammatory response (PubMed:16056228). Required for the exosomal release of SDCBP, CD63 and syndecan (By similarity). H2O + N-acetyl-alpha-D-glucosaminyl-[heparan sulfate](n) = acetate + alpha-D-glucosaminyl-[heparan sulfate](n) 3'-phosphoadenylyl sulfate + alpha-D-glucosaminyl-[heparan sulfate](n) = adenosine 3',5'-bisphosphate + 2 H(+) + N-sulfo-alpha-D-glucosaminyl-[heparan sulfate](n) Inhibited by long N-sulfated sequences (more than 6 sugar residues) accumulating in its substrates heparan sulfate, and heparin. Glycan metabolism; heparan sulfate biosynthesis. Glycan metabolism; heparin biosynthesis. Monomer (By similarity). Interacts with heparan sulfate co-polymerase subunits EXT1 and EXT2. Widely expressed in adult and throughout development. Mice survive until birth but are cyanotic and die neonatally in a condition resembling respiratory distress syndrome. In addition, a minor proportion of mice embryos die during the embryonic period. Mutant mice display cerebral hypoplasia and craniofacial defects, disturbed Ca(2+) kinetics in myotubes. They also display deficiencies L-selectin and chemokine-mediated neutrophil trafficking during inflammatory responses. The presence of 4 different NDST enzymes in mammals, as well as differences in their enzyme activity suggest that some initiate heparan sulfate modification/sulfation reactions, whereas other later on fill in or extend already modified heparan sulfate sequences. Belongs to the sulfotransferase 1 family. NDST subfamily.