Abstract
I review the main observational tools used to detect and measure magnetic fields in the interstellar medium of our Galaxy (considering both the Galactic disk and the Galactic halo), in the interstellar medium of external galaxies, and in the extragalactic medium. In each case, I present a summary of the most important results obtained with the different tools, trying to lay the emphasis on the magnetic field properties that are relevant to the propagation of ultra-high–energy cosmic rays (UHECRs).