Free · No signup · GDAL-powered

Convert GeoPackage to GeoJSON Online — Free & Instant

GeoJSON is the format of choice for web mapping, GitHub spatial data previews, and JavaScript libraries like Leaflet, Mapbox GL JS, and deck.gl. If your data lives in a GeoPackage — the format QGIS and ArcGIS Pro use for local storage — you need to convert it to GeoJSON before it can be used in a browser. Maparz extracts the first vector layer from your .gpkg file and converts it to a GeoJSON FeatureCollection, automatically reprojecting to WGS 84 (EPSG:4326) as required by the GeoJSON specification (RFC 7946). All attribute columns are preserved as GeoJSON properties. The conversion is powered by GDAL 3.8, the same engine used by QGIS, ArcGIS, and PostGIS, ensuring geometry accuracy and full attribute fidelity.

File converter

When to convert GeoPackage to GeoJSON

  • Exporting a QGIS project layer from GeoPackage to GeoJSON for a web map
  • Converting GPKG data for use with Leaflet, Mapbox GL JS, or deck.gl
  • Sharing GeoPackage layers with web developers who work only with GeoJSON
  • Publishing GeoPackage datasets on GitHub with automatic map preview rendering
  • Converting ArcGIS Pro GeoPackage exports for use in open-source web tools

How to convert GeoPackage to GeoJSON

  1. 1

    Upload your GPKG

    Drop your .gpkg file on the upload zone. The file can be up to 50 MB.

  2. 2

    Select GeoJSON

    GeoJSON is pre-selected for this page. Click Convert file.

  3. 3

    Download the GeoJSON

    The output FeatureCollection contains all features from the first vector layer in your GeoPackage, reprojected to WGS 84.

  4. 4

    Use in your application

    Load the .geojson directly into Leaflet (L.geoJSON()), Mapbox GL JS (map.addSource()), or drag it into geojson.io for a quick preview.

About GeoPackage

GeoPackage (GPKG) is a modern, open standard format defined by the OGC that stores geospatial data in a single SQLite database file. It supports both vector and raster data, multiple layers per file, field name lengths up to 64 characters, and virtually any coordinate reference system. GeoPackage is endorsed by the OGC as the preferred replacement for Shapefile. It is supported by QGIS, ArcGIS Pro, GDAL, and PostGIS. Its SQLite base makes it portable and queryable without a server.

Strengths

  • +Single file containing multiple layers
  • +No field name length limit
  • +Supports vector and raster in one file
  • +SQLite-based — portable and queryable

About GeoJSON

GeoJSON is an open standard geospatial data format based on JSON, defined in RFC 7946. It supports all geometry types (Point, LineString, Polygon, MultiPolygon, etc.) and arbitrary properties per feature. GeoJSON is the preferred format for web mapping because browsers can parse it natively and libraries like Leaflet, Mapbox GL, and D3 consume it directly. GitHub renders GeoJSON files on a map automatically. It uses WGS 84 (EPSG:4326) as its coordinate reference system.

Strengths

  • +Native browser support (JSON)
  • +Human-readable and editable
  • +Single file — easy to share
  • +First-class support in web mapping libraries

Frequently asked questions

Q.What if my GeoPackage has multiple layers?

Maparz converts the first vector layer it finds in the GeoPackage. GeoPackage files from QGIS often contain many layers — the first one alphabetically or by creation order is selected. If you need to convert a specific layer, use GDAL locally: ogr2ogr -f GeoJSON output.geojson input.gpkg 'layer_name' — substituting the actual layer name, which you can find by running ogrinfo input.gpkg.

Q.Is my data reprojected when converting GPKG to GeoJSON?

Yes, always. The GeoJSON specification (RFC 7946, published by the IETF) requires all coordinates to use WGS 84 (EPSG:4326). Maparz uses GDAL to reproject your GeoPackage layer from whatever CRS it uses — British National Grid, UTM, or any other — to WGS 84 during the conversion. The reprojection is performed using the PROJ library and is lossless for vector geometry.

Q.How large can the GeoPackage be?

Files up to 50 MB are supported. A 50 MB GeoPackage typically contains tens of thousands of polygon features or hundreds of thousands of point features. For larger datasets, consider splitting the layer in QGIS before uploading, or use GDAL locally where there is no file size limit: ogr2ogr -f GeoJSON output.geojson input.gpkg

Q.Will the GeoJSON work on GitHub for map preview?

Yes, if the GeoJSON is under 10 MB (GitHub's limit for automatic rendering). GitHub renders GeoJSON files as interactive maps automatically when you view them in a repository. The output from Maparz uses RFC 7946-compliant formatting which GitHub's renderer requires. For files larger than 10 MB on GitHub, consider simplifying the geometry or converting to a tiled format instead.

Related conversions