Antifouling coatings are critical for many biomedical devices. A simple and universal technique used to anchor antifouling polymers is important in order to expand its applications. In this study, we introduced the pyrogallol (PG)-assisted immobilization of poly(ethylene glycol) (PEG) to deposit a thin antifouling layer on biomaterials. Briefly, biomaterials were soaked in a PG/PEG solution and PEG was immobilized onto the biomaterial surfaces via PG polymerization and deposition. The kinetics of PG/PEG deposition started with the deposition of PG on the substrates, followed by the addition of a PEG-rich adlayer. However, prolonged coating added a top-most PG-rich layer, which deteriorated the antifouling efficacy. By controlling the amounts of PG and PEG and the coating time, the PG/PEG coating was able to reduce more than 99% of the adhesion of L929 cells and the adsorption of fibrinogen. The ultrathin (tens of nanometers) and smooth PG/PEG coating was easily deposited onto a wide variety of biomaterials, and the deposition was robust enough to survive harsh sterilization conditions. Furthermore, the coating was highly transparent and allowed most of the UV and Vis light to pass through. The technique has great potential to be applied to biomedical devices that need a transparent antifouling coating, such as intraocular lenses and biosensors.