What is the GPKG file format?
The .gpkg extension identifies an OGC GeoPackage file - a modern, self-contained SQLite 3 database container for geospatial data. Developed by the Open Geospatial Consortium (OGC), the format packages vector feature layers, raster tile pyramids, coordinate reference systems, and metadata into a single portable file with no companion files required.
Because a .gpkg is a plain SQLite 3 database, it opens with the standard 16-byte SQLite format 3 magic header. GeoPackage stamps the SQLite application_id field to 0x47504B47 (ASCII "GPKG") and sets user_version to the spec revision - for example 10400 for GeoPackage 1.4. A set of required gpkg_* system tables - including gpkg_contents and gpkg_spatial_ref_sys - must be present for a file to be a valid GeoPackage.
A single .gpkg file can hold:
- Vector feature tables, with geometry encoded as GeoPackageBinary (
GP) BLOBs - Raster tile-pyramid tables storing tiles as PNG, JPEG, or WebP image blobs
- Spatial reference system definitions (EPSG codes and WKT)
- Attribute-only (non-spatial) data tables
GeoPackage is the practical open replacement for the multi-file Esri Shapefile: one .gpkg replaces the .shp / .dbf / .prj bundle and removes the 2 GB file-size cap, the 10-character field-name limit, and other legacy constraints. File sizes range from tens of kilobytes to many gigabytes depending on dataset extent and tile pyramid depth. Standard SQLite tools such as DB Browser for SQLite can open a .gpkg for inspection, though GIS software is needed to correctly interpret the geometry.
Security & safety
RISK: LOWA GeoPackage is a SQLite data file, not an executable, so opening one is low risk. The main caveats are generic: a SQLite database can be large, and malformed/corrupt files can crash a tool - run PRAGMA integrity_check if in doubt. Don't confuse it with the Gramps .gpkg (a different format). Obtain data from reputable GIS sources; the data itself doesn't run code.
Format details
in a nutshell- Gramps genealogy package - Gramps (genealogy software) exports a .gpkg as a GZIP-compressed package bundling a family-tree XML with its media files - unrelated to GIS (db's original label).
- Generic GPK/package data - A few games/apps use .gpkg for their own packed resources; niche and unrelated to GeoPackage.
Programs that open GPKG files
Technical details
deep spec| Container format | SQLite 3 single-file database |
| MIME type | application/geopackage+sqlite3 |
| Magic bytes | 16-byte SQLite 3 header: 53 51 4C 69 74 65 20 66 6F 72 6D 61 74 20 33 00 ("SQLite format 3\000") |
| Application ID | 0x47504B47 (ASCII "GPKG") stored in the SQLite application_id header field |
| Version field | user_version in SQLite header encodes the spec version (e.g. 10400 = GeoPackage 1.4) |
| Byte order | Little-endian (SQLite default) |
| Encoding | Binary |
| Vector geometry encoding | GeoPackageBinary (GP) BLOB - ISO WKB geometry with an 8-byte envelope prefix |
| Raster tile storage | PNG, JPEG, or WebP blobs in tile-pyramid tables; tiles are pre-compressed at image level |
| Required system tables | gpkg_contents, gpkg_spatial_ref_sys, gpkg_geometry_columns, gpkg_tile_matrix_set, gpkg_tile_matrix |
| Coordinate reference systems | Defined in gpkg_spatial_ref_sys; any CRS expressible via EPSG code and WKT is supported |
| Compression | None at the database level; raster tile blobs carry their own image compression (PNG/JPEG/WebP) |
| Encryption | Not defined in the standard; optional via third-party SQLite extensions (e.g. SQLCipher) - non-standard |
| File size range | Tens of kilobytes to many gigabytes; SQLite maximum is approximately 281 TB |
| Platform support | Windows, macOS, Linux, Android, iOS |
| Integrity verification | PRAGMA integrity_check (SQLite page-level); no built-in spatial-level checksum |
| Released | 2014 (OGC GeoPackage 1.0) |
| Latest version | OGC GeoPackage 1.4 (2024) |
| Open standard | Yes · royalty-free |
| Specification | www.geopackage.org |
GPKG conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about GPKG files.