Abstract: We show that electron irradiation in a dedicated scanning transmissionmicroscope can be used as a nano-electron-lithography technique allowing thecontrolled reshaping of single walled carbon and boron nitride nanotubes. Therequired irradiation conditions have been optimised on the basis of totalknock-on cross sections calculated within density functional based methods. Itis then possible to induce morphological modifications, such as a change of thetube chirality, by removing severals tens of atoms with a nanometrical spatialresolution. These irradiation techniques could open new opportunities fornano-engeneering a large variety of nanostructured materials.