Terrains form an important part of 3D city models. GIS practitioners often model terrains with 2D grids. However, TINs (Triangulated Irregular networks) are also increasingly used in practice. One such example is the 3D city model of the Netherlands (3DTOP10NL), which covers the whole country as one massive triangulation with more than one billion triangles. Due to the massive size of terrain datasets, the main issue is how to efficiently store and maintain them. The international 3D GIS standard CityGML allows us to store TINs using the Simple Feature representation. However, we argue that it is not appropriate for storing massive TINs and has limitations. We focus in this article on an improved storage representation for massive terrain models as TINs. We review different data structures for compactly representing TINs and explore how they can be implemented in CityGML as an ADE (Application Domain Extension) to efficiently store massive terrains. We model our extension using UML, and XML schemas for the extension are automatically derived from these UML models. Experiments with massive real‐world terrains show that, with this approach, we can compress CityGML files up to a factor of ~20 with one billion+ triangles, and our method has the added benefit of explicitly storing the topological relationships of a TIN model.