Home / GIS and Open Map Data for Beginners

How to Export a Shapefile From QGIS: Save Features As, Without Losing Data

Designer using a graphic tablet and laptop at a desk

Photo: Kawê Rodrigues / Pexels

The shapefile will outlive us all. Your working data lives in a GeoPackage, clean and modern, and then the email arrives: please send it as a shapefile. The format persists because everything reads it, including the legacy systems and habits of the people who need your data, and exporting it well is a professional courtesy with technical teeth. Done carelessly, the export quietly damages the data: field names amputated at ten characters, accented place names garbled by an encoding mismatch, half the file family left out of the zip. Done properly, it is a five-minute task ending in a delivery you have personally verified. This guide runs the export through QGIS's Save Features As dialog, spends a section on each of the format's traps, and finishes with the verification step that separates a delivery from a hope. It is the outbound companion to our guide to adding a shapefile, and both lean on the format background in our shapefile explainer.

Interactive tool

Ship the Whole Family: The Export Shapefile Checklist

Check off each step as you finish it. Your progress stays on this page.

0 of 7 complete

0% done

The Export: Right-Click, Save Features As

The door is on the layer itself. Right-click the layer in the panel, choose Export, then Save Features As, and the dialog that opens is the whole export in one form. Set the format to ESRI Shapefile. Give the file a name and a location; QGIS will write the family around that name, the .shp, .shx, .dbf, and, if you let it, the .prj and .cpg siblings. Choose the CRS deliberately: the default offers the layer's own system, and the right answer is usually to keep it, unless the receiver has specified the system their system expects, in which case their specification wins and you note the change in your message to them. The dialog also carries the two scoping choices that save whole workflows: export only the selected features, if a selection is active, and restrict the export to an extent, if only a region is wanted. Below them sits the field list, where the next section's trap is already visible, and the encoding setting, where the section after that lives. Read the whole dialog once before clicking OK; every trap in this article is visible from this one screen, which is the dialog's quiet kindness.

One choice in it deserves its own warning, because it is the one receivers argue about most: the output CRS. If the receiver's system is a web map or a GPS workflow, they will likely expect the layer in EPSG:4326, latitude and longitude, whatever system your project works in. If they are a survey or engineering shop, they will want their local projected grid. When the receiver has not said, keep the layer's own system and name it in the delivery note, because an undocumented conversion is a surprise, and surprises in coordinates are measured in meters of displacement and hours of someone else's debugging. The dialog will happily write any system you select; the professionalism is in choosing the one the other end can use, and saying so.

The Truncation Problem: Ten Characters Is All You Get

The shapefile format limits field names to ten characters, a rule from its database ancestor, and QGIS will show you the consequences before they happen: the field list in the export dialog displays the names as they will be written, and any of your names longer than ten characters will be shortened, deliveries becoming deliverie, population_2024 colliding with population_2023 into near-identical stubs, and in the worst case two distinct fields truncating to the same name. Do not let the dialog improvise. Rename the fields yourself before export, in the source layer or through the export's field editing, choosing short names that stay distinct and remain decipherable by a stranger: pop24 and pop23 carry their meaning; populati1 and populati2 carry a future misunderstanding. Types narrow too: long text fields are cut to the format's width, dates lose their time components, and very precise numbers can lose precision to the old database engine underneath. None of this is a reason to refuse the export; all of it is a reason to warn the receiver in one sentence, the field names were shortened for the format, here is the mapping, which converts a silent data change into a documented one. The mapping table, old name to new name, is the single most professional paragraph in any shapefile delivery email.

Close-up of hands typing on a laptop keyboard
Close-up of hands typing on a laptop keyboard

Encoding: The Setting That Decides Whether Names Survive

Text in a shapefile is written in a character encoding, and the export dialog lets you choose it, with UTF-8 the correct modern answer in nearly every case. Choose it, and QGIS writes the .cpg sibling declaring UTF-8, so receiving software knows how to read the names your data contains. The failure this prevents is famous to anyone who has received data across languages: place names and personal names with accented or non-Latin characters arriving as garbled symbols, the data intact but its labels wounded, because writer and reader assumed different alphabets. If your receiver is a known legacy system with a known expectation, an older regional encoding may be what it honestly needs, and then the right move is to ask or to test, not to assume. The principle underneath is the one this whole article runs on: a shapefile delivery is a small act of communication between two systems that will never meet, and every setting in the dialog is a sentence in that communication. Encoding, CRS, field names: set each one as if the receiver's confusion were your own, because professionally, it is.

Export a Subset: Selection and Extent

