Yes, magnetic fields exist in space. Based on studies of a large number of pulsars and the polarisation of their radio signals, the spiral arms of the Milky Way appear to have a very large-scale organised magnetic field. Magnetic fields have been discovered in interstellar dust clouds. The fields are amplified as the clouds collapse.