Abstract The mathematical concept of topology has brought about significant advantages that allow for a fundamental understanding of the underlying physics of a system. In magnetism, the topology of spin order manifests itself in the topological winding number which plays a pivotal role for the determination of the emergent properties of a system. However, the direct experimental determination of the topological winding number of a magnetically ordered system remains elusive. Here, we present a direct relationship between the topological winding number of the spin texture and the polarized resonant X-ray scattering process. This relationship provides a one-to-one correspondence between the measured scattering signal and the winding number. We demonstrate that the exact topological quantities of the skyrmion material Cu 2 OSeO 3 can be directly experimentally determined this way. This technique has the potential to be applicable to a wide range of materials, allowing for a direct determination of their topological properties.