Here is presented a versatile technique for machining of nanometer-scale features using tightly-focused ultrashort laser pulses. By the invention, the size of features can be reduced far below the wavelength of light, thus enabling nanomachining of a wide range of materials. The features may be extremely small (<20 nm) and are highly reproducible.