At least 26 species of crocodylian populate the globe today, but this richness represents a minute fraction of the diversity and disparity of Crocodyliformes. Fossil forms are far more varied, spanning from erect, fully terrestrial species to flippered, fully marine species. To quantify the influence of a marine habitat on the directionality, rate, and variance of evolution of body size in Crocodyliformes and thereby identify underlying selective pressures, we compiled a database of body sizes for 264 fossil and modern species of crocodyliform covering terrestrial, semi‐aquatic, and marine habitats. We find increases in body size coupled with increases in strength of selection and decreases in variance following invasions of marine habitats but not of semiaquatic habitats. A model combining constraints from thermoregulation and lung capacity provides a physiological explanation for the larger minimum and average sizes of marine species. It appears that constraints on maximum size are shared across Crocodyliformes, perhaps through factors such as the allometric scaling of feeding rate versus basal metabolism with body size. These findings suggest that broad‐scale patterns of body size evolution and the shapes of body size distributions within higher taxa are often determined more by physiological constraints than by ecological interactions or environmental fluctuations.