Based on the characteristics of ferrofluids, a monolithic optofluidic device for magnetic field sensing is proposed and demonstrated. The device consists of a Fabry-Pérot interferometer, composed by an optical waveguide orthogonal to a microfluidic channel, which was fabricated inside a fused silica substrate through femtosecond laser micromachining. The interferometer was first optimized by studying the influence of the waveguide writing parameters on its spectral properties. Waveguides written at higher pulse energies led to a decrease of the signal-to-noise ratio, due to an enhancement of micrometer sized defects associated with Mie scattering. Fringe visibility was also maximized for waveguides written at lower scanning speeds. Making use of the tunable refractive index property exhibited by magnetic fluids, the interferometer was then tested as a magnetic field sensor by injecting a ferrofluid inside the microfluidic channel. A linear sensitivity of −0.25 nm/mT was obtained in the 9.0-30.5 mT range with the external field parallel to the waveguide axis.