Often the receiver does not want the layer; they want a piece of it, one district, one category, this year's records. The export dialog handles this without any intermediate steps: make the selection first, by expression, by location, by hand, using the methods of our attribute table guide, then tick Save only selected features in the dialog, and the shapefile that lands contains exactly the selected set. The extent option clips to a rectangle or the current map view for the geographic version of the same request. This is also the clean way to produce a shapefile for a single area of interest from a national layer you maintain whole. One caution keeps the practice honest: name the subset file for what it is, rivers_north_district rather than rivers, because a subset wearing the whole dataset's name is a future error already scheduled. When the piece someone needs deserves a life of its own as a permanent layer rather than a one-off export, our guide to creating a layer from a selection covers that promotion; the export checkbox is for deliveries, the layer is for keeping.

Zip the Family and Verify Like the Receiver

The export writes a family of files, and the delivery must ship all of them: .shp, .shx, .dbf, .prj, .cpg, zipped together into one archive, as our adding a shapefile guide explains from the receiving side. A zip missing its .prj is a layer that arrives not knowing where it is; missing its .dbf, it arrives mute. Zip the folder's contents immediately, before anything can be separated, and name the archive as clearly as the layer. Then perform the verification that defines professional work: open the exported shapefile in a fresh QGIS project, as if you were the receiver, and check the four things they will check. The feature count matches the source, or the intended subset. The fields are present, with the shortened names you documented, and the values survived. The names with special characters render correctly, proving the encoding. And the layer lands in the right place on a basemap, proving the .prj and the CRS choice. Two more format facts belong in the delivery note when they apply: the 2 GB ceiling means a very large layer may need splitting by region or category, and a layer that would not fit was never going to arrive as one shapefile at all. Verify, document, zip, send: the delivery that results is one you can defend line by line, which is all that professional data work ever is.

What the Receiver's Software Sees

An export is a message to software you will never meet, and it helps to picture the readers. A modern GIS, QGIS itself, ArcGIS, the web platforms, reads the family fluently, honors the .prj, respects the .cpg, and shows your layer as you sent it. Older and narrower tools read with accents: a CAD system that takes the shapes and shrugs at the table, a spreadsheet-era database that chokes on a field type the format promised loosely, a legacy government intake that validates the file against rules written when the format was young and rejects the encoding it never learned. You cannot test against readers you do not have, which is why the standards in this article are conservative on purpose: UTF-8 declared in a .cpg, field names short and distinct, geometry valid and simple, the family complete in one zip. Conservatism is the compatibility strategy. The one accommodation worth making explicitly is for the receiver who tells you their constraints, a required CRS, a naming scheme, a split by district; a stated requirement outranks every default in this guide, because the delivery exists for their system, not for your habits. Ask, when you can, what the layer must survive. Send, in every case, the version you verified.

The Delivery Note: Five Lines That Prevent Five Emails

End the export with the note, because the zip alone starts conversations that the note concludes. Five facts belong in it. The layer's name and what it contains, in one sentence a stranger can act on. The coordinate reference system, named in full, so no one has to interrogate the .prj. The field mapping, old names to the shortened names the format imposed, as a small table. The count, features sent, and the date of the data, so the receiver can verify the arrival against the promise. And the caveats that apply: the subset that was selected, the encoding, the fields whose precision the format narrowed. Written once, from the export dialog you just used, the note takes four minutes and converts your delivery from a file into a professional act. It also protects you: months later, when a question arrives about what exactly was sent, the note is the memory, and memory, in data work, is the difference between a system and a series of anecdotes.

Related Guides

The closest companions to this guide are the GIS and open map data guides below. Each one picks up a thread this page starts:

Frequently Asked Questions

Where is the shapefile export in QGIS?

Right-click the layer, choose Export, then Save Features As. Set the format to ESRI Shapefile, name the file, choose the CRS and encoding, review the field list, and confirm. QGIS writes the full file family around the name you give.

Why did my field names get cut off?

The shapefile format limits field names to ten characters. QGIS shows the shortened names in the export dialog's field list before writing. Rename the fields yourself to short, distinct names and send the receiver a mapping of old names to new ones, rather than letting truncation choose names that collide.

Which encoding should I choose?

UTF-8, unless the receiving system is known to require a legacy regional encoding. QGIS records the choice in the .cpg file so the receiver's software reads the text correctly. The wrong encoding garbles names with accented or non-Latin characters.

Can I export only some features?

Yes. Make a selection first, then tick Save only selected features in the export dialog, or restrict the export by extent. Name the resulting file for the subset it actually is, so nobody later mistakes it for the full dataset.

How do I know the export worked?

Reopen the exported shapefile in a fresh project and check it as the receiver will: feature count, fields and values, correct rendering of special characters, and correct position on a basemap. Then zip the complete file family, including .prj and .cpg, before sending.

Photo credits: Kawê Rodrigues (Pexels); Tima Miroshnichenko (Pexels). Photos are served from this site; follow the credit to the library page for the original.