Skip to content
geodata.plus
Documentation

Convert GML to GeoJSON Online — Free GIS Converter

Convert GML files from WFS services and INSPIRE portals to GeoJSON for web mapping, APIs, and modern GIS tools.

Updated May 2026

GML is the standard output of government WFS services and EU INSPIRE data portals, but converting it to GeoJSON makes that data immediately usable in web mapping libraries, REST APIs, and modern geospatial tools that do not understand GML's complex XML schema.

Why convert GML to GeoJSON?

GML files downloaded from government data portals, WFS endpoints, or INSPIRE services are technically rich but practically difficult to use outside of desktop GIS software. Leaflet, Mapbox GL JS, and OpenLayers all speak GeoJSON natively — none of them parse GML without a dedicated plugin. Similarly, REST APIs built on Node.js, Python, or Go expect GeoJSON when working with geospatial data. Converting GML to GeoJSON also simplifies the coordinate handling: GeoJSON mandates WGS 84, so the reprojection from whatever national or projected CRS the GML uses is handled during conversion, giving you a clean, universally interpretable output. GitHub renders GeoJSON files as interactive maps automatically — something GML does not trigger.

Why use geodata.plus

  • Free tier includes 3 conversions per month with no account required
  • Automatic format and CRS detection — reads the srsName from the GML and reprojects accordingly
  • Reprojects to WGS 84 (EPSG:4326) by default, as required by RFC 7946, with optional custom target CRS
  • Entirely browser-based — no QGIS, GDAL, or Python environment needed
  • Encrypted upload (TLS); files stored in Cloudflare R2, automatically deleted after 2 days (free) or 7 days (Pro)
  • Handles complex GML feature schemas including GML 2, GML 3, and GML 3.2

How it works

  1. Upload your .gml file to geodata.plus
  2. geodata.plus parses the GML, reads the srsName attribute to identify the source CRS, and inspects the feature schema
  3. Select GeoJSON as the output format; geodata.plus reprojects to WGS 84 by default
  4. Download your .geojson file, ready for Leaflet, Mapbox, GitHub, or any GeoJSON-aware tool

GML format

GML (Geography Markup Language) is an OGC XML standard for encoding geographic features. It is the formal interchange format of WFS services and the encoding required by the EU INSPIRE directive. GML supports any coordinate reference system, declared via srsName attributes on geometry elements. Its feature schema is defined in companion XSD files, making GML highly expressive but also verbose and complex to parse. GML comes in several versions — GML 2, GML 3.1, and GML 3.2 — with varying levels of geometry and schema complexity. All major desktop GIS tools support GML, but web mapping libraries generally do not.

| Property | Value | |---|---| | Extension | .gml | | Type | Vector, single-file XML | | Coordinate system | Any CRS (declared via srsName) | | Geometry types | Point, LineString, Polygon, Multi- variants, complex curves/surfaces | | Common software | QGIS, ArcGIS, WFS services, EU INSPIRE portals, government systems |

GeoJSON format

GeoJSON is a JSON-based open standard (RFC 7946) for encoding geographic features. It mandates WGS 84 as the coordinate reference system for all coordinates — meaning converting from GML typically involves a reprojection step. GeoJSON is a flat, simple format: Features have a geometry (typed) and a properties object of arbitrary key-value pairs. A GeoJSON file is a single FeatureCollection containing any number of Features. Its simplicity is its strength — any JSON parser can read it, and every major web mapping and GIS tool supports it.

| Property | Value | |---|---| | Extension | .geojson or .json | | Type | Vector, single-file JSON | | Coordinate system | WGS 84 (EPSG:4326) per RFC 7946 | | Geometry types | Point, LineString, Polygon, Multi- variants, GeometryCollection | | Common software | Leaflet, Mapbox, OpenLayers, QGIS, ArcGIS, GitHub |

Frequently asked questions

My GML file uses a national CRS like ETRS89 or British National Grid. Will the coordinates be correct in the GeoJSON output? Yes. geodata.plus reads the srsName attribute from the GML geometry elements to identify the source CRS, then performs a proper coordinate transformation to WGS 84 (EPSG:4326) before writing the GeoJSON. The output coordinates will be in decimal degrees, correctly positioned on the globe.

GML features can have complex nested attributes. How does the conversion handle them? GeoJSON properties are a flat key-value structure, so nested GML feature properties are flattened during conversion. Nested element names are joined with a separator (e.g., address_street, address_city) so no attribute data is lost — it is just reorganized into a flat schema that GeoJSON can represent.

My GML file is very large and comes from a WFS service. Can geodata.plus handle it? geodata.plus processes GML files of typical sizes downloaded from WFS endpoints. For very large WFS responses, the free tier handles up to the standard upload size limit. If you are dealing with national-scale datasets, consider splitting the WFS request by bounding box before downloading, or contact geodata.plus for batch processing options.

gmlgeojsonconvertgis