SHP GML
File conversion

Convert SHP to GML

QUICK ANSWER
Is it possible to convert SHP to GML?
Yes - SHP converts to GML.

ogr2ogr is the fastest path - one terminal command converts the file in seconds. QGIS offers the same result with no command line. GML output also includes a companion .xsd schema file; keep both files together as some systems require them.

1 programs
Also to GML: OSM

On this page

Tested on macOS, Windows & Linux
Last verified Oct 2026

More free converters

HEIC, PNG, WEBP, MP3 and more - every tool here is free.

Open the toolbox

Why convert SHP to GML?

GML (Geography Markup Language, OGC standard published 2000, also ISO 19136) is an XML-based format required by INSPIRE-compliant data submissions in Europe and accepted by government portals and spatial databases that mandate OGC formats. Converting from Shapefile to .gml is common for interoperability with such systems.

How to convert SHP to GML

QGIS FREE

Add the Shapefile as a vector layer, right-click it in the Layers panel, choose Export > Save Features As, and set the format to GML.

ogr2ogr OPEN-SOURCE

Run ogr2ogr -f GML out.gml in.shp; add -t_srs EPSG:4326 to reproject to WGS 84 if the target system requires latitude/longitude.

Programs that convert SHP

MyGeodata Cloud

About these formats

Quality & what to watch

  • Both QGIS and ogr2ogr produce a companion .xsd schema file alongside the .gml; some systems require both files - do not delete the .xsd.
  • GML is XML and the output file can be significantly larger than the source Shapefile - sometimes 10x for large datasets; GeoJSON is a more compact alternative for web use.
  • The .prj sibling file must be present for the coordinate reference system to transfer correctly; without it, the GML will have no spatial reference defined.

Frequently asked questions

Do I need all the Shapefile sibling files for the conversion?
Yes - at minimum .shp, .shx, and .dbf are required; without .dbf the output GML will have no attributes, and without .prj the coordinate system will be undefined.
Will the conversion satisfy INSPIRE GML requirements?
A basic ogr2ogr conversion produces plain GML; INSPIRE submissions require specific application schemas (e.g., GML 3.2.1 with defined namespaces) and may need additional options or post-processing.
Can I reproject the Shapefile to WGS 84 during conversion?
Yes - add -t_srs EPSG:4326 to the ogr2ogr command, or set the target CRS in QGIS before exporting.