"Which of the planets has the highest density?"

The Earth has the highest density of the planets in the solar system, at 5.515 g/cm3, followed by Mercury at 5.427 g/cm3.  If the effect of gravitational compression is factored out, the materials of which Mercury is made would be denser, with an uncompressed density of 5.3 g/cm3 versus Earth’s 4.4 g/cm3

the approximate relative sizes of the terrestrial planets, from left to right: Mercury, Venus, Earth and Mars
Public Domainthe approximate relative sizes of the terrestrial planets, from left to right: Mercury, Venus, Earth and Mars - Credit: NASA