Surface flattening techniques are extremely important for the development of future electrical and/or optical devices because carrier-scattering losses due to surface roughness severely limit the performance of nanoscale devices. To address the problem, we have developed a near-field etching technique that provides selective etching of surface protrusions, resulting in an atomically flat surface. To achieve finer control, we examine the importance of the wavelength of the near-field etching laser. Using light sources at wavelengths of 325 and 405 nm, which are beyond the absorption edge of the photoresist (310 nm), we compare the resulting cross-sectional etching volumes. The volumes were larger when 325 nm light was employed, i.e., closer to the absorption edge. Although 405 nm light did not cause structural change in the photoresist, a higher reduction of the surface roughness was observed as compared to the 325 nm light. These results indicate that even wavelengths above 325 nm can cause surface roughness improvements without notably changing the structure of the photoresist.