The gas and ice giants in our solar system can be seen as a natural laboratory for the physics of highly compressed matter at temperatures up to thousands of kelvins. In turn, our understanding of their structure and evolution depends critically on our ability to model such matter. One key aspect is the miscibility of the elements in their interiors. Here, we demonstrate the feasibility of X-ray Thomson scattering to quantify the degree of species separation in a 1:1 carbon-hydrogen mixture at a pressure of~150 GPa and a temperature of 5000 K. Our measurements provide absolute values of the structure factor that encodes the microscopic arrangement of the particles. From these data, we find a lower limit of 24 þ6 À7 % of the carbon atoms forming isolated carbon clusters. In principle, this procedure can be employed for investigating the miscibility behaviour of any binary mixture at the highpressure environment of planetary interiors, in particular, for non-crystalline samples where it is difficult to obtain conclusive results from X-ray diffraction. Moreover, this method will enable unprecedented measurements of mixing/demixing kinetics in dense plasma environments, e.g., induced by chemistry or hydrodynamic instabilities.