Create a shapefile from CSV in QGIS

How to turn a CSV or TSV of coordinates into a shapefile in QGIS, what the conversion changes, and the field-name, encoding and sharing limits to check before relying on it.

Converting a CSV file into a shapefile in QGIS turns rows of text into map features that other GIS software can open, style and analyze. The process is short, but it is not a neutral copy. The shapefile format places limits on field names, data types and text encoding that a CSV never had. This review explains what the conversion does, how to run it, and how to judge whether the result still carries the meaning of your original table.

Is converting CSV to a shapefile the right choice?

Convert when you need the data as spatial features: points on a map, input to spatial analysis, or delivery to a person or system that specifically requires a shapefile. The main benefit is compatibility. The shapefile is one of the most widely accepted vector formats in GIS software, so a correctly exported file will usually open almost anywhere.

The main cost is that the shapefile is an older format with structural limits. Long column names get shortened, some data types are simplified, and the output is a set of linked files instead of one. If your column names are long or descriptive, or your data includes timestamps or mixed types, those limits can quietly change what the table says.

  • Keep the data as plain CSV or TSV when:
  • It only needs to be read, edited or shared as a table, for example in a spreadsheet.
  • No one downstream needs spatial features.
  • The column names or values would be damaged by shapefile limits and no recipient requires a shapefile.
  • Consider GeoPackage instead of a shapefile when:
  • You need a spatial format but want to keep long field names and richer data types in a single file, and your recipients' software supports it.

What the conversion actually changes

A CSV is plain text. Each row is a line, and each value is separated by a delimiter, usually a comma (or a tab in a TSV). Coordinates are stored as ordinary numbers or text in columns. Nothing in the file says that a column represents longitude or which coordinate reference system (CRS) the numbers use.

The conversion adds that missing meaning and stores it in a different structure:

  • Geometry is built: QGIS reads the chosen X and Y columns (or a WKT column) and creates a point or other geometry for each row.
  • A CRS is assigned: you declare which coordinate system the numbers are in. QGIS does not reliably infer this from the values.
  • Attributes move into a DBF table: the remaining columns become fields with fixed types such as text, integer, decimal or date.
  • The output is split into several files: geometry (.shp), an index (.shx), attributes (.dbf), usually a projection file (.prj), and often an encoding file (.cpg).

Loading a delimited text layer in QGIS is a separate step from saving it. When you first add the CSV, QGIS displays it as a layer read directly from the text file. The shapefile exists only after you export that layer.

How to create the shapefile in QGIS

The steps below follow the standard QGIS workflow. Menu labels and dialog layouts can differ slightly between QGIS versions, and they were not checked against a specific release for this article.

  • 1. Open Layer > Add Layer > Add Delimited Text Layer (this is also the Delimited Text tab of the Data Source Manager).
  • 2. Select the CSV or TSV file.
  • 3. Under File Format, choose CSV, or choose custom delimiters and select Tab for a TSV.
  • 4. Under Record and Fields Options, confirm that the first record contains field names and that field types are detected. If your file uses a comma as the decimal separator, set that option too.
  • 5. Under Geometry Definition, choose Point coordinates and set the X field to longitude and the Y field to latitude. Alternatively, choose Well Known Text (WKT) if a column holds geometry text, or No geometry if the file has no location data.
  • 6. Set the Geometry CRS to match your coordinates. Latitude and longitude in decimal degrees are commonly WGS 84 (EPSG:4326), but confirm this against your data source.
  • 7. Click Add and check that the points appear where you expect.
  • 8. Right-click the layer and choose Export > Save Features As.
  • 9. Set Format to ESRI Shapefile, choose a file name and CRS, and set Encoding to UTF-8.
  • 10. Save, then open the new shapefile's attribute table to review the field names and values.

The Processing Toolbox also includes a Create points layer from table algorithm, which does the same job in a form that can be repeated or added to a model.

The following file is a made-up example of a CSV that converts cleanly. Its fields are short, and its coordinates are in clearly named columns:

site_id,name,lat,lon
1,North Gate,40.7500,-73.9900
2,River Pier,40.7000,-74.0100

The most common mistake at this stage is swapping the axes. Longitude belongs in X and latitude belongs in Y. If they are reversed, points usually land in the wrong place, or the layer appears empty because the points fall outside the current map view.

Will the result stay readable and usable after sharing?

Most problems come from the shapefile format's documented limits, not from QGIS itself. The points below describe those format rules. They are not results of tests run for this article, so check your own output against them.

Concern | CSV / TSV | Shapefile
Field names | Any length | Limited to 10 characters in the DBF; longer names are shortened
Data types | Untyped text | Fixed types; DBF has a date type but no combined date-time type
File structure | One file | Several files that must stay together
Text encoding | Whatever the file was saved in | Depends on the encoding setting and the .cpg file
Editing | Any text editor or spreadsheet | GIS software needed for safe editing
  • Truncated field names: a column named observation_date could become something like observatio. If several long names start the same way, they may be renamed to stay unique, which makes their meaning harder to read. Rename columns to short, clear names before exporting, and keep a separate note explaining each one.
  • Lost precision or type changes: check timestamps, leading zeros in ID codes, and decimal values after export. Codes such as postal codes should be stored as text so their leading zeros are kept.
  • Missing companion files: send the .shp, .shx, .dbf, .prj and .cpg files together, usually zipped. Without the .prj file, the recipient's software may not know the CRS. Without the .dbf file, the attributes are gone.
  • Character encoding: names with accents or non-Latin scripts can display as garbled text if the encoding is not declared. Exporting as UTF-8 with a .cpg file reduces this risk, but how a specific destination program handles the encoding was not tested here.

For accessibility and plain reading, remember that a shapefile cannot be opened in a text editor the way a CSV can. People who use screen readers or simply need to read the data, and who do not have GIS software, will usually find the original CSV, or a CSV exported from the final layer, easier to use. Share a plain-text version alongside the shapefile whenever the attribute values matter more than the map.

Evidence gaps

No version-specific screenshots, sample datasets or destination-software tests were provided for this review. The workflow and format limits above reflect the standard QGIS and shapefile documentation. Behavior with particular QGIS releases, unusual encodings, or a specific recipient's software should be confirmed by exporting a small sample and opening it where it will actually be used.

Bottom line

Creating a shapefile from a CSV in QGIS is reliable when the table has short field names, simple data types, and clearly identified coordinates with a known CRS. Before exporting, shorten field names, confirm the X and Y columns, set the encoding, and plan to send all the component files together. If no one needs spatial features, keep the CSV. If you need spatial data without the shapefile's limits, GeoPackage is usually the better container.