An efficient method for polymer surface patterning via Diels-Alder trapping of photo-generated thioaldehydes is presented. It is demonstrated that thioaldehyde end-groups generated by photolysis of phenacyl sulfides can be quantitatively trapped with various dienes. Poly(ethylene glycol) is immobilized on a surface in a spatially controlled fashion via irradiation through a shadow mask.