Georaf TeamConvert GeoJSON to Shapefile: 3 Ways That Actually Work
Three practical ways to turn a GeoJSON file into a Shapefile, from a one-click web tool to command-line. No GIS background needed.

You have a GeoJSON file and someone is asking for a Shapefile. Maybe it's a government agency, maybe it's a surveying firm, maybe it's a tool from the mid-2000s that doesn't speak anything newer. The request is simple. The conversion is simple, too. But there are a few things that happen during the trip that are worth knowing about before you hit send.
This article covers three ways to do it, what you'll lose in the process (some things are unavoidable), and how to pick the right method.
What actually changes when you go from GeoJSON to Shapefile
Before the methods: a quick explanation of what you're working with, because the differences between these two formats drive every quirk you'll hit.
GeoJSON is a text-based format. Your map data lives in a single .geojson file, coordinates and attached data together. Column names can be as long as you like, properties can be nested, and there's no limit on how many columns a file can have.
Shapefile is a bundle of files, not one. A complete Shapefile includes at minimum .shp (the geometry), .dbf (the attached data), .shx (an index), and usually .prj (the coordinate system). It's a format from 1993, and the data rules reflect that.
When you convert GeoJSON to Shapefile, three things can happen to your data:
Field names get truncated to 10 characters. The .dbf file, which stores all your properties, is based on the dBASE III database format. It caps field names at 10 characters. A column called population_2024 might come out as populat_20 or population depending on the tool. Check your column names before you send the file. The GeoJSON vs Shapefile article covers this trade-off in more detail.
Nested properties get flattened or dropped. GeoJSON lets properties be objects within objects: {"address": {"city": "Berlin", "zip": "10115"}}. Shapefile has no concept of nested data. Tools handle this differently, some try to flatten it into separate columns, others drop the nested values entirely. If your GeoJSON has nested properties, check the output carefully.
Mixed geometry types need splitting. A Shapefile can only contain one type of geometry per file: all points, all lines, or all polygons. If your GeoJSON mixes points and polygons in the same file, the conversion will either fail or silently drop one type. You'll need to split the file first.
None of these are bugs in the tool you're using. They're limits built into the Shapefile format. See What Is a Shapefile for the full history of why the format works this way.
Method 1: A one-click web converter
The fastest option for anyone who doesn't spend their day in a terminal.
- Go to Georaf.
- Drag your
.geojsonfile onto the upload zone. - Choose Shapefile as the output format.
- Click Convert. Download the ZIP.
The ZIP you get back contains the full Shapefile bundle: .shp, .dbf, .shx, and .prj, all with matching names, ready to send.
The reason to use a web converter for a one-off job is practical: the time you'd spend installing a command-line tool is almost always longer than the conversion itself. Even if you're a developer, for a single file, Method 1 is the right call.
The reason to use Georaf specifically is that it tells you what changed during the conversion. If field names got truncated, you'll see a list. If entries were dropped because of mixed geometry types, you'll know. Most converters silently transform things. A field called description_long quietly becomes descriptio and you find out when the recipient asks why the data looks wrong.
If you do this occasionally, stop reading here.
Method 2: ogr2ogr (command-line)
ogr2ogr is the tool to use when you're converting many files, or when conversion is part of a script. It ships with GDAL, the open-source geospatial library that powers QGIS and dozens of other tools.
Install it:
brew install gdal
# or on Ubuntu/Debian
sudo apt install gdal-bin
Then run:
ogr2ogr -f "ESRI Shapefile" output.shp input.geojson
Note the output before the input. That's a quirk of ogr2ogr that catches everyone on the first try.
That command writes a folder named output.shp containing all the sidecar files. To get a ZIP directly, you'll need to zip it yourself:
ogr2ogr -f "ESRI Shapefile" output_dir/ input.geojson
zip -j output.zip output_dir/*
If your GeoJSON has mixed geometry types and you want to split them out:
ogr2ogr -f "ESRI Shapefile" points.shp input.geojson -where "OGR_GEOMETRY='Point'"
ogr2ogr -f "ESRI Shapefile" polygons.shp input.geojson -where "OGR_GEOMETRY='Polygon'"
Good for: batch conversion, scripting, any case where you're processing more than a handful of files.
Not good for: getting plain-English feedback on what changed. ogr2ogr is quiet unless something fails hard. Truncated field names happen without warning.
Method 3: Python with geopandas
If conversion is one step in a larger data pipeline, Python keeps everything together.
import geopandas as gpd
# Read the GeoJSON
gdf = gpd.read_file('input.geojson')
# Optional: shorten field names to avoid silent truncation
# gdf = gdf.rename(columns={'population_2024': 'pop_2024'})
# Write out as Shapefile
gdf.to_file('output.shp', driver='ESRI Shapefile')
You'll get the same .shp bundle of files in the same directory as your script.
One practical tip: rename long column names before writing. geopandas will truncate them for you, but the logic isn't always predictable. Better to control the names yourself.
# See all your column names and their lengths
for col in gdf.columns:
if col != 'geometry' and len(col) > 10:
print(f'{col!r} ({len(col)} chars) will be truncated')
Good for: data pipelines, any case where conversion is one step in a longer workflow, situations where you need to clean or transform data on the way through.
Not good for: a single file. Importing geopandas for one conversion is more effort than it's worth. Use Method 1.
So which one?
| Your situation | Use |
|---|---|
| One file, today, you don't want to install anything | Georaf converter |
| You need to see what changed during the conversion | Georaf converter |
| Many files, you work in a terminal | ogr2ogr |
| Conversion is one step in a data pipeline | geopandas |
| You want this automated from an app | Georaf API |
For most people asking "how do I convert GeoJSON to Shapefile," Method 1 is the answer. The other two exist for people who are scripting or automating, and those people already know who they are.
A few things that can go wrong
The recipient can't open the file. Make sure you're sending a ZIP of the full bundle, not just the .shp file. A .shp on its own is incomplete. The .dbf, .shx, and .prj must all be present.
Field names came out garbled. Check your column names in the source GeoJSON. Anything over 10 characters will be truncated. If two field names truncate to the same first 10 characters, you'll likely lose one of them entirely. Rename before converting.
Entries are missing from the output. Almost always a mixed geometry type issue. Check whether your source file has a mix of points, lines, and polygons. Split them first if so.
Coordinates are wrong. GeoJSON officially uses WGS 84 (the standard GPS coordinate system). If your GeoJSON was produced by a tool that stored coordinates in a different system without declaring it, the Shapefile will inherit the problem. See the coordinate mismatch article for how to diagnose this.
Wrapping up
Converting GeoJSON to Shapefile is straightforward. The main thing to plan for is the field name truncation, because that one happens silently and can confuse the recipient if they don't know to expect it. Rename long column names before you convert, verify the output has all the files the recipient needs, and you're done.
If you want all of that handled in one step with a clear summary of what changed, Georaf does it in one upload.


