GML to GeoJSON Converter

The most common reason you'd want this: you've downloaded a dataset from an INSPIRE portal and need to render it in Mapbox / Leaflet / d3.

Convert GML to GeoJSON now

Common issues converting GML to GeoJSON

Frequently asked questions

Does the converter handle GML 3 posList?

Yes. Both <gml:coordinates>x,y x,y</gml:coordinates> and <gml:posList>x y x y</gml:posList> patterns are parsed, with sensible 2D defaults when dimension is ambiguous.

What about MultiSurface / MultiCurve in GML 3?

Currently only the base geometries (Point, LineString, Polygon) are extracted. MultiSurface decomposes to its first member polygon. For full GML 3 multi-geometry support, post-process.

Will it work on a WFS getFeature response?

Yes — WFS GetFeature returns <wfs:FeatureCollection> wrapping <gml:featureMember> entries, which is what our parser walks. Different prefix namespaces are matched permissively.

Is it safe to point this at user-uploaded GML?

Yes — DOCTYPE blocks are stripped pre-parse to neutralise XXE, and regex-based extraction means no XML entity expansion can run.

Related conversions