Shapefile Viewer & GeoJSON Converter

GIS & Geography Tools

Draws a shapefile on a map and converts it to GeoJSON (WGS84). When the ZIP has no .prj, it asks which datum to read the coordinates in before drawing and converting them. Everything runs in your browser.

Shapefile & GeoJSON Guide

Shapefile Components

A Shapefile is not a single file but a collection of files with the same base name and different extensions. Understanding these components helps ensure successful conversion.

ExtensionRequiredDescription
.shpRequiredGeometry data (points, lines, polygons)
.shxRequiredSpatial index for the geometry
.dbfRequiredAttribute data (dBASE format)
.prjOptionalCoordinate system. Without one, you pick the datum
.cpgOptionalCharacter encoding. Without one, it is read from the .dbf

About the Conversion

The ZIP is read and converted to GeoJSON (WGS84). Attribute data from the .dbf is preserved in the "properties" member, and when the ZIP has no .cpg the encoding is taken from the .dbf header. Coordinates are reprojected from the .prj when one is present. Without a .prj a datum selector appears: coordinates in both datums look like ordinary longitude and latitude, so nothing in the file reveals which one was used. Japanese public data is sometimes published without a .prj in the legacy Tokyo Datum, and the wrong choice shifts every feature by several hundred meters.

Tips

  • The ZIP needs .shp, .shx and .dbf. If any of the three is missing, the file cannot be read.
  • A .prj is used automatically when present. Without one, pick the datum and the coordinates are converted from it to WGS84.
  • A ZIP with no .cpg still reads correctly: the encoding is taken from the .dbf header. Shift_JIS, common in Japanese shapefiles, comes through as it should.
  • A ZIP holding several layers gives you one GeoJSON download per layer.

Tokyo Datum and JGD — why your Shapefile is 464 m off

Japanese public data is sometimes published without a .prj file, recorded in the legacy Tokyo Datum (EPSG:4301) rather than a modern global datum. Coordinates in both look like ordinary longitude and latitude, so nothing in the file reveals which one was used — yet the same coordinates land about 464 m apart in central Tokyo. When a ZIP has no .prj file this tool shows a datum selector: choose a modern global datum (WGS84 / JGD2000 / JGD2011) to use the coordinates as they are, or the Tokyo Datum to reproject them to WGS84. A filename ending in -tky is a good hint that the data is in the legacy datum.

Ring orientation — Shapefile and GeoJSON disagree

A shapefile winds outer rings clockwise and holes counterclockwise. RFC 7946 asks for the opposite: outer rings counterclockwise, holes clockwise. Convert without adjusting and every polygon comes out the wrong way round. MapLibre and Leaflet draw it either way, so the problem is easy to miss, but libraries that treat the data as spherical — d3-geo among them — will render the inverse. This page rewinds rings to match RFC 7946.

Glossary

Shapefile
A shapefile is a widely used geospatial vector data format developed by Esri. A Shapefile consists of multiple files (.shp, .shx, .dbf, .prj, etc.) that together represent geometry, spatial index, attribute data, and coordinate system information. It is the de facto standard for exchanging vector GIS data.
GeoJSON
GeoJSON (Geographic JavaScript Object Notation) is a lightweight data interchange format for representing geographic spatial data. Based on the JSON format, it supports Point, LineString, Polygon, and collection types. Defined by RFC 7946, it is widely used in web mapping applications.
WGS84 (EPSG:4326)
WGS84 (World Geodetic System 1984) is the standard coordinate reference system used by GPS. It defines latitude and longitude on an ellipsoidal model of the Earth. EPSG:4326 is the identifier code for WGS84. GeoJSON requires all coordinates to be in WGS84.
Tokyo Datum (EPSG:4301)
The datum used in Japan until 2002, based on the Bessel ellipsoid. The same place has different longitude and latitude values from those in a modern global datum, and the gap on the ground is several hundred meters — about 464 m in central Tokyo. Current data uses JGD2011, but older shapefiles still carry the legacy datum. Because its values span the same range, it cannot be told apart automatically when a .prj file is missing.
EPSG Code
EPSG codes are numeric identifiers for coordinate reference systems, maintained by the International Association of Oil & Gas Producers. Common examples include EPSG:4326 (WGS84), EPSG:3857 (Web Mercator), and EPSG:2451 (JGD2000 / Japan Plane Rectangular CS IX). The .prj file in a Shapefile defines which coordinate system is used.
dBASE (.dbf)
dBASE is a legacy database file format used by Shapefiles to store attribute data. The .dbf file contains tabular data associated with each geometric feature. While the format is old, it remains essential for Shapefile compatibility and is read by all GIS software.

FAQ

Q: Which files should I include in the ZIP?
A: You need .shp, .shx and .dbf, all sharing the same base name. A .prj (coordinate system) and a .cpg (character encoding) are not required: without a .prj you pick the datum, and without a .cpg the encoding is read from the .dbf header.
Q: Is the coordinate system converted automatically?
A: Yes, if a .prj file is included in the ZIP, coordinates are automatically reprojected to WGS84 (EPSG:4326), the standard for GeoJSON. Without a .prj file the datum cannot be detected, so a selector appears. Choosing a modern global datum (WGS84 / JGD2000 / JGD2011) uses the coordinates as they are; choosing the Tokyo Datum reprojects them to WGS84. The two are indistinguishable by value yet several hundred meters apart — about 464 m in central Tokyo.
Q: How large a Shapefile can be converted?
A: A 1.7 MB archive of Japanese public data holding 38 layers and 47,352 features converts and draws without the page stalling. Since all processing happens in the browser, the practical limit depends on your device's memory, and extremely large datasets may fail to open.
Q: How do I open a SHP file?
A: A Shapefile cannot be inspected on its own — it normally needs GIS software. On this page you select a ZIP containing the .shp, .shx and .dbf files, press Convert, and the data is drawn on the map. No installation, no login, free to use. Files are processed inside your browser and never sent to a server.
Q: Can I view a Shapefile without installing QGIS?
A: Yes. If you want to check what is inside a file, or see the area a dataset someone sent you covers, this page is enough. You will still need QGIS or similar GIS software to edit attributes or run spatial analysis.

Related Tools & Games