What Is GML? Geography Markup Language Explained
Learn what GML is, why it’s used in GIS and OGC services, and how to open or convert GML files online in your browser.
GML (Geography Markup Language) is an OGC standard that encodes geographic features in XML. It’s common in government datasets, spatial data infrastructures, and OGC web services such as WFS, where interoperability and schema-based validation matter.
If you just need to inspect a dataset quickly, you can open it directly in the browser with the GML viewer at /open-gml-online/.
What GML contains
A typical GML dataset describes features (real-world objects) and includes:
- Geometry (points, lines, polygons, and more complex types)
- Attributes (properties like names, IDs, classifications)
- Coordinate reference system information (often via
srsName)
Because it’s XML and can be schema-rich, GML files are often larger and more complex than lightweight web formats like GeoJSON.
When GML is a good choice
GML is often used when:
- You receive data from standards-based GIS platforms
- You need schema-based structure for complex feature models
- You work with OGC services that emit GML
Common issues when opening GML
- Big file sizes: XML can be verbose; large feature collections may be slow.
- CRS confusion: a missing or incorrect CRS can place data in the wrong location.
- Multiple namespaces / application schemas: some datasets reference external schema definitions.
How to open a GML file online
- Go to the GML viewer: /open-gml-online/
- Upload your
.gml(or.xmlif it’s GML content). - Inspect features and attributes in the map and data panels.
Convert GML to web-friendly formats
If you want to use the data in web maps or APIs, GeoJSON is a common target:
- Convert GML to GeoJSON: /gml-to-geojson/
- Convert GML to GeoPackage: /gml-to-gpkg/
Related reading
- Compare formats: /blog/gml-vs-geojson/