SHP/Shapefile to GeoJSON Converter & Map Viewer
GIS & Geography ToolsUpload a Shapefile (.shp) as a ZIP file and click Convert to transform it to GeoJSON (WGS84) and preview on the map.
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.
| Extension | Required | Description |
|---|---|---|
| .shp | Required | Geometry data (points, lines, polygons) |
| .shx | Required | Spatial index for the geometry |
| .dbf | Required | Attribute data (dBASE format) |
| .prj | Recommended | Coordinate system / projection definition |
| .cpg | Optional | Character encoding specification |
About the Conversion
This tool reads Shapefile ZIP archives and converts them to GeoJSON (WGS84). If a .prj file is included, the coordinates are automatically reprojected to WGS84 (EPSG:4326). Attribute data from the .dbf file is preserved in the GeoJSON "properties" field. If no .prj file is present, coordinates are assumed to already be in WGS84.
Tips
- Include .shp, .shx, and .dbf files in the ZIP archive — all three are required.
- Always include the .prj file for correct coordinate system transformation.
- If attribute data contains non-ASCII characters, include a .cpg file specifying the encoding (e.g., UTF-8, Shift_JIS).
- The converted GeoJSON files can be downloaded and used in QGIS, Leaflet, Mapbox, and other GIS tools.
Glossary
- Shapefile
- 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.
- 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 Zone 9). 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: At minimum, include .shp, .shx, and .dbf files. We strongly recommend also including .prj (coordinate system) and .cpg (character encoding) for correct results. All files must share the same base name.
- 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 tool assumes coordinates are already in WGS84.
- Q: How large a Shapefile can be converted?
- A: Since all processing happens in the browser, the practical limit depends on your device's memory. Files up to around 50MB typically work well. For very large datasets, consider using desktop tools like QGIS or ogr2ogr.