Of all the reptiles living today, crocodiles and alligators may be the least changed from their ancestors of the late Cretaceous period--although the even earlier crocodiles (or "crocodylomorphs," as they're sometimes called) of the Triassic and Jurassic sported some distinctly un-croc like features, such as bipedal postures and vegetarian diets. (See a gallery of prehistoric crocodile pictures.)
Stay up to date on the latest dinosaur news--sign up for the free About.com dinosaur newsletter today!
Crocodiles were an offshoot of the archosaurs, the "ruling lizards" of the Triassic period that preceded the dinosaurs. To simplify matters greatly, by about 200 million years ago, archosaurs had evolved into three separate reptile families: dinosaurs, pterosaurs (flying reptiles), and crocodiles.
Confusingly, the earliest dinosaurs and crocodiles resembled one another a lot more than either resembled the first pterosaurs. What distinguished crocodiles from their terrestrial cousins was the shape and musculature of their jaws, which tended to be much more deadly. It was only tens of millions of years later that crocodiles evolved the traits with which they're associated today: stubby legs, sleek bodies, and aquatic lifestyles.
Early Crocodiles
Before the first crocodiles emerged on the scene, there were the phytosaurs ("plant lizards"): reptiles that looked very much like crocodiles, except that their nostrils were positioned on the tops of their heads rather than the tips of their snouts. You might guess from their name that phytosaurs were vegetarians, but in fact they subsisted on fish and marine organisms in freshwater lakes and rivers. Among the most noteworthy phytosaurs were Rutiodon and Mystriosuchus.
Oddly enough, except for the location of their nostrils, phytosaurs looked more like modern crocodiles than the very first crocodiles did. When they first evolved, crocodiles were typically fast, terrestrial, two-legged sprinters, and some of them were vegetarians (presumably because neighboring dinosaurs were better adapted at hunting for live prey). Erpetosuchus and Doswellia are good candidates for the first true crocodiles, though the exact evolutionary relationships are still uncertain.
Later Crocodiles
By the start of the Jurassic period (about 150 million years ago), crocodiles had mostly abandoned their terrestrial lifestyles. This is when we begin to see the aquatic adaptations that characterize modern crocodiles and alligators: Long bodies, splayed limbs, and narrow, flat, tooth-studded snouts with powerful jaws (a necessary feature, since most crocodiles feasted on large dinosaurs and other animals that ventured too close to the water). There was still room for innovation, though: for example, paleontologists believe that Stomatosuchus subsisted on plankton and krill, like a sperm whale!
By about 100 million years ago, some crocodiles had begun to imitate their dinosaur cousins by growing to enormous sizes. The king of the Cretaceous crocodiles was Sarcosuchus, dubbed "SuperCroc" by the popular media, which attained sizes of about 40 feet long and 8 tons. And let's not forget the slightly smaller Deinosuchus, the "deino" in whose name connotes the same thing as the "dino" in dinosaurs: "terrible" or "fearsome."
One way in which crocodiles were indeed more fearsome than their terrestrial cousins was their ability to survive the K/T Extinction, which wiped the dinosaurs off the face of the earth 65 million years ago. Today's crocodiles and alligators are little changed from their ancient ancestors, a telling clue that these reptiles were (and remain) extremely well adapted to their environment.
Here's a list of the most notable genuses of crocodiles and phytosaurs; just click on a link for more information.
Bernissartia One of the smallest of all the Cretaceous crocodiles.
Chimaerasuchus The first vegetarian crocodile ever to be discovered.
Deinosuchus One of the biggest crocodiles of the Cretaceous period.
Desmatosuchus A crocodile-like archosaur with a fish-like head.
Doswellia This may (or may not) have been one of the earliest crocodiles.
Erpetosuchus This tiny reptile may have been the ancestor of all crocodiles.
Geosaurus This aquatic reptile may have spent its entire life in the sea.
Gracilisuchus One of the most dinosaur-like of all the Triassic crocodiles.
Metriorhynchus One of the most common crocodiles of the Jurassic period.
Mystriosuchus This Triassic archosaur looked a lot like a modern gharial.
Protosuchus This land crocodile competed for prey with early dinosaurs.
Rutiodon This crocodilian's nostrils were located on top of its head.
Sarcosuchus A Cretaceous "SuperCroc" that put modern crocodiles to shame.
Simosuchus This ancient crocodile had an unusually short skull.
Stagonolepis This crocodile-like archosaur was actually a vegetarian.
Stomatosuchus This giant crocodile fed on tiny plankton, like a baleen whale.


