The chemical reactions and pathways resulting in the formation of phytochelatins, any of a group of peptides that bind metals (Cd, Zn, Cu, Pb, Hg) in thiolate coordination complexes. The structure is of the type (gamma-glutamyl-cysteinyl)n-glycine, where n is 2 to 11.