Magnetic resonance imaging, abbreviated MRI or MR (as tomography from ancient Greek τομή tome, German 'Schnitt' and γράφειν graphein, German 'to write'), is an imaging technique used primarily in medical diagnostics to depict the structure and function of tissues and organs in the body. It is physically based on the principles of nuclear magnetic resonance (NMR), in particular field gradient NMR, and is therefore also called nuclear magnetic resonance imaging (colloquially sometimes shortened to Kernspin). The abbreviation MRI, which can also be found, comes from the English term Magnetic Resonance Imaging.

MRI can be used to produce cross-sectional images of the human (or animal) body, which allow an assessment of the organs and many pathological organ changes. It is based on very strong magnetic fields - generated in a magnetic resonance tomography system (abbreviation: magnetic resonance tomograph, MRT device) - as well as alternating magnetic fields in the radio frequency range, with which certain atomic nuclei (mostly the hydrogen nuclei/protons) in the body are resonantly excited, whereby an electrical signal is induced in a receiver circuit. Since the object to be observed thus "radiates itself", MRI is not subject to the physical law governing the resolving power of optical instruments, according to which the wavelength of the radiation used must be smaller the higher the required resolution. In MRI, object points in the submillimeter range can be resolved with wavelengths in the meter range (low-energy radio waves). The brightness of different tissue types in the image is determined by their relaxation times and the content of hydrogen atoms (proton density). Which of these parameters dominates the image contrast is influenced by the choice of pulse sequence.

No incriminating X-rays or other ionizing radiation is generated or used in the device. However, the effects of alternating magnetic fields on living tissue have not been fully researched.