Convert a shapefile to GeoJSON for web maps, APIs and code. Drop a zip or the .shp, .dbf and .prj files. Attributes become properties, projected coordinates such as UTM are converted to longitude and latitude, and polygon holes are kept. The files are read in your browser and never uploaded.
- Free, no signup
- Zip or loose files
- Reprojects using the .prj
- Runs in your browser: no upload
No file handy? Download a sample shapefile (three parks, one with a hole, in UTM zone 43N) to see the reprojection.
How to convert a shapefile to GeoJSON
- Load the shapefile. Drop a .zip that holds the shapefile, or choose the .shp, .dbf and .prj files together. A shapefile is several files, and the .prj file tells this page which map projection the coordinates use.
- Check the preview. The page shows how many points, lines and polygons it found, which coordinate system it read from the .prj, and the first rows of the attribute table.
- Choose the options. Pick the coordinate precision, the file layout and whether to keep elevation. The defaults suit most uses.
- Download. Click Download GeoJSON. The file contains one feature for every record, with the .dbf fields as properties.
Which files do I need?
A shapefile is a set of files that share one name. Select them together or put them in a .zip.
| File | Needed? | What it holds |
|---|---|---|
.shp | Yes | The shapes: points, lines or polygons. |
.dbf | Recommended | The attribute table. Without it the GeoJSON has shapes but no properties. |
.prj | Yes, unless the data is already longitude/latitude | The coordinate system. It lets this page convert projected coordinates (such as UTM metres) to the longitude and latitude that GeoJSON requires. Without it, projected coordinates cannot be placed on the map. |
.cpg | Optional | The text encoding of the .dbf, so accented and non-Latin characters read correctly. |
.shx | No | An index file. It is not needed here. |
How a shapefile becomes GeoJSON
| In the shapefile | In the GeoJSON |
|---|---|
| Point, MultiPoint | Point or MultiPoint. |
| PolyLine | LineString, or MultiLineString when a record has several parts. |
| Polygon | Polygon, or MultiPolygon when a record has several separate areas. Holes become inner rings, so lakes and islands stay cut out. |
| One record in the .dbf table | One Feature, with the fields as properties. Numeric fields become JSON numbers, text stays text, logical fields become true or false, dates become text such as 2026-03-15, and empty values become null. |
| Z values (PointZ, PolyLineZ, PolygonZ) | The third coordinate, if you leave Keep elevation ticked. M (measure) values are not written. |
| The .prj coordinate system | Every coordinate is converted to WGS 84 longitude and latitude in decimal degrees, which is what GeoJSON uses. |
By default polygon rings are written the way the GeoJSON standard (RFC 7946) asks: outer rings counter-clockwise and holes clockwise. Shapefiles use the opposite direction, so a straight copy of the coordinates would break the rule. You can switch the correction off if you need the original direction.
Which projections are supported?
The page reads the projection from the .prj file and converts every coordinate to longitude and latitude. It supports:
- Geographic coordinates (longitude/latitude), such as WGS 84, NAD83 or ETRS89.
- Transverse Mercator, including every UTM zone and national grids built on it (for example the British National Grid or New Zealand Transverse Mercator).
- Web Mercator (EPSG:3857) and standard Mercator.
- Lambert Conformal Conic and Albers Equal Area.
The calculations were checked against the PROJ library on sample points for UTM zones, Web Mercator, Lambert 93, an Albers equal-area grid and the British National Grid, and agree to well under a millimetre. If the .prj uses a projection that is not on this list, the page says so instead of guessing; reproject the shapefile to WGS 84 in QGIS or with the CRS Converter first.
Datums. Datum shifts are not applied. For WGS 84, NAD83, ETRS89 and similar datums that is correct to within about a metre or two. If your shapefile uses an older local datum, the page shows a warning, because the result can be up to a few hundred metres off the true position.
Common problems and how to fix them
The shapes appear in the wrong place, or in the ocean
The coordinates and the coordinate system do not match. Most often the .prj file is missing or belongs to a different layer. Include the right .prj file. If the numbers are in metres and there is no .prj, this page stops and tells you, rather than putting the data in the wrong place.
The page says the projection is not supported
Reproject the shapefile to WGS 84 (EPSG:4326) first, in QGIS or with the CRS Converter, then convert the result.
Names show as question marks or strange characters
Include the .cpg file that came with the shapefile. Without it the page uses UTF-8 when the data is valid UTF-8, and Windows-1252 otherwise. Older Windows shapefiles in other languages may need their .cpg to decode correctly.
Field names are cut short
The shapefile format limits field names to 10 characters, so the names are already short inside the file. They are written to the GeoJSON exactly as stored.
Nothing was found in my zip
The .zip must contain a .shp file. Folders inside the zip are fine. If it holds several shapefiles you are asked which one to convert.
What this converter does and does not do
- One shapefile at a time. A zip with several shapefiles lets you choose one; run the converter again for the next.
- Not supported: MultiPatch (3D surface) shapes, the newer WKT2 style of .prj file, and datum transformations.
- Deleted records (marked in the .dbf) are left out. Records with no shape are counted and left out.
- Runs in your browser. Nothing is uploaded and there is no signup, so the practical size limit is your computer's memory. Very large shapefiles may be slow on a phone.
Shapefile or GeoJSON: what is the difference?
A shapefile is the long-standing GIS exchange format: several files, one geometry type each, any projection, field names limited to 10 characters. GeoJSON is a single JSON text file that web maps, APIs and libraries such as Leaflet and Mapbox read directly. It always uses WGS 84 longitude and latitude and keeps long field names and mixed geometry types. Convert to GeoJSON to put data on a web map or send it to a service. To go the other way, use GeoJSON to Shapefile.
Frequently asked questions
How do I convert a shapefile to GeoJSON?
Drop the zipped shapefile onto the converter, or select the .shp, .dbf and .prj files together. Check the preview, then click Download GeoJSON. The conversion runs in your browser.
Is it free, and do I need an account?
It is free and needs no account or signup. The file is read in your browser and never uploaded to a server.
Do I have to zip the shapefile?
No. You can choose the .shp, .dbf, .prj and .cpg files together, or give it one .zip that contains them.
Why does it need the .prj file?
GeoJSON always uses longitude and latitude, but many shapefiles store metres in a map projection such as UTM. The .prj file says which projection, so the page can convert the coordinates correctly. If your data is already in longitude/latitude, the .prj is optional.
Which coordinate systems can it convert?
Geographic coordinates, Transverse Mercator (every UTM zone and grids based on it), Web Mercator and Mercator, Lambert Conformal Conic and Albers Equal Area. Other projections are refused with a clear message rather than converted wrongly.
Does it change the datum?
No. Datum shifts are not applied. For WGS 84, NAD83, ETRS89 and similar datums that is accurate to about a metre or two. For an older local datum the page shows a warning, because positions can be off by up to a few hundred metres.
Are the attributes kept?
Yes. Every .dbf field becomes a property of its feature, with numbers as numbers, text as text, logical fields as true or false, and dates as text. Empty values become null.
Does it keep holes in polygons?
Yes. Holes become inner rings. Several separate areas in one record become a MultiPolygon. Ring direction is corrected to the GeoJSON standard unless you switch that off.
What does the coordinate precision option do?
It rounds every coordinate to 7, 6, 5 or 4 decimal places to make the file smaller. Seven decimals is about 1 cm, six about 10 cm, five about 1 m and four about 10 m at the equator. The default keeps full precision.
What happens to 3D (Z) shapefiles?
PointZ, PolyLineZ and PolygonZ shapes are read, and the Z values are written as the third coordinate. Untick Keep elevation to write only longitude and latitude. M (measure) values are not written.
What if my zip contains several shapefiles?
The page lists them and converts the one you choose. Convert the others one after another.
Is there a file size limit?
There is no fixed limit, but the work happens in your browser's memory. Shapefiles with hundreds of thousands of features can be slow, especially on a phone.
How do I convert GeoJSON back to a shapefile?
Use GeoJSON to Shapefile, which writes a zipped shapefile with the .shp, .shx, .dbf, .prj and .cpg files.
Is the output valid GeoJSON for Leaflet, Mapbox and QGIS?
Yes. It is a FeatureCollection in WGS 84 longitude/latitude order, with polygon rings oriented as RFC 7946 describes. It was read back with GDAL and GeoPandas to check the geometry and attributes.
Related tools and guides
Need survey data cleaned, projected or mapped at scale? Sagarmekhla GIS Consultancy offers GIS and remote sensing services.
Request a consultationLast updated 2026-10-15. Published by Sagarmekhla GIS Consultancy.