The integration of top-down (lithographic) and bottom-up (synthetic chemical) methodologies remains a major goal in nanoscience. At larger length scales, light-directed chemical synthesis, first reported two decades ago, provides a model for this integration, by combining the spatial selectivity of photolithography with the synthetic utility of photochemistry. This review describes attempts to realise a similar integration at the nanoscale, by employing near-field optical probes to initiate selective chemical transformations in regions a few tens of nm in size. A combination of near-field exposure and an ultra-thin resist yields exceptional performance: in self-assembled monolayers, an ultimate resolution of 9 nm (ca. λ/30) has been achieved. A wide range of methodologies, based on monolayers of thiols, silanes and phosphonic acids, and thin films of nanoparticles and polymers, have been developed for use on metal and oxide surfaces, enabling the fabrication of metal nanowires, nanostructured polymers and nanopatterned oligonucleotides and proteins. Recently parallel lithography approaches have demonstrated the capacity to pattern macroscopic areas, and the ability to function under fluid, suggesting exciting possibilities for surface chemistry at the nanoscale.