Characterization of microscopic details of the fabric of mudstones and shales (i.e., structure and composition) is important to understand their storage and transport properties. Current characterization methods struggle to probe reliably multiple scales of interest (e.g., pore and fracture) and measure properties at the finest resolution under representative in situ conditions. Micro X-ray fluorescence (μXRF) is a high-performance imaging technique that produces elemental images at sub-10 μm spatial resolution and could offer insight into a diversity of shale properties, such as mineral composition, porosity, and in situ pressure gradients. This study designed and carried out a porosity mapping protocol using model and real-rock microfluidic devices and contrast fluids. Etched silicon micromodels with real-rock pore network patterns served as ideal models to establish a proof of concept. Measurements were performed on a novel μXRF microscope not powered by synchrotron radiation. We registered the μXRF datasets with the binary rock masks used for micromodel fabrication and applied segmentation algorithms to compare porosities. We assessed expected advantages and limitations through a sensitivity analysis and beam study. μXRF is an important new imaging technique for microfluidic applications.