Convert GeoJSON to GeoPackage

This converter turns one or more GeoJSON files into a single GeoPackage (.gpkg) for QGIS or ArcGIS Pro: each file becomes its own layer with typed fields, a coordinate system and a spatial index. The files are converted in your browser and are not uploaded. A file that mixes points, lines and polygons is split into one layer per geometry type, nested values are stored as JSON text, and a GeoJSON in another coordinate system keeps that system unless you choose another.

Did a file not convert correctly? E-mail [email protected], ideally with a small sample file, and it will be fixed.

Key facts

GeoJSON to GeoPackage: why convert

GeoJSON is what web maps, APIs, geojson.io and scripts hand out, but in a GIS project it is a slow, plain text format: no spatial index, every number stored as text, and one file per layer. GeoPackage, the default format of QGIS and an OGC standard that ArcGIS Pro also reads and edits, keeps any number of layers in one SQLite file with real field types and an index, so large layers draw and filter quickly. This page writes the GeoPackage from your GeoJSON with GDAL, the open-source library behind QGIS, directly in your browser. Drop several GeoJSON files at once and they become layers in the same .gpkg, named after the files, which is a tidy way to hand over a whole dataset as one file.

How to convert GeoJSON to GeoPackage

  1. Drop one or more .geojson or .json files in the box, or click to choose them.
  2. Check the layers on the map. Optionally choose an output coordinate system.
  3. Click Convert to GeoPackage and open the .gpkg in QGIS or ArcGIS Pro.

What changes when you convert

Mixed points, lines and polygons

A GeoJSON FeatureCollection may mix geometry types, but QGIS styles and edits a layer best when it has one type. A file with mixed types therefore becomes one layer per type, such as parks_points and parks_polygons, with the same fields. Lines and polygons are stored as multi-part types (MultiLineString, MultiPolygon), so single and multi-part shapes fit in the same layer, and heights (Z) are kept. Geometry collections and features without geometry go into a layer ending in _other instead of being dropped.

Field types

GDAL reads the type of each property from the values: whole numbers become integer fields, numbers with decimals real fields, true/false booleans, and values such as 2024-05-01 date fields. A property that mixes numbers and text becomes a text field. Nested objects and arrays, common in API responses, are stored as JSON text, which QGIS shows as it is.

Coordinate system

GeoJSON after RFC 7946 is always longitude and latitude on WGS84, and the GeoPackage gets EPSG:4326. A file written before RFC 7946 with a "crs" member (a national grid, for example) keeps that system. A file without "crs" whose coordinates are clearly meters, such as an export from a projected QGIS project, is not taken as WGS84: the page asks for its coordinate system and suggests the ones that fit. Enter an output system to reproject the layers while converting.

Invalid geometries

Polygons with self-intersections, common in data drawn by hand, are repaired with GDAL's makevalid while converting, so QGIS and databases accept them. Valid shapes are written unchanged.

About the formats

GeoJSON

GeoJSON is a plain-text JSON format for geographic features, standardized as RFC 7946 in 2016. It is the native format of web maps such as Leaflet, MapLibre and Mapbox, and of many APIs.

  • Coordinates are WGS84 longitude, latitude (in that order).
  • Points, lines and polygons can be mixed in one file.
  • Properties can be any JSON value, with no limit on field name length.

GeoPackage

GeoPackage is an open OGC standard from 2014 built on SQLite. It is the default format in QGIS and can hold many layers, any coordinate system and long field names in a single file.

  • One file can contain many vector layers and tables, and raster tiles.
  • No 10-character limit on field names, unlike shapefiles.
  • Stores the coordinate system of each layer inside the file, so there is no separate .prj.
  • Has no 2 GB size limit per layer, unlike the .shp and .dbf files of a shapefile.

Frequently asked questions

Can I put several GeoJSON files in one GeoPackage?

Yes. Choose or drop all the files at once. Each file becomes its own layer in the same .gpkg, named after the file.

Why convert GeoJSON to GeoPackage for QGIS?

QGIS opens GeoJSON, but it has to read the whole text file and has no spatial index. A GeoPackage opens quickly, can be edited safely, keeps field types and several layers in one file, and is QGIS's own default format.

Can ArcGIS Pro open the GeoPackage?

Yes. ArcGIS Pro reads and edits GeoPackages directly; add the .gpkg in the Catalog pane and drag a layer onto the map.

Is my GeoJSON uploaded?

No. GDAL runs in your browser as WebAssembly, and the GeoPackage is written on your own computer.

Can I convert the GeoPackage back?

Yes. The GeoPackage viewer shows the layers on a map and their attribute tables, and the GeoPackage to shapefile converter writes each layer as a shapefile.