Although X-ray contrast agents offer specific characteristics in terms of targeting and attenuation, their accumulation in the tissue on a cellular level is usually not known and difficult to access, as it requires high resolution and sensitivity. Here, quantitative near-field ptychographic X-ray computed tomography is demonstrated to assess the location of X-ray stains at a resolution sufficient to identify intracellular structures by means of a basis material decomposition. On the example of two different X-ray stains, the nonspecific iodine potassium iodide, and eosin Y, which mostly interacts with proteins and peptides in the cell cytoplasm, the distribution of the stains within the cells in murine kidney samples is assessed and compared to unstained samples with similar structural features. Quantitative nanoscopic stain concentrations are in good agreement with dual-energy micro computed tomography measurements, the state-of-the-art modality for material-selective imaging. The presented approach can be applied to a variety of X-ray stains advancing the development of X-ray contrast agents.