No doubt about it, centipedes and millipedes are creepily similar with their elongated, wormlike bodies and too many legs to count. In fact, for a lot of us, their names are nearly interchangeable. But these multi-legged creepy-crawlies are more different than you might think.

Knowing what separates them is a fascinating study in Mother Nature's astonishing diversity. But it can also help you decide whether to let them stay in your garden and home — both are vital contributors to ecosystem health — or whether to send them packing. Here's how to do a proper ID.

Shape and size

Scolopendra giganteaThe Amazonian giant centipede can grow to be up to a foot long or more. (Photo: Tod Baker/Wikimedia Commons)

Centipedes and millipedes aren't insects, but they're both part of the same group — arthropods — meaning they have multiple body segments and jointed legs, as outlined by the University of California Statewide Integrated Pest Management Program.

Centipedes have brown, flattened bodies divided into numerous segments. They're usually at least an inch or two long, and often much longer. One heart-stopping species, the Amazonian giant centipede (pictured), regularly grows up to a foot or more in length, according to the Metropolitan Oceanic Institute & Aquarium.

Millipedes, on the other hand, have multi-segmented cylindrical or slightly flattened brownish bodies, making them look more worm-like. Most species range from a half-inch to a few inches long.

Legginess

Close-up of millipede walkingDespite their names, most millipedes do not have have 1,000 legs, or even anywhere near that amount. As shown here, they have four small legs on each of their segmented body parts. (Photo: wi6995/Shutterstock)

Sometimes called "hundred-leggers," centipedes sport two legs per body segment, but few actually have exactly 100 legs. Most range anywhere from 30 to about 350. Their legs are attached to the side of their bodies and are typically longer and more visible than millipedes' legs.

By contrast, millipedes have four tiny bristle-like legs on most body segments. They're attached underneath and undulate in a wave-like manner when they move, making millipedes slower than centipedes. Likewise, their nickname, "thousand-leggers," is a misnomer since most millipede species actually average fewer than 100 legs. Of course, there are a few stomach-churners, like the giant African millipede, which sports over 250 legs (and a body that can reach 15 inches).

Digs

A brown centipede crawls in mulchBoth millipedes and centipedes favor damp, dark places, like the mulch this brown centipede is crawling through. (Photo: Imfoto/Shutterstock)

In nature, centipedes are found across the planet — everywhere from forests and savannas to deserts and caves. Most prefer hiding by day in damp, dark places including under stones, logs and leaf litter.

Millipedes also make their home around the globe, and seek out damp, dark spots — typically burrowed in the soil or under plant debris on forest floors.

Meal plan

A millipede munches on a mushroomMillipedes enjoy munching on decaying vegetation and rotting leaves. (Photo: AsherStock/Shutterstock)

Centipedes are nocturnal carnivores that prey on insects by injecting paralyzing venom from their fangs. Some of the heftier ones, like the eight-inch giant redheaded centipede, prefer heartier meals such as toads, lizards, rodents and snakes.

Millipedes, on the other hand, are mostly detritivores — that is, they munch on rotting leaves, wood and other moist, decaying vegetation. In fact, these scavengers function as important plant decomposers in nature, recycling nutrients back into the soil like earthworms.

Playing defense

Red-headed centipede Some of the larger, more aggressive centipedes, like the red-headed centipede pictured, have venom that can cause pain and swelling in humans. (Photo: takato marui/Wikimedia Commons)

Of the two, it's centipedes that should give you more pause. Most are shy and beat a super-speedy retreat into dark cracks or small hidey-holes when provoked. But, many can bite if handled. Mega species, in particular (like the red-headed centipede pictured above), can inflict some major pain.

Millipedes are generally pretty harmless to humans. Because they're slow moving, most defend themselves by curling into a tight ball. They don't bite or carry venom. However, many species give off a stinky secretion when bothered. In some, this substance can irritate, burn or discolor skin temporarily.

In your home

House centipede near a sink drainHouse centipedes, like the one pictured here, are common indoors but they're also harmless. (Photo: Jon Osumi/Shutterstock)

House centipedes are the only species that can live and reproduce indoors. They typically turn up in damp places like basements, garages and bathrooms, especially in spring and fall. Despite their abnormally long, hair-strand-like legs, these small invaders are generally harmless, and, in fact, can be helpful in keeping down annoying populations of flies, silverfish, cockroaches and other indoor pests. Most centipedes are too fast to catch and release outside. So if you're creeped out at the thought of sharing your home and you're not into toxic pesticides, keep rooms aired out or dry, deny them a food source by getting rid of other pests, and seal up cracks and openings so they can't get in.

Millipedes also occasionally venture into homes. Most common are small greenhouse, or garden, millipedes that may pay a visit during mass migrations after heavy spring rains. Like centipedes, they're harmless and usually seek out moist spaces on lower floors (though they can occasionally take a liking to potted plants). Many don't live long inside if conditions aren’t moist enough and there’s not enough forest-style plant foods. Often you can sweep them up and release them outside. As with centipedes, keep things dry and seal up your house.

In the garden

Millipede crawls into a bushel of cloversMillipedes are helpful in gardens, but don't let them overrun your plants. (Photo: Pattanawit Chan/Shutterstock)

As predators, centipedes can be beneficial garden buddies by keeping down unwanted invaders that harm plants. If you find too many in your garden or yard, remove their hiding places such as moist mulch, leaf litter and other organic matter.

Millipedes can also be helpful in your garden as nutrient recyclers. However, if their population explodes due to mass migrations, overmulching or overwatering, they may begin feeding on garden plants. Discourage them by removing mulch and other organic matter and laying low on water.