The number of primes less or equal to a real number x, π(x), has been approximated in the past by the reciprocal of the logarithm of the number x. Such an approximation works well when x is large but it can be poor when x is small. This paper introduces a fractal formalism to provide more flexible approximation to the density of primes less or equal to a number x using the λ(s)-fractal spectrum. Results revealed that the density of primes less than or equal to x can be modeled as a monofractal probability mass function with high fractal dimension for large x. High fractal dimensions can often be decomposed to form a multifractal representation. The fractal density representation of the density of primes is closely linked to the Riemann zeta function and, thus, to the famous unsolved Riemann hypothesis.