.GML

GML File

Geography Markup Language
Ask a question
QUICK ANSWER

A .gml file is a Geography Markup Language file - an XML format defined by the Open Geospatial Consortium (OGC) for storing map and GIS data such as points, lines, polygons, and coordinate reference systems. Open it with the free QGIS desktop app, or read the raw XML in any text editor. The most common task is converting GML to Shapefile or GeoJSON, which QGIS and the command-line tool ogr2ogr both handle well.

Developer: Open Geospatial Consortium (OGC) Category: GIS Files Open standard MIME: application/gml+xml
OPENS ON Windows macOS Linux
Related: .GPX · .KML · .SHP · .RTMAP

On this page

19k+ extensions indexed
Last reviewed Jun 28, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the GML file format?

.gml files store data encoded in the Geography Markup Language. It is a formal language developed by the Open Geospatial Consortium (OGC), and it is based on the eXtensible Markup Language (XML). Its main purpose is to encode and transfer geographic data, including geometry, topology, and feature attributes. Rules regarding data storing within a .gml file are defined in the ISO 19136 norm (first edition 2007, second edition 2020).

Files saved in the .gml format enable exchange of data containing geographic information between different platforms and software. Because .gml is plain-text XML, every file opens with an <?xml ...?> declaration followed by GML namespace declarations - for example xmlns:gml="http://www.opengis.net/gml/3.2". Geometries such as points, lines, polygons, and solids are described using GML elements, each tied to a coordinate reference system via the srsName attribute (typically an EPSG code). GML also supports temporal objects and three-dimensional coordinates, capabilities that go beyond simpler geospatial formats such as KML or GeoJSON.

GML files can be opened, converted, and validated with tools such as QGIS, FME, and the ogr2ogr command-line utility from the GDAL library.

Security & safety

RISK: LOW

A Geography Markup Language file is plain-text XML - passive data with no executable content, so it's safe to open in a text editor or load in QGIS. The only practical caution is size: GIS GML files can be very large and slow to open in a plain editor, so use QGIS or GDAL/OGR for big datasets rather than loading the whole XML into Notepad.

Format details

in a nutshell
FULL NAMEGeography Markup Language
DEVELOPEROpen Geospatial Consortium (OGC)since 2000 (OGC); also published as ISO 19136
CATEGORYGIS Files
MIME TYPEapplication/gml+xml
TYPEXML-based geographic/GIS data (plain text)
STANDARDOpen · royalty-free
This extension is also used by…
  • GameMaker Language (GML) - Plain-text script (source code) for the GameMaker / GameMaker Studio engine, edited in the GameMaker IDE or any code editor.
  • Graphlet Graphscript - Legacy graph-drawing tool format; largely historical and rarely encountered today.

Programs that open GML files

Windows3 apps
QGIS Open-source Free GIS app. Layer > Add Vector Layer, pick the .gml to view the map data; export to other GIS formats.
FME Form (formerly FME Desktop) Paid Powerful spatial-data ETL tool; reads GML and converts it to dozens of GIS formats.
Notepad / VS Code Open-source Open the .gml as text to read the XML directly (good for small files / inspecting the schema).
macOS1 app
QGIS Open-source Free GIS app for Mac; add the .gml as a vector layer to view and convert the map data.
Linux2 apps
QGIS Open-source Add the .gml as a vector layer to view/convert; GDAL/OGR underneath handles GML.
GDAL/OGR (ogr2ogr) Open-source Command line: 'ogr2ogr -f GeoJSON out.geojson in.gml' to read and convert GML map data.

Technical details

deep spec
File typePlain-text XML
MIME typeapplication/gml+xml
Character encodingUTF-8 by default; any encoding declared in the XML prolog is valid
File signatureStarts with `<?xml` declaration; root element declares a GML namespace, e.g. `xmlns:gml="http://www.opengis.net/gml/3.2"`
ISO standardISO 19136, published in two editions (2007 and 2020); covers GML 3.2.x
Geometry typesPoint, LineString, Polygon, MultiPoint, MultiCurve, MultiSurface, Solid, and topology primitives
3D coordinate supportYes - Z values natively supported; `srsDimension` attribute on geometry elements indicates 2D or 3D
Coordinate reference systemDeclared per feature or collection via `srsName` attribute using EPSG codes or OGC URNs (e.g. `urn:ogc:def:crs:EPSG::4326`)
Topology supportYes - GML defines topology primitives: Node, Edge, Face, and TopoComplex
Application schemaDomain-specific feature types defined in user-supplied `.xsd` files that import the base GML schema
Simple Features profileSF-0, SF-1, and SF-2 profiles restrict geometry complexity for broader software interoperability
Temporal objectsBuilt-in types `gml:TimeInstant` and `gml:TimePeriod` for time-stamped and time-ranged features
CompressionNo built-in compression; commonly transferred as `.gz` streams or wrapped in a [ZIP archive](/format/zip)
Released2000 (OGC); also published as ISO 19136
Open standardYes · royalty-free
Specificationwww.ogc.org

GML conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with GML files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about GML files.

Frequently asked questions

What is a .gml file?
A Geography Markup Language file - an XML format defined by the OGC for storing geographic/map (GIS) data such as points, lines, polygons and their coordinate reference system.
How do I open a Geography Markup Language (GIS) .gml file?
Use the free QGIS: Layer > Add Vector Layer and select the .gml. You can also read the raw XML in any text editor, or process it with GDAL/OGR on the command line.
How do I convert a .gml to a Shapefile?
Load the GML in QGIS, then Export > Save Features As > ESRI Shapefile; or run 'ogr2ogr -f "ESRI Shapefile" out.shp in.gml'.
How do I convert GML to GeoJSON or KML?
Use QGIS Export, or GDAL: 'ogr2ogr -f GeoJSON out.geojson in.gml' for web maps, or 'ogr2ogr -f KML out.kml in.gml' to view in Google Earth.
Can I open a .gml without GIS software?
Yes, to read it - any text editor opens the XML. But to view the data as an actual map (and to convert it), you need QGIS or a similar GIS tool.
Why is my GML file so large / slow to open?
GML is verbose XML, so geographic datasets balloon in size. Open large files in QGIS or process them with GDAL/OGR instead of a plain text editor.

References

1OGC - Geography Markup Language (GML) standardwww.ogc.org
2QGIS - free open-source GISqgis.org

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.MDMarkdown Document
4.BINCD/DVD Disc Image (BIN/CUE)
5.NOMEDIAAndroid No-Media Marker File
6.PARTPartial Download File
7.RPMSGRestricted Permission Message
8.EXEWindows Executable (Portable Executable)
9.AVIFAV1 Image File Format (AVIF)
10.DBSQLite Database File

Related extensions

.GPXGPS Exchange Format
.KMLKeyhole Markup Language
.SHPEsri Shapefile (geospatial vector data)
.RTMAPCompeGPS / TwoNav Tiled Raster Map
.KMZKeyhole Markup Language Zipped (Google Earth)
.GDBGarmin MapSource GPS Database

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z