The heaviest star in the universe has been discovered — and it’s only 15 miles wide.

It is more than twice the mass of the sun, meaning a sugar cube of it would weigh 100 million tons. That is the same weight as the entire human population.

Known as a neutron star, it is the compressed remains of a supernova, an exploding star, and is 700,000 times heavier than Earth.

It is also a pulsar, emitting radio waves like a lighthouse as it spins.

Neutron stars form when the outer part of a giant sun explodes and the core implodes. Its protons and electrons melt into each other to form neutrons.

Named J0740+6620, it is 2.17 times the mass of the sun — which is 333,000 times the mass of the Earth. The findings were published in Nature Astronomy.

It is “the most massive neutron star ever detected — almost too massive to exist,” says the team.

The measurement approaches the limits of how compact a single object can be without crushing itself into a black hole.

It was detected about 4,600 light-years from Earth by the Green Bank Telescope in West Virginia. One light-year is about 6 trillion miles.

Scientist Thankful Cromartie, of Virginia University, said: “Neutron stars are as mysterious as they are fascinating. These city-sized objects are ginormous atomic nuclei.”

Colleague Maura McLaughlin, who studied the star with Duncan Lorimer, said: “These stars are very exotic.”

Neutron stars have temperatures of a million degrees, are highly radioactive and have intense magnetic fields.

Mass is the amount of matter in a material while weight is a measure of how much gravity acts upon that mass.