Black holes are the densest objects in the universe, which gives them a powerful gravitational pull on the space around them.

They can be millions of times larger than suns and planets, or as small as a city.

Using just gravity, black holes can rip entire planets and stars apart — but how powerful they are depends on how much mass is inside.

Watch the video above to learn just how big black holes can get, like the supermassive black hole at the center of M87.

Visit Business Insider's homepage for more stories.

Following is a transcript of the video.

Narrator: The cosmos can be a dangerous place. Take black holes, for example. They're some of the most violent objects in our universe, powerful enough to rip entire stars to pieces.

Their secret weapon is gravity. You see, the more mass you can shrink into a small space, the stronger your gravitational force will become. To make Earth into a black hole, for instance, you'd have to shrink it to less than an inch across.

But real black holes are much larger than that and pack way more mass than Earth. Here's just how big black holes can really get.

There are three common types of black holes. The smallest are stellar black holes, which form after a giant star explodes and collapses in on itself, like this one, which measures about 40 miles across, roughly three times the length of Manhattan. But in that small space is enough mass to equal 11 of our suns.

In another galaxy, called M33, there's a black hole that is 58 miles across and packs as much mass as 15.7 suns inside.

Up next are the intermediate-mass black holes, like this one. At 1,460 miles across, it's nearly large enough to stretch from Florida to Maine and, according to some calculations, contains the mass of 400 suns.

At this point, black holes start to get pretty big compared to Earth, but it's still nothing when you consider the sheer mass they carry. Take this black hole, for example. It's nearly twice the size of Jupiter, spanning a region about 172,000 miles wide, but inside is as much mass as 47,000 suns.

But these black holes are nothing compared to supermassive black holes, like Sagittarius A*, which lives at the center of our Milky Way galaxy. It covers a region about 14.6 million miles in diameter. That's roughly 168 Jupiters across, and inside is the same amount of mass as 4 million suns combined. Now that may sound big, but Sagittarius A* is small compared to other supermassive black holes.

Take the one at the center of our neighbor the Andromeda galaxy, which has a diameter of 516 million miles, larger than Jupiter's orbit, and contains enough mass to equal that of 140 million suns. We're finally getting to some of the largest black holes in the universe, and yet we haven't reached one that surpasses the size of our solar system.

So let's look at the supermassive black hole at the center of the Sombrero galaxy. It measures 2 billion miles across, so it would stretch further than Uranus' orbit, and it has about the same mass as 660 million suns.

And the supermassive black hole at the center of Messier 87 is so huge that astronomers could see it from 55 million light-years away. It's 24 billion miles across and contains the same mass as 6 1/2 billion suns. But this supermassive black hole, as large as it is, could still fit within our solar system with plenty of room to spare.

So we have to look at one of the most massive of all supermassive black holes. It has a diameter of about 78 billion miles. For perspective, that's about 40% the size of our solar system, according to some estimates. And it's estimated to be about 21 billion times the mass of our sun.

So there you have it, black holes can be millions of times larger than suns and planets or as small as a city. It all depends on how much mass is inside. Turns out, when it comes to the cosmos, size isn't the only thing that matters.

EDITOR'S NOTE: This video was originally published in May 2019.