Electron and x-ray magnetic microscopies allow for high-resolution magnetic imaging down to tens of nanometers. However, the samples need to be prepared on transparent membranes which are very fragile and difficult to manipulate. We present processes for the fabrication of samples with magnetic micro- and nanostructures with spin configurations forming magnetic vortices suitable for Lorentz transmission electron microscopy and magnetic transmission x-ray microscopy studies. The samples are prepared on silicon nitride membranes and the fabrication consists of a spin coating, UV and electron-beam lithography, the chemical development of the resist, and the evaporation of the magnetic material followed by a lift-off process forming the final magnetic structures. The samples for the Lorentz transmission electron microscopy consist of magnetic nanodiscs prepared in a single lithography step. The samples for the magnetic x-ray transmission microscopy are used for time-resolved magnetization dynamic experiments, and magnetic nanodiscs are placed on a waveguide which is used for the generation of repeatable magnetic field pulses by passing an electric current through the waveguide. The waveguide is created in an extra lithography step.