As the size of the planets differs, similarly the density of the planets also varies broadly. Among all the planets of ou solar system, all the four inner planets (the planets closest to the Sun) are much denser than the four outer planets (farthest from the sun). It is because the inner planets are made up of heavy metals and rocks whereas the outer planets consist of gases.
So, in between Mercury and Mars, the more denser planet is Mercury.
And in between Earth and Venus, the more denser planet is Venus.