GO:0030210:   heparin biosynthetic process
The chemical reactions and pathways resulting in the formation of heparin, any member of a group of glycosaminoglycans of average Mr (6000-20000), consisting predominantly of alternating alpha-(1->4)-linked D-galactose and N-acetyl-D-glucosamine-6-sulfate residues.