The availability of compact, low-cost magnetic resonance imaging instruments would further broaden the substantial impact of this technology. We report highly sensitive detection of magnetic resonance using low-stress silicon nitride (SiN$_x$) membranes. We use these membranes as low-loss, high-frequency mechanical oscillators and find they are able to mechanically detect spin-dependent forces with high sensitivity enabling ultrasensitive magnetic resonance detection. The high force detection sensitivity stems from their high mechanical quality factor $Q\sim10^6$ combined with the low mass of the resonator. We use this excellent mechanical force sensitivity to detect the electron spin magnetic resonance using a SiN$_x$ membrane as a force detector. The demonstrated force sensitivity at 300 K is 4 fN/$\sqrt{\mathrm{Hz}}$, indicating a potential low temperature (4 K) sensitivity of 25 aN/$\sqrt{\mathrm{Hz}}$. Given their sensitivity, robust construction, large surface area and low cost, SiN$_x$ membranes can potentially serve as the central component of a compact room-temperature ESR and NMR instrument that has superior spatial resolution to conventional approaches.