QGIS Project file

HomeGlossary
QGIS Project file

A QGIS project file is the file QGIS uses to save a mapping session: which layers are loaded, where their data comes from, how they are styled and how they are configured. It is a recipe for a map rather than the map's data itself.

Opening a project file restores the same view, styles, forms and layouts every time, on any machine that can reach the same data.

Try Mergin Maps for free

Easy to use field data collection app for QGIS.

Frequently asked questions

What is the difference between .qgz and .qgs? 

QGIS saves projects in two formats:

Extension What it is When you see it
.qgz A zip archive containing the .qgs file plus any auxiliary storage (a .qgd SQLite database) The default format in QGIS 3
.qgs Plain XML text Older projects, or when you choose it explicitly, for example to track changes with Git

Both hold the same project definition. The .qgz format is smaller and keeps auxiliary data, such as manually moved labels, in one file. The .qgs format is human-readable, which makes it easier to inspect or compare between versions.

What does a QGIS project file contain? 

  • Layer list and data sources: the path, database connection or service URL for each layer.
  • Styling: symbology, labels, rendering rules and scale-dependent visibility.
  • Attribute forms: widget types, dropdowns, default values, constraints, tabs and groups.
  • Relations: links between tables, such as parent and child records.
  • Map themes: saved layer combinations.
  • Project settings: coordinate reference system, project extent, snapping and measurement settings.
  • Layouts: print layouts and reports, with their maps, legends, scale bars, labels and atlas settings for generating one page per feature.
  • Project variables: named values such as a project code, client name or surveyor list, which expressions, labels, layouts and form defaults can reuse.

What it does not contain: the features and rasters themselves. Those stay in their own files or databases (GeoPackage, shapefile, GeoTIFF, PostGIS and so on). Share a project file without its data and the recipient will see missing-layer warnings.

Why do QGIS layers go missing? Absolute vs relative paths 

Because the project only points to data, the way those pointers are written decides whether the project survives being moved.

  • Absolute paths record the full location, such as C:\Users\Maria\survey\trees.gpkg. They break as soon as the data is no longer at that exact location, for example when the project is opened on another computer or operating system. 
  • Relative paths record the location relative to the project file, such as ./data/trees.gpkg. They keep working wherever the folder goes, as long as the data travels with it.

You can choose between the two under Project Properties→ General. For any project that will be shared, synced or opened on a mobile device, relative paths are the safe choice.

When a path does break, QGIS offers a Handle Unavailable Layers dialog to point each layer to its new location.

Where a project can be stored

Location How it works Good for
File on disk A .qgz or .qgs file in a folder Most projects, and anything synced or versioned as files
Inside a GeoPackage Saved through Project, Save To, GeoPackage Shipping a project and its data as a single file
Inside a PostgreSQL database Saved through Project, Save To, PostgreSQL Teams that already share data through PostGIS

Good practices

  • Keep project and data in one folder: put the project file at the top level and the data in subfolders, so the whole thing can be copied or synced as a unit.
  • Use relative paths: see above.
  • Prefer GeoPackage for editable data: it is an open format, reliable for editing, and can hold one dataset or a group of layers in a single file. In Mergin Maps it also syncs at the feature level. Several surveyors can edit the same GeoPackage, and their changes are merged automatically. Other formats, such as shapefiles, sync as whole files and are more likely to conflict. 
  • Set the project CRS and extent deliberately: they decide what users see when they first open the project.
  • Name and organize layers clearly: layer names show up in legends, forms and web maps, not just in your Layers panel. You can also group layers together.
  • Back up before big changes: QGIS keeps a .qgz~ backup of the previous save, but it only covers the last version.

QGIS project files in Mergin Maps

In Mergin Maps, the QGIS project file is what the mobile app opens. A Mergin Maps project is a folder holding one QGIS project file together with its data, usually GeoPackages, background maps and photos. Everything you configure in the project file (styles, forms, map themes) is what field teams see on their devices.

This is why the good practices above matter so much for field work:

  • Data must sit inside the project folder and be referenced with relative paths, so it resolves on every device.
  • Forms configured in the project file become the data entry forms in the app.
  • Map themes defined in the project can be switched in the app and in webmaps.

The Mergin Maps QGIS plugin helps package an existing project, copying its data into the project folder, before you upload it. Our QGIS project preparation guide walks through the details.

Related terms

Term Meaning
Layer A single dataset displayed in QGIS, with its own source and style.
Data source The file, database table or web service a layer reads from.
GeoPackage An open, SQLite-based format that can hold many vector and raster layers, and optionally a QGIS project.
Auxiliary storage A .qgd database inside a .qgz that stores extra properties, such as manually placed labels.
Map theme A saved combination of visible layers and styles that can be switched with one click.
Layer definition file (.qlr) A file that saves one or more layers with their sources and styles, for reuse across projects.
Style file (.qml) A file that saves a single layer's style, independent of any project.

FAQs

Why does my project open with missing layers? The data has moved, or the project uses absolute paths that do not exist on this computer. Use the Handle Unavailable Layers dialog to relink them, then switch the project to relative paths.

Should I use .qgz or .qgs? Use .qgz unless you need to read or version the XML directly. It is the default and keeps auxiliary data in the same file.

How do I open a .qgz file? Open it in QGIS with Project → Open, or double-click it if QGIS is installed. A .qgz file is a zip archive, so you can also open it with any zip tool to see the .qgs file and auxiliary storage inside. Opening the project only restores its layers if the data it points to is available on your computer.

How do I convert a .qgz file to .qgs? Open the project in QGIS, choose Project → Save As, and select QGIS files (*.qgs) as the file type. You can also extract the .qgs file from the .qgz archive with a zip tool. If the project uses auxiliary storage, keep the .qgd file next to the .qgs file so manually placed labels and other auxiliary data are not lost.

Can I open a QGIS project file in other GIS software? Can I open a QGIS project file in other GIS software? Only in tools built on QGIS, such as the Mergin Maps mobile app or QGIS Server. Other GIS software cannot read it, but the data it points to (GeoPackage, GeoTIFF, PostGIS) can be read by most GIS software. 

Can I email a project to a colleague? Only with its data. Zip the whole project folder, or use a sync platform such as Mergin Maps so everyone works from the same copy.

Sources

‍

‍

By clicking “Accept All Cookies”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Cookie Policy for more information. Deny cookies here.