
Create and Convert Data with GeoPackage
What you'll learn
- The features of the GeoPackage format and how to use it
- How to create a new GeoPackage
- Steps for converting existing data to GeoPackage
Recommended for
- Anyone who wants to manage data efficiently in QGIS
- Anyone who wants to handle multiple layers in a single file
Introduction
GeoPackage is a file format for vector data. In QGIS, GeoPackage has been the default file format since the QGIS 3 series. It is a newer data format that fixes the shortcomings of Shapefile: for example, it can store multiple layers in a single file and handle large datasets.
This article explains how to use GeoPackage in QGIS and what makes it convenient.
What is GeoPackage?
GeoPackage (GPKG) is a format for storing geospatial data, built on SQLite, a database management system. It is a standard format developed by the Open Geospatial Consortium (OGC), and a versatile one designed specifically for GIS and geographic data.
The official GeoPackage website, run by the OGC, collects the latest news, guidance, and frequently asked questions.

GeoPackage has the following main advantages.
Combine multiple layers in one file
GeoPackage can store vector and raster data together in a single file. This makes it easy to organize project data and cuts down the work of managing many files.
GeoPackage can also save the style information you set in QGIS (symbols, labels, and so on). When you share the data with other users or environments, the layers keep the same look.
Handle large datasets
Compared with other file formats, GeoPackage can handle large amounts of geographic data. It can store data on the scale of several gigabytes, so it works well for large projects too.
High compatibility
GeoPackage follows the OGC standard, so many GIS applications, including QGIS, can read it. This makes it easy to exchange data between different systems.
Create a layer using GeoPackage
This section shows how to create a new layer in GeoPackage format.
Create a GeoPackage file
From the menu bar, choose Layer → Create Layer → New GeoPackage Layer.

The New GeoPackage Layer dialog opens. Use the top of the dialog to set basic items such as the save location and geometry type. The database and the table name are separate items here. A GeoPackage can hold multiple layers, so it helps to think of the database as a folder name and the table name as the layer name.
This example creates a GeoPackage file named data.gpkg and a point layer named point inside it. For the layer's coordinate reference system (CRS), select EPSG:4326 - WGS 84, a latitude and longitude CRS.
- Click the ... button and specify the save location and file name for the GeoPackage.
- Enter the table name. QGIS fills in the file name you entered, but enter a name that suits the layer.
- Select the geometry type. Here, select Point.
- Select the CRS of the layer. Click the globe button and choose the CRS.

This example creates a point layer. To create a line layer, select LineString. To create a polygon layer, select Polygon.

Next, set up the attribute data under New Field. You can add attributes later, but if you already know which ones you need, it is a good idea to set them here. This example adds a text attribute named name.
- Enter the field name.
- Select a suitable data type.
- Click Add to Fields List.
- The attribute appears in the Fields List with the settings you entered.

When all the settings are done, click OK.

The GeoPackage file is created in the location you specified.

The layer is also added to QGIS.

The point layer you just created is empty, so its attribute table does not contain any features yet.

Create features
Creating features is covered in a separate article, so this section gives only a brief overview of the steps for adding points to the point layer.
- In the Layers panel, select the layer you want to create features in.
- Click the Toggle Editing button.
- Click the Add Point Feature button.

After these steps, the cursor on the map canvas changes to a crosshair. Click on the map canvas in this state to create a point.
- Click where you want to create the feature.
- A dialog for entering attribute values opens. Enter the values as needed and click the OK button.
- The point is created.

When you finish editing, click the Save Layer Edits button to finalize your edits.

Convert existing vector data to GeoPackage
You can easily convert vector layers in QGIS, such as Shapefile layers, to GeoPackage.
Convert with the export function
Normally, you convert a data format with the export function.
In the Layers panel, right-click the layer you want to convert to GeoPackage, then click Export → Save Features As.

The Save Vector Layer as dialog opens. This example adds the 世界地図 (world map) vector layer to the data.gpkg file created above.
- For Format, select GeoPackage.
- Click the ... button to the right of File name and specify the save location and file name for the GeoPackage. This example selects an existing GeoPackage, but you can also create a new one.
- Enter the layer name.
- Click the OK button.

QGIS adds the converted layer data_世界地図. Check that the conversion worked: right-click the layer in the Layers panel, open the layer properties, and click the Information tab.
The source shows that the layer was added to data.gpkg.

Convert from the Browser panel
Next, here is how to convert a layer from the Browser panel. First, connect to an existing GeoPackage in the Browser panel.
In the Browser panel, right-click GeoPackage and click New Connection.

The Open GeoPackage dialog opens. Select an existing GeoPackage and click Open.

In the Browser panel, data.gpkg now appears under GeoPackage. If you expand data.gpkg, you can also see the layers stored in this GeoPackage.

With the connection in place, converting to GeoPackage is easy. Drag the layer you want to convert from the Layers panel and drop it onto data.gpkg in the Browser panel.
The world map layer is now added to data.gpkg.

To add the converted GeoPackage layer to QGIS, right-click the layer and click Add Layer to Project, or drag and drop the layer onto the map canvas.

Conclusion
GeoPackage is a very convenient format for managing and sharing data in QGIS. Compared with Shapefile, it offers many advantages, such as combining multiple layers in one file and handling large datasets. Try GeoPackage to make your work in QGIS smoother.


QGIS LAB is a comprehensive information hub for QGIS, the open-source GIS software. Under the concept of “Geospatial for Greater Good,” we share the knowledge and skills to open up the world through location data.


