GPKG to GeoJSON Converter
Drop a GeoPackage file and download GeoJSON in seconds. Processed entirely in your browser using WebAssembly — your data never leaves your machine. No upload. No account. No cost.
layers found ·
Non-WGS 84 Coordinate System Detected
One or more layers use an SRS other than EPSG:4326 (WGS 84). GeoJSON coordinates will be output in the source SRS. Use GDAL to reproject: ogr2ogr -t_srs EPSG:4326 out.geojson in.gpkg
of layers selected
Converting…
/ features processed
Conversion complete
GeoJSON files ready
Coordinates are in the source CRS, not WGS 84. Reproject with GDAL if your target application expects EPSG:4326.
features
Preview first 20 lines
Conversion failed
How the Converter Works
Browser-Side Conversion Pipeline
Your file never leaves the browser. sql.js (SQLite compiled to WebAssembly) opens the GeoPackage, queries each feature layer, and a custom WKB parser converts binary geometry to GeoJSON coordinates.
GPKG Geometry Blob Structure
Every geometry in a GeoPackage is stored as a BLOB column with an 8-byte GPKG header (magic, version, flags, SRS ID) followed by an optional bounding-box envelope, then the standard OGC WKB geometry.
What Is a GeoPackage (.gpkg) File?
A GeoPackage is an OGC-standard, SQLite-based geospatial container that stores vector features, raster tiles, attribute tables, and coordinate reference metadata in a single portable file. Standardised in 2014 (OGC 12-128), GeoPackage has replaced Shapefile as the default exchange format in most GIS workflows because it supports multiple geometry types, eliminates the three-file (.shp/.dbf/.shx) overhead, and lifts the 2 GB Shapefile size limit.
GeoJSON (RFC 7946) is the web-native counterpart: a human-readable JSON format that every modern mapping library — Leaflet, Mapbox GL JS, deck.gl, Google Maps — accepts without a plugin. Converting from GPKG to GeoJSON is the final step before publishing spatial data on the web or loading it into a NoSQL/document database.
This converter reads your GeoPackage entirely in the browser using sql.js (SQLite compiled to WebAssembly) and a hand-written WKB binary parser that handles all geometry types defined in the ISO 19125 and OGC WKB specifications — including Z, M, and ZM coordinate variants.
Format Comparison: GeoPackage, GeoJSON, Shapefile, and KML
| Feature | GeoPackage | GeoJSON | Shapefile | KML |
|---|---|---|---|---|
| Format | Binary (SQLite) | Text (JSON) | Binary | Text (XML) |
| Multi-layer | Yes | No | No | Yes |
| Any SRS | Yes | WGS 84 only | Yes | WGS 84 only |
| Column name length | Unlimited | Unlimited | 10 chars | Unlimited |
| File count | Single file | Single file | 3–6 files | Single file |
| Web-native | No | Yes | No | Partial |
| OGC standard | Yes | Yes (RFC 7946) | No (ESRI) | Yes (OGC KML) |
Convert GPKG to GeoJSON with GDAL and Python
For files larger than 1 GB, automated pipelines, or server-side workflows, use GDAL's ogr2ogr utility or the fiona Python library. Both are free, open-source, and support all geometry types and coordinate systems.
| Task | Command / Code |
|---|---|
| All layers | ogr2ogr -f GeoJSON output.geojson input.gpkg |
| One layer | ogr2ogr -f GeoJSON output.geojson input.gpkg layer_name |
| Reproject to WGS 84 | ogr2ogr -f GeoJSON -t_srs EPSG:4326 output.geojson input.gpkg |
| Python (Fiona) | import fiona, json with fiona.open("input.gpkg") as src: fc = dict(type="FeatureCollection", features=list(src)) print(json.dumps(fc)) |
| GeoPandas | import geopandas as gpd gdf = gpd.read_file("input.gpkg") gdf.to_file("output.geojson", driver="GeoJSON") |
Frequently Asked Questions
What is a GeoPackage file and why is it used in GIS?
A GeoPackage (.gpkg) is an OGC standard (12-128r6) for encoding geospatial information in a SQLite database. It was designed to overcome the limitations of Shapefile — no 10-character column name limit, no 2 GB file size cap, multi-layer support, and a single portable file. QGIS, ArcGIS Pro, PostGIS, GDAL, and most modern GIS tools support GeoPackage natively. It is particularly common in offline and mobile GIS applications where a self-contained, cross-platform format is needed.
How does this converter work without uploading my file?
When you drop a .gpkg file, the browser reads it using the FileReader API directly into memory. A small WebAssembly build of SQLite called sql.js opens the database and queries the geometry layers. A custom JavaScript WKB parser reads the raw binary geometry blobs and converts each vertex to GeoJSON-style [longitude, latitude] coordinate arrays. The result is serialised to a JSON string and offered as a download — entirely without a network request.
What geometry types are supported?
All seven base geometry types from the OGC WKB specification are supported: Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, and GeometryCollection. Z (3D), M (measured), and ZM coordinate variants (WKB type codes 1001–3007) are also handled — the extra coordinates are silently dropped since GeoJSON only supports 2D or 3D (longitude, latitude, altitude). Null geometries (features with no spatial data) are output as "geometry": null, which is valid GeoJSON.
My GPKG uses a projected coordinate system — will the GeoJSON be correct?
RFC 7946 (the GeoJSON standard) requires coordinates to be in WGS 84 geographic coordinates (EPSG:4326), expressed as [longitude, latitude] decimal degrees. This converter outputs coordinates exactly as they are stored in the GPKG — it does not reproject. If your source data is in a projected CRS such as UTM or a national grid, the resulting GeoJSON will contain metre-based easting/northing values that most web mapping libraries will misplace. Use ogr2ogr -t_srs EPSG:4326 to reproject before or after conversion.
How large a GeoPackage can I convert in the browser?
In practice, files under 200 MB convert quickly (under 30 seconds on a modern laptop). Files from 200 MB to 500 MB work but may take a minute and consume significant RAM. Files above 500 MB risk running into browser memory limits, especially on devices with 4–8 GB RAM. The converter hard-limits at 1 GB. For larger files, use GDAL (ogr2ogr), which processes data in streaming chunks without loading the entire database into memory. The converter yields to the browser's rendering thread every 500 rows to keep the UI responsive during long conversions.
Can I convert multiple layers from one GeoPackage at once?
Yes. After the converter detects all feature layers in the GeoPackage (by querying the gpkg_geometry_columns system table), you can select which layers to include before clicking Convert. Each selected layer produces a separate .geojson file — one download per layer. A "Download All" button appears for multi-layer results. Note that raster tile layers are not supported; only vector feature layers are converted.
Related GIS Calculators
EPSG Code Lookup
Find CRS definitions, PROJ strings, and WKT by EPSG code
WGS 84 to UTM Converter
Convert latitude/longitude to UTM easting, northing, and zone
UTM Zone Finder
Find the UTM zone and EPSG code for any lat/lon point
Coordinate Converter
Convert between DD, DMS, UTM, and MGRS formats
Distance & Bearing Calculator
Great-circle distance and bearing between two coordinates
MGRS Bulk Converter
Batch convert MGRS coordinates to latitude/longitude