Of all the reptiles alive today, crocodiles and alligators may be the least changed from their prehistoric ancestors of the late Cretaceous period, over 65 million years ago--although the even earlier crocodiles of the Triassic and Jurassic periods sported some distinctly un-crocodile-like features, such as bipedal postures and vegetarian diets. (See a gallery of prehistoric crocodile pictures.)
Along with pterosaurs and dinosaurs, crocodiles were an offshoot of the archosaurs, the "ruling lizards" of the early to middle Triassic period (needless to say, the earliest dinosaurs and the earliest crocodiles resembled one another a lot more than either resembled the first pterosaurs!). What distinguished crocodiles from the first dinosaurs was the shape and musculature of their jaws, which tended to be much more deadly, as well as their relatively splayed limbs (as opposed to the straight, "locked in" legs of theropod dinosaurs). It was only well into the Mesozoic Era that crocodiles evolved the three main traits with which they're associated today: stubby legs, sleek bodies, and marine lifestyles.
The First Crocodiles
Before the first true crocodiles emerged on the prehistoric scene, there were the phytosaurs ("plant lizards"): archosaurs 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 worldwide. 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 first true crocodiles did. The earliest crocodiles were small, terrestrial, two-legged sprinters, and some of them were even vegetarians (presumably because their dinosaur cousins were better adapted to hunting for live prey). Erpetosuchus and Doswellia are two leading candidates for the honorific of "first crocodile," though the exact evolutionary relationships of these early archosaurs are still uncertain. Another likely choice is the recently reclassified Xilousuchus, from early Triassic Asia, a sailed archosaur with some distinctly crocodilian characteristics.
By the start of the Jurassic period (about 200 million years ago), crocodiles had mostly abandoned their terrestrial lifestyles. This is when we begin to see the marine adaptations that characterize modern crocodiles and alligators: Long bodies, splayed limbs, and narrow, flat, tooth-studded snouts with powerful jaws (a necessary innovation, since crocodiles feasted on 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 modern grey whale.
About 100 million years ago, toward the middle of the Cretaceous period, some crocodiles had begun to imitate their dinosaur cousins by evolving to enormous sizes. The king of the Cretaceous crocodiles was the enormous Sarcosuchus, dubbed "SuperCroc" by the media, which measured about 40 feet long from head to tail and weighed in the neighborhood of 10 tons. And let's not forget the slightly smaller Deinosuchus, the "deino" in its name connoting the same concept as the "dino" in dinosaurs: "terrible" or "fearsome."
One way in which prehistoric crocodiles were indeed more impressive than their terrestrial relatives was their ability, as a group, to survive the K/T Extinction Event that wiped the dinosaurs off the face of the earth 65 million years ago (why this is so remains a mystery, though it may be an important clue that no plus-sized crocodiles survived the meteor impact). Today's crocodiles and alligators are little changed from their prehistoric ancestors, a telling clue that these reptiles were (and remain) extremely well adapted to their environment. (See this article for possible theories about why crocodiles survived into the Cenozoic Era.)
Here's a list of the most notable crocodiles and phytosaurs; just click on the links for more information.
Aegisuchus Better known as the "ShieldCroc."
Allodaposuchus This "eusuchian" prowled the rivers of southern Europe.
Araripesuchus This long-legged crocodile hunted its prey on land.
Baurusuchus A land-dwelling crocodile of Cretaceous South America.
Bernissartia One of the smallest of all the Cretaceous crocodiles.
Champsosaurus A crocodile-like reptile of the late Cretaceous period.
Chimaerasuchus The first vegetarian crocodile ever to be discovered.
Culebrasuchus This crocodile sheds light on the geography of the Americas.
Dakosaurus This fierce marine crocodile had a dinosaur-like head.
Deinosuchus One of the biggest crocodiles of the Cretaceous period.
Desmatosuchus A crocodile-like archosaur with a fish-like head.
Diplocynodon A prehistoric alligator of western Europe.
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.
Goniopholis A widespread crocodile of the late Jurassic period.
Gracilisuchus One of the most dinosaur-like of all the Triassic crocodiles.
Kaprosuchus This "BoarCroc" had some very big teeth.
Mesosuchus This "middle crocodile" was a confirmed vegetarian.
Metriorhynchus One of the most common crocodiles of the Jurassic period.
Mystriosuchus This Triassic archosaur looked a lot like a modern gharial.
Neptunidraco "Neptune's dragon" is the earliest identified metriorhynchid.
Notosuchus Did this ancient crocodile have a pig-like snout?
Pakasuchus This tiny crocodile had distinctly mammalian teeth.
Pholidosaurus This proto-crocodile is a taxonomic nightmare.
Pristichampsus A hooved crocodile of the Eocene epoch.
Protosuchus This land crocodile competed for prey with early dinosaurs.
Purussaurus A giant caiman of the Miocene epoch.
Quinkana A terrestrial crocodile from Down Under.
Rhamphosuchus Once thought to be the biggest crocodile that ever lived.
Rutiodon This crocodilian's nostrils were located on top of its head.
Saltoposuchus This "leaping crocodile" spent most of its time on two legs.
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.
Steneosaurus An ocean-going crocodile of the Mesozoic Era.
Stomatosuchus This giant crocodile fed on tiny plankton, like a baleen whale.
Terrestrisuchus Otherwise known as "the greyhound of the Triassic."
Theriosuchus This "beast crocodile" straddled the Jurassic and Cretaceous periods.
Tyrannoneustes This "tyrant swimmer" cut a very crocodilian profile.
Xilousuchus One of the earliest archosaurs in the fossil record.