CSV to Shapefile Converter: Spreadsheet Data into GIS

All tools
Report

Heading to the field? Install this site from your browser menu and this tool works with no signal. See how

Converter

Nothing is uploaded. The file is converted on your own device, so it works with no signal.

Drop a file here or

Nothing leaves your device.

No file to hand?

Waiting for a file.

Features in this file

NameTypeFolderVerticesLengthArea

A table showing how CSV columns become shapefile fields. A depth column where every value looks like 45.5, 38.2 and 61.0 becomes numeric with its width from the longest value. A name column of BH-01, BH-02 and BH-03 becomes text because of the letters. A code column of 00123 and 00456 becomes text because leading zeros matter. A note column of 45, n over a and 61 becomes text because one value is not a number. A column named measured_depth_m has its name cut to measured_d. A band explains that the leading zero case is the one that bites, because a spreadsheet opened later may turn 00123 back into 123.
The type is decided per column by looking at every value, which is why a single n over a in a column of numbers turns the whole field into text.

How to use this tool

Drop a .csv file above. The delimiter is detected, the coordinate columns are found, everything is drawn on the map, and Convert to shapefile gives you a zip holding the .shp, .shx, .dbf and .prj.

If your data is in a spreadsheet rather than a text file, the Excel to KML Converter reads .xlsx directly, and the Excel to Map will show it on a map first.

How your columns become fields

This is the part worth understanding, because a .dbf column has one type for every row and the type is decided by looking at all of them before anything is written.

A column where every value parses as a number becomes a numeric field, with its width taken from the longest value. A column with any letters in it becomes text. A column where one value reads n/a and the rest are numbers becomes text, because a numeric field has no way to store that one value.

Leading zeros are the case that catches people. A site code of 00123 is text, and it is kept as text so the zeros survive. That is the right decision here, and it is worth knowing that opening the result in a spreadsheet later may helpfully turn it back into 123. The loss happens downstream, not in this conversion.

Names are capped at ten characters, so measured_depth_m becomes measured_d. Two names that shorten to the same ten get a digit appended to the second so they stay unique.

A worked check you can repeat on paper

Look at your header row and predict the field types before you convert. It takes a minute and it saves discovering the problem in your GIS.

  • For each column, scan down it. If every single value is a number, it will be numeric.
  • If any value is blank, that is fine, blanks are allowed in both.
  • If any value is text, even one, the whole column becomes text.
  • If any value has a leading zero you care about, the column must stay text, which it will.

Then check the names. Count the characters in each header. Anything over ten will be cut, and if two headers share their first ten characters, one of them is about to be renamed.

Fixing that in the CSV before converting takes seconds. Fixing it after means either living with the truncation or converting again.

Mistakes that catch people out

Expecting eastings and northings to work. Values outside the range of degrees are refused rather than plotted, because the grid is not recoverable from the numbers.

Assuming the .shp alone is enough. The output is a zip because all four files have to travel together.

A number column that Excel formatted with thousands separators. A value reading 1,234.5 is text with a comma in it, and in a CSV it may also break the column count unless it was quoted.

Losing leading zeros later. The shapefile keeps them. Whatever opens it next may not.

Mixed geometry. Not an issue here, since every row becomes a point, but worth remembering if you later merge this with line or polygon data.

Related Calculators and Reference

A table becoming GIS data is usually the start of a longer job.