
How to Create a New Shapefile in QGIS
What you'll learn
- How to create a new Shapefile
- How to create vector data
Recommended for
- Anyone new to QGIS
- Anyone who wants to create their own GIS data
- Anyone who wants to create a new Shapefile
Introduction
The first thing you need when you create map data is a new vector layer. In QGIS, you can easily draw points, lines, and polygons with a Shapefile and build map data of your own. This article explains the steps for creating a new Shapefile.
For more details about Shapefiles, see the article below.
Points to note about Shapefiles
Many programs now support the Shapefile GIS data format, but there are a few points to keep in mind when you use it.
- It is made up of multiple files
- The file size limit is 2 GB
- Attribute field names are limited to 10 bytes (up to 10 single-byte characters)
QGIS also supports other file formats such as GeoPackage and GeoJSON, so choose the data format that suits your needs.
Related article
Create a new Shapefile
First, create a new layer to hold points, lines, or polygons.
From the menu bar, choose Layer → Create Layer → New Shapefile Layer.

The New Shapefile Layer dialog opens.
At the top of the dialog, you set basic items such as the save location, the geometry type, and the coordinate reference system (CRS) of the data. This example creates a point layer. For the CRS of the layer, choose the latitude and longitude CRS EPSG:4326 - WGS 84.
- Click the ... button and specify the save location and file name for the data.
- Set the File encoding. This example uses UTF-8.
- Select the Geometry type. This example uses Point.
- Select the CRS of the layer. Click the globe button (Select CRS) at the far right and choose the CRS.

This example creates a point layer. To create a line layer, select LineString. To create a polygon layer, select Polygon.
With No Geometry, you can create a layer that has no shapes such as points, lines, or polygons, only a table (attribute information).

Next, set up the attribute fields under New Field. You can add fields later, but if you already know which fields you need, it is best to set them up now. This example adds a text field named name.
- Enter the field name in Name. Note that Shapefile field names are limited to 10 single-byte characters.
- Choose the data type that fits the values you will enter, from the options below.
- Text (string): Enter text strings.
- Integer (32 bit): Enter integer values.
- Decimal (double): Enter numbers with decimal places.
- Date: Enter dates.
- Use Length to set the number of characters the field can hold (the number of digits for a number), and Precision to set the number of digits after the decimal point.
- For example, to enter a 6-digit number with three decimal places, such as
135.245, set Length to6and Precision to3.
- For example, to enter a 6-digit number with three decimal places, such as
- Click Add to Fields List.
- The field appears in Fields List with the settings you entered.
- To delete a field, select it and click Remove Field at the bottom right.

When all the settings are done, click OK.

The new layer appears in the Layers panel. However, the layer has no features yet, so nothing appears on the map.

Open the attribute table of the new layer. It contains the columns for the fields you set up during creation.

Once you have created a new Shapefile, the next step is to add features to the layer. Another article covers how to add features.
Conclusion
This article showed how to create a new Shapefile. When you create your own point, line, or polygon data, start by preparing a new layer as in these steps.
Also, as mentioned at the beginning, Shapefiles have some limitations. Use other data formats as needed.


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.


