Compare
GeoPackage vs GeoJSON
Both represent geographic data, but GeoPackage is an SQLite-based multi-layer container, whereas GeoJSON is a JSON text format for geographic features.
Which format should you choose?
Choose GeoPackage for bundled layers, tiles, SQL queries, or offline use. Choose GeoJSON for readable feature exchange and web APIs.
Good fit for GeoPackage
Distributing and using geospatial data in one file
- Combining vector features, raster tiles, and attributes for GIS or offline use
Good fit for GeoJSON
Exchange map features and properties
- Points, lines, and polygons in web maps
Basic information
| Field | GeoPackage | GeoJSON |
|---|---|---|
| Extension | .gpkg | .geojson, .json |
| MIME type | application/geopackage+sqlite3 | application/geo+json |
| Common uses | Distributing and using geospatial data in one file | Exchange map features and properties |
| How to open | Open it in a GeoPackage-capable GIS such as QGIS and inspect its layers, coordinate reference systems, and extensions. SQLite tools may show its tables, but interpreting geometries and map tiles requires compatible software. | Open it in a GeoJSON-compatible map tool or text editor; inspect locations and geometry on a map. |
| Export or convert | You can export to GeoJSON, Shapefile, or MBTiles. The destination may not preserve every layer, attribute, coordinate reference system, or tile, so check feature counts, coordinates, attributes, and rendered maps after export. | When converting, verify coordinate order, coordinate reference system, geometry, and properties in the destination tool. |
Choose by use case
Combining vector features, raster tiles, and attributes for GIS or offline use
Distributing and using geospatial data in one file
GeoPackagePoints, lines, and polygons in web maps
Exchange map features and properties
GeoJSONKey point 1
GeoPackage follows an OGC SQLite schema and can hold vector features, raster tiles, and attribute tables; GeoJSON represents features and properties in JSON.
More on the differencesKey point 2
GeoPackage supports multiple tables and SQL access in one file; GeoJSON is readable text that is easy to pass to web maps and APIs.
More on the differencesMore on the differences
Use GeoPackage when a portable database container with multiple layers, tiles, and SQL access is useful, especially offline. Use GeoJSON when exchanging a smaller feature collection with web tools or inspecting the text directly. Check coordinate reference assumptions, extensions, and destination-tool support.
- GeoPackage is a SQLite database conforming to the OGC schema; GeoJSON uses Feature and FeatureCollection objects and the RFC's WGS 84 longitude-latitude coordinates.
- GeoPackage can bundle layers and raster tile matrices and query attributes with SQL. GeoJSON is simple to serialize and inspect but does not standardize database queries or tile pyramids.
- A SQLite file is not automatically a GeoPackage, and optional extensions may affect interoperability. GeoJSON consumers should honor the RFC coordinate order and WGS 84 assumption.
Frequently asked questions
Can GeoJSON store raster map tiles?
GeoJSON represents geographic features and properties, not a standard tile pyramid. GeoPackage has a standard option for raster tiles.
Is every SQLite database a GeoPackage?
No. It must follow the GeoPackage schema and metadata requirements; an arbitrary SQLite file is not a conforming GeoPackage.