Shapefile to GeoJSON Converter: GIS Data for the Web
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.
Nothing leaves your device.
Waiting for a file.
Features in this file
| Name | Type | Folder | Vertices | Length | Area |
|---|

How to use this tool
Zip the shapefile set together, the .shp, .shx, .dbf and .prj, and drop the zip above. Everything is drawn on the map, the coordinate system found in the .prj is named under the status line, and Convert to GeoJSON gives you a single text file.
If you only want to look at the shapefile rather than convert it, the Shapefile Viewer shows the same map and table without producing a download.
What the attribute table becomes
Each row of the .dbf turns into the properties object that travels with its shape. A row reading BH-01, 45.5, Ridgeway becomes a properties block with name, depth and contractor as keys.
Types are preserved as they were read. Numbers stay numbers and text stays text, which matters if the result is going into a web map that colours features by a numeric field, because a number wrapped in quotes will not sort or scale.
The column names come across unchanged, and that is worth thinking about, because they may already be damaged. A .dbf caps names at ten characters, so a field reading measured_d was almost certainly measured_depth_m before somebody exported it. This conversion cannot recover the original, it can only carry across what is there.
Two things change on the way
The coordinates are reprojected if they need to be. GeoJSON is always WGS84 longitude and latitude, with no projection field and a deprecated crs member, so a shapefile in UTM or another grid has to be transformed rather than copied. The tool names the system it found so the transformation is not a black box, and refuses projections it cannot handle rather than passing numbers through.
The rings turn round. A shapefile winds the outer ring of a polygon clockwise and its holes counter clockwise. RFC 7946 requires exactly the opposite. This tool reverses them, which means the vertex order in the output is deliberately not the order in the file you started with.
A worked check you can repeat on paper
You can confirm the winding yourself with the shoelace sum, and it is the fastest way to tell whether any converter is specification compliant.
Take a square ring and, for each edge, multiply the first point x by the second point y, subtract the second point x times the first point y, and add the results. A positive total means the ring runs counter clockwise.
- Open the GeoJSON this tool produced and take the first ring of any polygon.
- Work the sum along it. The total should be positive, because RFC 7946 requires an outer ring to be counter clockwise.
- Now do the same for a hole, the second ring. That total should be negative.
If your outer ring comes out negative, whatever produced the file handed you raw shapefile winding without converting it. Plenty of software does, and plenty of software then draws it correctly anyway, so the file circulates until it reaches something that uses the winding to decide what is solid. That is when a lake becomes an island.
Mistakes that catch people out
Sending the .shp without the .prj and expecting the coordinates to be right. Without it there is no way to know whether the numbers are degrees or metres, and the tool says so rather than guessing.
Assuming the ten character column names were always that short. They were not, and the original names are gone.
Expecting one shapefile to become a mixed collection. A shapefile holds one geometry type, so the GeoJSON that comes out holds one type too.
Opening the result and finding it enormous. GeoJSON is verbose text and a detailed boundary can run to megabytes. It compresses extremely well, so zip it before sending.
Forgetting that GeoJSON has no styling. Colours and classifications live in your GIS project, not in the shapefile, so there is nothing to carry across.
Related Calculators and Reference
This conversion is usually the step before something reads the data on the web.
- GeoJSON to Shapefile Converter for the return journey, back into GIS.
- GeoJSON Viewer for drawing and checking the GeoJSON you just produced.
- Shapefile Viewer for looking inside the shapefile first, including its attribute table.
- Shapefile to KML Converter for taking the same data into Google Earth instead.
- CSV Cleaner for XYZ data for cleaning the attribute table before conversion.
- The RFC 7946, the GeoJSON specification is the authority on the ring winding rule described above.
