GeoJSON to Shapefile converter
Hand your GeoJSON to someone who works in ArcGIS: get a zip with the .shp, .shx, .dbf, .prj and .cpg files, one layer per kind of shape. Free, and no account needed.
Convert GeoJSON to Shapefile online, in your browser
The Spatibase GeoJSON to Shapefile converter writes an ESRI shapefile from a GeoJSON file in your web browser, with its own writer. What it produces:
- A zip ArcGIS and QGIS open. Point, polyline and polygon layers as needed, each with a WGS 84
.prjand a.cpgthat says UTF-8. - Columns with real types. Numbers become numeric fields and
true/falselogical ones; names are cut to 10 characters, and every rename is listed. - Your data stays local. Read and written on your computer, up to 50 MB, with no account.
How to convert GeoJSON to a shapefile
- Save the GeoJSON as a file: an API response, a geojson.io drawing (Save → GeoJSON) or an Overpass Turbo export.
- Drop it on the box above, or press Choose a file. The sample mixes 5 places, a walking route and 3 areas, so it gives all three layers.
- Read the notes under the map: renamed fields, values cut at 254 bytes and dropped altitude are all counted there.
- Press Download shapefile (.zip). The sample comes out as
barcelona.zipwithbarcelona_points,barcelona_linesandbarcelona_areasinside, 15 files in all. - Send the zip as it is: ArcGIS Online and most portals take a zipped shapefile. For ArcGIS Pro or QGIS, unzip it and add the
.shpfiles.
What happens to your GeoJSON in a shapefile
| What | What happens |
|---|---|
| Points, lines and areas | Kept, one layer per kind: Point and MultiPoint in _points, LineString and MultiLineString in _lines, Polygon and MultiPolygon in _areas. A file with one kind gives one layer named after the file. |
| GeometryCollection | Split: each part goes to its layer and carries the same attributes. The notes count these features. |
| Polygon holes | Kept, with every ring turned to ESRI’s order: outer clockwise, holes counter-clockwise. |
| Number properties | A numeric (N) field with as many decimals as the values need. A field that mixes numbers and text becomes text. |
true/false properties | A logical (L) field. A missing value is written as unknown, not as false. |
| Text, dates and nested values | Text (C) fields. Objects and arrays are written as JSON text; anything over 254 bytes is cut, with a count in the notes. |
| Property names | Cut to 10 characters, accents dropped, other symbols turned into _, and kept unique: stroke-width → stroke_wid. |
Style keys such as marker-color | Kept as ordinary fields, since in a GeoJSON they may be your data. |
| Altitude | Dropped: the layers are 2D. The notes say how many coordinates had one. |
Feature id and features without geometry | Not written. Only properties become columns, and a feature without a location has no record to go in. |
From JSON values to dBASE columns
GeoJSON types each value; a shapefile types each column. In GeoJSON, one feature’s rating can be 4.5 and the next one’s "n/a". The .dbf beside a shapefile needs one type per column, decided before any row is written.
So the converter looks at every value of a property across all features of a layer and picks:
- Logical (L) when every filled value is
trueorfalse. - Numeric (N) when every filled value is a plain number of at most 20 characters. The width and decimals fit the longest value.
- Text (C) for everything else, up to 254 bytes. Accented and non-Latin letters take 2–4 bytes each, so the limit in letters is lower.
Each layer gets its own table. The points layer has the columns its points use, and the areas layer those of its areas. A property only your lines have doesn’t show up as an empty column on the points.
Why rings get turned around. RFC 7946 asks for counter-clockwise outer rings; the shapefile spec wants the opposite and uses the direction to tell outer rings from holes. The writer checks every ring and reverses the ones that point the wrong way.
Write a shapefile from GeoJSON in Python
geopandas, which runs on GDAL, writes shapefiles. One shapefile holds one kind of shape, so split the data first:
import geopandas as gpd
gdf = gpd.read_file("places.geojson")
kinds = gdf.geom_type.str.replace("Multi", "") # Point, LineString, Polygon
for kind in kinds.unique():
gdf[kinds == kind].to_file(f"places_{kind.lower()}.shp", encoding="utf-8")On the command line, ogr2ogr -f "ESRI Shapefile" places.shp places.geojson -lco ENCODING=UTF-8 converts a file with one kind of shape. Add -nlt PROMOTE_TO_MULTI when singles and multis are mixed, such as Polygon and MultiPolygon.
Check before you send. ogrinfo -so -al places_point.shp prints the layer’s geometry type, feature count and fields, which catches a broken file faster than opening it in ArcGIS.
Questions about converting GeoJSON to Shapefile
How do I convert GeoJSON to a shapefile in QGIS?
Drag the GeoJSON onto the map. If it mixes points, lines and polygons, QGIS asks which sublayers to add: take all of them. Then right-click each layer, choose Export → Save Features As, pick ESRI Shapefile and set the encoding to UTF-8.
Do number and true/false properties keep their types in the shapefile?
Yes, when the property is consistent. A property whose values are all numbers becomes a numeric field, and one that is all true or false becomes a logical field. As soon as one feature holds text in that property, the whole column is written as text.
What happens to nested objects and arrays in GeoJSON properties?
They are written as JSON text in a text field, such as {"open":"9-17"}. A shapefile column can’t hold a structure, and the text is cut at 254 bytes. Flatten the values into separate properties before converting if you need them as columns.
Can I make a shapefile from GeoJSON in JavaScript?
Yes, but test the output. In our tests @mapbox/shp-write 0.4.3 merged separate lines into one record, garbled accented text and dropped MultiPoints, so this page uses its own small writer. On a server, GDAL’s ogr2ogr or geopandas is the safe choice.
Will accented and non-Latin names survive in ArcGIS?
Yes. The attribute table is written in UTF-8, and each layer has a .cpg file that says so. ArcGIS 10 and later, ArcGIS Pro, QGIS and GDAL read the .cpg, so names like Museu Marítim stay intact. Keep the .cpg next to the .dbf when you move the files.
Is the GeoJSON sent anywhere to make the shapefile?
No. The shapefile is built by JavaScript in your browser tab, and the file stays on your computer. Spatibase never receives it; only the background map tiles come from the internet.
Moving the places into Spatibase? Read how to import your data. Need another pair of formats? The GIS file converter converts between all of them.