Skip to content
geodata.plus
Documentation

Convert GeoPackage to FlatGeobuf Online — Free GIS Converter

Convert GeoPackage (.gpkg) to FlatGeobuf (.fgb) for cloud-native GIS, fast HTTP range queries, and high-performance geospatial APIs.

Updated May 2026

Convert GeoPackage files into FlatGeobuf — the cloud-native binary vector format with built-in spatial indexing and HTTP range-request support — for serving large datasets from object storage or powering high-throughput geospatial APIs.

Why convert GeoPackage to FlatGeobuf?

GeoPackage is excellent for local desktop use and offline workflows because it is a self-contained SQLite database with its own spatial index. But SQLite databases are not cloud-native — they cannot be efficiently queried via HTTP range requests from object storage (S3, GCS, Azure Blob) without downloading the entire file first. FlatGeobuf solves this. Its binary layout encodes an R-tree spatial index in the file header, enabling clients to retrieve only the features that intersect a given bounding box via HTTP range requests — no server-side compute required.

This makes the GPKG → FlatGeobuf conversion the natural step when you move from local QGIS analysis to cloud-native data publication: do your analysis in GPKG, then convert to FlatGeobuf for static hosting.

Why use geodata.plus

  • Free tier: convert up to 3 files per month at no cost
  • Spatial index written into the output FlatGeobuf file automatically
  • Full CRS preservation with optional reprojection to any EPSG code
  • Multi-layer GPKG: select the target layer to export
  • Browser-based — no GDAL, Python, or server infrastructure required
  • Encrypted upload (TLS); files stored in Cloudflare R2, automatically deleted after 2 days (free) or 7 days (Pro)

How it works

  1. Upload your GeoPackage file to geodata.plus
  2. geodata.plus reads the selected layer and detects the CRS
  3. Select FlatGeobuf as the output format; optionally specify a target CRS
  4. Download your .fgb file — ready for S3 hosting, GDAL pipelines, or Mapbox integration

GeoPackage format

GeoPackage is an OGC open standard based on SQLite. It is the most capable single-file vector format for desktop GIS: multi-layer, any CRS, no field name limits, SQL-queryable, and natively supported in QGIS, ArcGIS Pro, and GDAL. Its SQLite foundation makes it ideal for local analysis but a poor fit for HTTP-based cloud serving.

| Property | Value | |---|---| | Extension | .gpkg | | Type | Vector (and raster), single-file SQLite | | Coordinate system | Any CRS | | Geometry types | Point, LineString, Polygon, Multi* variants, GeometryCollection | | Common software | QGIS, ArcGIS Pro, GDAL, QField, mobile GIS |

FlatGeobuf format

FlatGeobuf is a cloud-native binary vector format using FlatBuffers encoding. The file layout places a spatial R-tree index at the beginning, enabling partial file reads via HTTP range requests. It is streamable, schema-consistent, and significantly faster to read sequentially than GeoJSON or GML of equivalent content. GDAL 3.1+ supports FlatGeobuf natively.

| Property | Value | |---|---| | Extension | .fgb | | Type | Vector, single-file binary | | Coordinate system | Any CRS | | Geometry types | Point, LineString, Polygon, Multi* variants | | Common software | GDAL, Mapbox, cloud-native GIS pipelines, web APIs |

Frequently asked questions

Why would I choose FlatGeobuf over keeping the GeoPackage for cloud hosting? SQLite (the foundation of GeoPackage) is a file-based database that requires random byte access to function correctly. Cloud object stores (S3, GCS) support HTTP range requests, but SQLite's page-based format requires many small range requests to traverse its B-tree index — making remote GPKG access slow and expensive per query. FlatGeobuf's R-tree header is designed to minimize the number of range requests needed to retrieve features in a bounding box, typically requiring just 2–4 HTTP requests regardless of dataset size.

Does converting from GeoPackage to FlatGeobuf lose any data? Attribute fields and geometry are fully preserved. CRS metadata is carried in the FlatGeobuf file header. The one significant difference is that GeoPackage supports raster tile layers and multiple vector layers in the same file — FlatGeobuf is a single-layer vector format. When converting, you select one vector layer; raster content is not convertible to FlatGeobuf.

How do I serve a FlatGeobuf file from S3 and query it from a web map? Upload the .fgb file to an S3 bucket with public read access and CORS configured to allow Range request headers. In your JavaScript application, use the flatgeobuf npm package to query the file by bounding box — the library issues the minimal HTTP range requests needed to retrieve features in the current map viewport. This pattern is used by production web maps serving datasets with millions of features from static object storage at near-zero server cost.

gpkgflatgeobufconvertgis