
How to Export GIS Data to GeoPackage or CSV
What you'll learn
- The basics of the export feature in QGIS
- Steps for converting your data to other file formats such as GeoPackage
Recommended for
- Anyone who wants to save a temporary scratch layer as a vector layer
- Anyone who wants to convert a Shapefile to a modern format such as GeoPackage
- Anyone who wants to export attribute table data as CSV and use it in Excel
Introduction
In QGIS, you often need to save a layer you created temporarily or convert it to a different file format. The export feature helps in exactly these situations. With it, you can save a layer you are working on as a file, or convert it to another format and output it.
This article covers the basics of “Save As” and some practical use cases.
What is the export feature?
The export feature saves a QGIS layer in a variety of formats. Because you can choose the destination and file format freely, it is useful in cases like these:
- Save a temporary scratch layer created during your work to a file
- Convert a layer to a different file format (for example, from Shapefile to GeoPackage)
- Save an edited or filtered layer
- Output a layer's attributes as CSV to analyze them in Excel
- Convert a layer to a different coordinate reference system (CRS)
Export steps
This section walks through the steps. As an example, convert a .shp Shapefile to a layer in GeoPackage format, the standard file format of QGIS.
To learn more about GeoPackage, see the article below.
First, in the Layers panel, right-click the layer you want to save and click Export → Save Features As.

The Save Vector Layer as dialog opens. Use it to set the output file format, the save path, the file name, and more.
The following settings convert the Shapefile to GeoPackage format.
- Format: Select the file format to convert to. Here, click ESRI Shapefile and select GeoPackage from the list.
- File name: Specify where to save the file. Here, click the ... button and specify the file name and location.
- Layer name: Appears when you select GeoPackage as the format. Enter a layer name as needed.
That completes the basic settings. Click the OK button at the lower right.

When processing finishes, the saved file appears as a layer in the Layers panel. If Add saved file to map is checked in the export dialog, QGIS adds the layer automatically.

A message bar also appears at the top of the map canvas and shows the save path under Layer Exported. Click the path, and you can see the GeoPackage file in the location you specified.

Export steps by use case
Save a temporary scratch layer
When you create a layer without specifying a save location, such as with a Processing tool, QGIS keeps it in memory as a “temporary scratch layer.”

These layers are lost when you close QGIS, so you need to save any data you want to keep.

If you want to keep a temporary scratch layer, save it to a file format such as GeoPackage with the same steps as above.
Convert the CRS
QGIS supports many CRSs, and converting between them is easy too. To convert the CRS, set the target CRS in CRS in the export dialog.

For how QGIS handles coordinate reference systems, see the article below.
Export the attribute table as CSV
When you work with vector data in QGIS, you may want to analyze the attribute table in spreadsheet software such as Excel or create charts from it. In that case, select Comma Separated Value [CSV] as the format when you export.

Open the exported CSV file in Excel, and you can see that it contains the contents of the original attribute table.

Convert CSV data to a vector layer
In QGIS, you can add tabular data, such as a CSV file with latitude and longitude values, to the map. You can display and make simple edits to the data as CSV, but it is more efficient to convert it to a vector data format.
For how to add CSV data to QGIS and convert it to a vector data format such as Shapefile, see the article below.
Create a layer from selected features only
You can create a layer from only specific features of a vector layer.
First, select the features you want in the new layer.

When the selection is done, right-click the layer in the Layers panel and click Export. Save Selected Features As becomes available, so click it.

Next, confirm that Save only selected features is checked. The rest of the export is the same as usual, so specify the save location and other settings and export.

When processing finishes, the selected features are added as a new layer.

Export options
You can set many other options when you export.
The main options are as follows.
- Encoding: Save the file with the character encoding you specify.
- Save only selected features: Export only the selected features.
- Select fields to export and their export options: Export only some columns of the attribute table, or change the column names in the export.
- Persist layer metadata: Save a copy of any layer metadata on the source layer.
- Geometry: Configure the geometry capabilities of the output layer.
- Extent: Use the extent selector to limit the exported data to only part of the layer.

Conclusion
The export feature in QGIS is very useful for saving layers permanently and converting file formats. Saving temporary scratch layers and converting formats in particular come up often in daily work. Even QGIS beginners can work far more efficiently by knowing this feature. Put it to use.


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.


