Electron beam lithography (EBL) and lithography with focused ion beams (FIB) are specialized techniques for creating micro- and nanostructures. A beam of electrons or ions is scanned in a well defined pattern across a surface. There are various methods to transfer the scanned patterns into the desired structure. In the case of the classical EBL the substrate is covered with a resist film sensitive to the electrons. The exposed structure can be developed (positive or negative) subsequent to exposure and be transferred by etching or deposition methods. In the standard operation mode of FIB lithography the ion beam removes atoms from the surface at the tiny spot where it hits the substrate (milling). Thus the pattern can be engraved directly into the material. In addition the electron beam as well as the ion beam can be applied for beam induced deposition of material supplied by an injected precursor gas. The main attributes of all these technologies are the very high resolution almost to the atomic level and the extraordinary flexibility which can be applied to a broad variety of materials and an almost infinite number of patterns.