Brain endocasts obtained from computed tomography (CT) are now widely used in the field of comparative neuroanatomy. They provide an overview of the morphology of the brain and associated tissues located in the cranial cavity. Through anatomical comparisons between species, insights on the senses, the behavior, and the lifestyle can be gained. Although there are many studies dealing with mammal and bird endocasts, those performed on the brain endocasts of squamates are comparatively rare, thus limiting our understanding of their morphological variability and interpretations. Here, we provide the first comparative study of snake brain endocasts in order to bring new information about the morphology of these structures. Additionally, we test if the snake brain endocast encompasses a phylogenetic and/or an ecological signal. For this purpose, the digital endocasts of 45 snake specimens, including a wide diversity in terms of phylogeny and ecology, were digitized using CT, and compared both qualitatively and quantitatively. Snake endocasts exhibit a great variability. The different methods performed from descriptive characters, linear measurements and the outline curves provided complementary information. All these methods have shown that the shape of the snake brain endocast contains, as in mammals and birds, a phylogenetic signal but also an ecological one. Although phylogenetically related taxa share several similarities between each other, the brain endocast morphology reflects some notable ecological trends: e.g. (i) fossorial species possess both reduced optic tectum and pituitary gland; (ii) both fossorial and marine species have cerebral hemispheres poorly developed laterally; (iii) cerebral hemispheres and optic tectum are more developed in arboreal and terrestrial species.