How to Convert a Shapefile to GeoJSON (and Why You'd Want To)

You have a Shapefile. Your web map wants GeoJSON. This is one of the most common jobs in map work, and it comes up each week in city offices, small firms, and school labs. The source file opens fine in QGIS or ArcGIS, but the web tool on your page will not take it at all.

This guide walks you through the whole job in plain steps. You will learn what each format is, why the move helps, how to convert with our online Shapefile to GeoJSON converter, and how to check that no data was lost on the way. You do not need to install a program or write code.

We use a small parks file as the worked example, so you can check each claim by hand. By the end, you will know how to spot the three faults that spoil most jobs: a lost file part, a wrong coordinate system, and a field name you did not expect.

What Is a Shapefile, in Plain Words?

A Shapefile is not one file. It is a set of files that share one name and work as a team. The .shp file holds the shapes. The .shx file is an index that helps programs find each shape fast. The .dbf file holds the facts about each shape, in a table. A fourth file, .prj, names the coordinate system. You need at least the first three. If one is lost, the set will not open.

The format is old. It dates from the early 1990s, and most map data in the world still moves in this form. City and state offices publish roads, plots of land, and zones as Shapefiles. The U.S. Census Bureau gives out its TIGER/Line maps as Shapefiles. So you will meet this format again and again, even if you never choose it yourself.

The age shows in the rules. Field names can hold just 10 letters. One file holds just one kind of shape, so points and polygons need two files. Text is stored in an old code that can mangle names with marks like é or ü. None of this makes the format bad. It just means you must pack it with care and know its limits.

What Is GeoJSON, in Plain Words?

GeoJSON is one text file. It holds shapes and facts in one place, in a form that web pages read with ease. The text is JSON, the same plain text style that most web apps use to trade data. You can open a GeoJSON file in a text app and read it. Names, numbers, and shapes sit in clear, labeled parts.

Web map tools love GeoJSON. Leaflet, Mapbox, and OpenLayers all take it as a first-class input. That is why it is the default format for maps in a browser. A GeoJSON file also keeps long field names in full, holds more than one fact type with ease, and uses UTF-8 text, so names from any language come through clean.

GeoJSON has one strict rule. Its numbers are always longitude and latitude in WGS 84, the system GPS uses. If your source data uses a different system, the converter must reproject it — that is, work out the new numbers for the new system — as part of the job. Our guide on how to change the coordinate system while you convert explains that step in full.

Words to Know

Five short terms run through this whole guide. Learn them once and the rest will read with ease.

  • Feature. one real thing on the map, such as one park, one road, or one shop. A file can hold many features.
  • Geometry. the shape of a feature. A point is one spot. A line is a path. A polygon is a closed area with an edge.
  • Attribute. a fact about a feature, stored as text or a number. A park has a name. A road has a speed limit. Those facts are attributes.
  • Coordinate system (CRS). the rule that says what the numbers in a file mean. It tells a program where each point sits on Earth. Without it, numbers are just numbers.
  • ZIP file. one packed file that holds many files in it. A Shapefile needs a ZIP, since a Shapefile is three or more files that must travel as one set.

Why Convert at All?

You might ask why you should not just keep the Shapefile. In a desktop GIS program, you can. The need to convert shows up the moment your data must leave that program. Here are the most common cases:

  • You build a web map, and the map library asks for GeoJSON.
  • You send data to a web app or an API, and the other side wants one file, not a set of four.
  • You share data with a team that works in code, and they want text they can read, diff, and store in git.
  • Your field names are longer than 10 letters, and you are tired of names cut short.
  • You work with names in more than one language, and the old text code keeps breaking them.

There is also a case for staying put. If your next tool is ArcGIS and your data is large, a Shapefile or a GeoPackage may serve you better. Our side-by-side look at GeoJSON and Shapefile helps you pick with clear eyes. But if a web map is the goal, GeoJSON is the right target, and the rest of this guide shows the safe way to get there.

A Small Worked Example

Say a parks office sends you parks.zip. In the ZIP you find four files: parks.shp, parks.shx, parks.dbf, and parks.prj. The table in the .dbf part holds three parks. Here is what the data looks like before and after the move:

ParkArea (hectares)In the ShapefileIn the GeoJSON
Riverside Park12.4One row in parks.dbfOne feature with a polygon and two facts
Hilltop Common3.1One row in parks.dbfOne feature with a polygon and two facts
Old Mill Green5.8One row in parks.dbfOne feature with a polygon and two facts

Three parks go in. Three features must come out. That match is the first check you will run on any job, big or small. The shapes stay the same. The facts stay the same. What changes is the package: four files that must travel as a set turn into one file that any web tool can open.

The .prj file says the parks were drawn in a UTM zone system, with numbers in metres. GeoJSON needs degrees. So this job is also a reprojection job, and the converter does both at once. You pick GeoJSON as the output, leave the target as WGS 84, and the numbers are worked out for you.

Keep Your Source Safe

Work on a copy, not on your only file. Save the first file in a safe place and do not change it. If a test goes wrong, you can start again from the clean source. This sounds like a small point, but it saves more work than any other habit in this guide.

Give each test a clear name. A name like test-1 tells you the order of your tries. A name like final-final-2 tells you nothing at all. When you find the settings that work, write them down in a short note next to the files. The next file of the same kind will then take minutes, not an hour.

How to Convert a Shapefile to GeoJSON, Step by Step

These steps use SHP Converter, but the order of the work is the same in any sound tool. Do not skip the checks. Most bad results come from a skipped check, not from a bad tool.

Step 1: Pack the Shapefile parts into one ZIP

Find all the parts with the same name: .shp, .shx, and .dbf at least, plus .prj and .cpg if you have them. Put them in one ZIP file. Keep the names the same inside the ZIP. If you rename one part, the set breaks. If a part is missing, stop and read our fix for a Shapefile that will not open before you go on.

Step 2: Upload the ZIP

Go to the home page and drop the ZIP in the upload box. You can also add the loose parts one by one; the tool groups parts that share a name and tells you at once if a part is missing. Wait for the file summary. It should name the layer, the shape type, and the feature count. Check that count against what you expect.

Step 3: Check the coordinate system note

The summary names the source coordinate system when the .prj file is there. If the tool says the system is not known, your file has no .prj. You can still convert, and the numbers will be copied as they are. But GeoJSON readers will treat those numbers as degrees. If they are in fact metres, the map will be wrong. If you know the source system, type its EPSG code in the Source EPSG box.

Step 4: Choose GeoJSON as the output format

Pick GeoJSON from the format list. Leave the target coordinate system as WGS 84 (EPSG 4326) unless you have a clear reason to change it. Web maps expect WGS 84. A different target will still produce a file, but strict GeoJSON readers may place it in the wrong spot.

Step 5: Run the conversion

Click Convert and wait for the job to end. Small files take a few seconds. Large files take longer, since each shape must be read, reprojected, and written in the new form. The report at the end shows features in, features out, the fields kept, and the bounds of the result. Read it before you download.

Step 6: Check the map preview

The preview draws your data on a map. Look at where it sits. Parks should sit in the right town, on land, in the right streets. Zoom in on one park you know and trace its edge with your eyes. If the shapes sit in the sea or in the wrong state, the coordinate system went wrong, and no other check matters until you fix that.

Step 7: Download and keep the report facts

Download the result ZIP and save it with a clear name. Write down three facts from the report: the feature count, the field names, and the bounds. You will use them in the checks in the next part of this guide. Keep the source ZIP in the same folder, so the pair stays linked.

How to Check Your Result

Never trust a conversion you have not checked. The good news is that a sound check takes just a few minutes, and it is the same each time you work on a Shapefile to GeoJSON job.

First, match the counts. The report shows how many features went in and how many came out. The two counts should be the same. If the output count is lower, a step dropped data, and you should find out why before you share the file.

Next, look at the map preview. Your data should sit in the right town, state, or sea. If it sits in the ocean, or on the wrong side of the world, the coordinate system is the prime suspect. Zoom in on one place you know well and check that roads, parks, or points fall where they should.

Then check the fields. Open the field list in the report and read the names. Make sure the key fields are still there, with the right names and the right kind of values. Pick one feature you know and match each value back to the source by hand.

  • Check two field values by hand. Pick one park and match its name and area to the source table.
  • Check that long field names came through in full. GeoJSON has no 10-letter limit, so a name like playground_type should stay whole.
  • If you plan to go back the other way one day, note that you can turn GeoJSON back into a Shapefile with the same tool.

Last, keep the source file. Save the result with a clear name that holds the date and the format, like parks-geojson-2026-11-07.zip. Keep the source and the result in one folder. If a question comes up next month, you can trace each feature back to where it came from.

Common Mistakes and How to Fix Them

The Map Shows Your Data in the Ocean

This is the classic coordinate system fault. Your source numbers were in metres or feet, but the output was read as degrees. Go back to Step 3. Set the Source EPSG code to the true system of your source file, then run the job again. Do not drag the shapes by hand in a map editor. Fix the system, and every point lands in the right place at once.

The Upload Fails or the Layer Is Empty

A part of the set is missing or has a different name. Open the ZIP and list the parts. The .shp, .shx, and .dbf files must share one base name, letter for letter. A file named Parks.shp next to parks.dbf can fail on strict systems, since some treat upper and lower case as different names.

Field Names Look Short or Odd

That is a sign the file went through a Shapefile step you did not expect, or the source itself had short names. GeoJSON keeps full names, so check the source table. If the source names are whole and the output names are cut, run the job again and read the report: it lists each field it kept.

Text Has Strange Marks in It

Names with letters like é, ü, or ñ can break if the source .dbf used an old text code and no .cpg file named it. If your ZIP holds a .cpg file, keep it in the set. If not, and the names matter, ask the sender for the file again with UTF-8 text, or fix the few names by hand in the output.

The GeoJSON File Is Much Larger Than the ZIP

This is normal. GeoJSON is plain text, and text takes more room than the packed binary form of a Shapefile. A file two to five times the size is common. If size is a real problem for your web page, serve the file zipped, or store the master copy as a GeoPackage and export GeoJSON only when you need it.

What the Plans Allow

You can start free. The Free plan gives you 5 conversions a month, with one file at a time and a size limit of 25 MB per file. That is enough to test a parks file or a city layer on real data and check the result with care.

Starter costs $9 a month. It gives you 200 conversions a month, files up to 500 MB, and batch jobs of up to 10 files at once. Pro costs $19 a month. It gives you 1,000 conversions a month, files up to 5 GB, batch jobs of up to 25 files, and API access for work you run on a schedule. You can see the full plan limits on the pricing page before you pick.

All plans work the same way at the core. You get a map preview, feature counts in and out, and a clear report if a file has a fault. Your files are kept for 72 hours so you can download them again, and then they are deleted.

Frequently Asked Questions

Do I lose data when I convert a Shapefile to GeoJSON?

No, not if the job runs clean. Shapes and facts both carry over. The report shows the counts and field names, so you can prove it. The one thing to watch is the coordinate system: the move to degrees must be done right, or the shapes land in the wrong place while the facts stay fine.

Can one Shapefile hold points and polygons at once?

No. One Shapefile holds one kind of shape. If your source ZIP holds two layers, each layer converts on its own. GeoJSON can hold mixed shapes in one file, but a clean habit is to keep one kind per file, so counts stay easy to check.

What if my Shapefile has no .prj file?

The tool can still convert it, and it copies the numbers as they are. The risk is that readers guess the system wrong. If you know the system, type its EPSG code as the source. If you do not know it, ask the sender. A guessed system can put your data in the wrong county or the wrong ocean.

How big a file can I convert for free?

The Free plan takes files up to 25 MB, for 5 conversions a month. Paid plans go much higher, up to 500 MB on Starter and 5 GB on Pro. Large files also take more time, so run a small test first to check your settings, then run the full file.

Can I convert the GeoJSON back to a Shapefile later?

Yes. The move works both ways. Just note the Shapefile limits on the way back: field names shrink to 10 letters, and one file holds one shape type. Keep the GeoJSON as your master copy, and treat the Shapefile as a copy made for one tool.

Final Checklist

Run through this short list before you share your file:

  • The feature count out matches the feature count in.
  • The map preview puts the data in the right place.
  • Field names are whole, and two values match the source by hand.
  • The source ZIP and the result are saved in one folder.
  • The file name shows the format and the date.

If each point passes, your file is ready to use.

References

← All guides