Shapefile Viewer & Converter (to GeoJSON)
Convert Shapefile (.shp, .dbf, .prj) to GeoJSON format in your browser
Shapefile to GeoJSON Converter Online
If you need to convert a shapefile to GeoJSON, this is a free, browser-based shp to GeoJSON converter that handles the entire ESRI Shapefile bundle (.shp, .dbf, .shx, .prj) and emits a clean RFC 7946 GeoJSON FeatureCollection. Drop your zipped shapefile in, see it rendered on a live map, browse the attribute table, and download the converted file. Nothing is uploaded β all conversion happens locally in your browser, which makes this a privacy-first alternative to online services that route your data through their servers.
The ESRI Shapefile is the most widely exchanged vector format in professional GIS, but it is awkward to work with on the web. It ships as a bundle of binary files glued together by a common base name, almost no JavaScript mapping library can read it natively, and its quirks (10-character field name limit, single geometry type per file, 2 GB cap) make it a poor fit for modern web mapping. GeoJSON solves all of these problems with a single human-readable JSON document, which is why every modern web mapping library β Leaflet, MapLibre GL, Mapbox GL JS, OpenLayers, deck.gl β speaks it natively.
This converter is the bridge: drop a shapefile in, get GeoJSON out, ready to drop into your web map, your D3 visualisation, your Jupyter notebook, or any tool that supports the format.
How Shapefile Conversion Works
A shapefile is a small constellation of files that share a common base name. The .shp holds geometry as a stream of records, each preceded by a record header and a shape type byte. The .dbf is an old dBase IV table that holds the attribute records, one row per geometry. The .shx is a positional index that lets readers jump directly to record N without scanning the whole file. The .prj is an optional WKT string describing the coordinate reference system. A .cpg file may be present to specify the .dbf character encoding, and .sbn/.sbx/.qix files hold spatial indices that the converter ignores.
The converter unpacks the bundle (or zip), reads each component in parallel, pairs every geometry with its corresponding .dbf row, parses the .prj into a Proj4 definition, and reprojects the coordinates from the source CRS to WGS84 (EPSG:4326) on the fly. Each shapefile record becomes one GeoJSON Feature with a geometry field and a properties object holding the attributes.
Geometry Type Mapping
Shapefile shape types translate cleanly to GeoJSON: Point β Point, PolyLine β LineString or MultiLineString, Polygon β Polygon or MultiPolygon, MultiPoint β MultiPoint. Z and M (3D and measured) variants are flattened to plain 2D unless explicitly preserved. The converter handles the subtle gotcha that shapefile polygons use clockwise outer rings while GeoJSON uses counter-clockwise β it rewinds rings automatically so the output is RFC 7946 compliant.
Attribute Encoding
The .dbf table predates Unicode and uses single-byte encodings unless overridden by a .cpg file. The converter defaults to UTF-8 with fallback to Latin-1 for legacy data. If you see garbled accents or Cyrillic in the output, supply a .cpg file or rerun with the correct codepage.
Practical Applications
Government Open Data
Municipal, state, and federal open-data portals overwhelmingly distribute parcels, zoning, road centrelines, and administrative boundaries as zipped shapefiles. Converting them to GeoJSON makes the data immediately usable in web maps, dashboards, and Jupyter notebooks. A planner downloading a city's parcel layer can be looking at the data in their browser within seconds.
Environmental Consulting and Permitting
Ecologists exchanging habitat boundaries with regulators often receive shapefiles produced by ArcGIS Pro. Converting to GeoJSON lets them embed the polygons directly in HTML reports, share them via Slack, or push them into a web map for stakeholder review.
Web Mapping Pipelines
Front-end developers building Leaflet, MapLibre, or Mapbox maps need their data in GeoJSON, vector tiles, or both. The shapefile-to-GeoJSON conversion is the first step in nearly every web cartography pipeline that starts from desktop GIS data.
Academic Research
Graduate students downloading historical Census TIGER/Line shapefiles, OpenStreetMap extracts in shapefile form, or natural-history museum specimen records can convert and visualise the data without installing desktop GIS software.
Disaster Response and Humanitarian Mapping
Response teams receiving incident perimeters, evacuation zones, and damage assessments from federal agencies need the data in a format their volunteer mappers can use. GeoJSON is universally readable; shapefiles are not.
Real Estate, Logistics, and Site Selection
Property data, delivery zones, and trade areas frequently arrive as shapefiles from GIS departments. Converting to GeoJSON puts them within reach of business intelligence dashboards and BI-friendly analytics tools.
Cartographic Design
Illustrators using D3 or Observable to build editorial maps prefer GeoJSON because they can stream it directly into their visualisation code without an intermediate parsing step.
Step-by-Step Workflow in gis.tools
- Zip your shapefile components together (.shp, .dbf, .shx, .prj, plus .cpg if you have non-ASCII attributes).
- Drag the ZIP onto the converter's drop zone, or use the file picker to select it.
- Wait a moment for the parser to read the bundle and reproject features to WGS84.
- Inspect the rendered map to verify your features look correct in the right place.
- Browse the attribute table to confirm field names, types, and values.
- Click Download GeoJSON to save the converted file to disk.
- Optionally, hand the data off to other gis.tools utilities like the GeoJSON Simplifier or GeoJSON Validator & Fixer for further processing.
Worked Example
A web designer needs to add a US state boundaries layer to a marketing dashboard. They download cb_2023_us_state_500k.zip from the Census Bureau (a generalised state boundaries shapefile). Dropping it into the converter, they see all 56 states and territories appear on the map. The .prj declares NAD83 latitude/longitude. The attribute table shows STATEFP, STUSPS, NAME, and ALAND columns.
The resulting GeoJSON file is 2.4 MB β too large for a fast-loading dashboard. They send it through the GeoJSON Simplifier at a generous tolerance, dropping the file size to 380 KB while keeping the silhouette recognisable. The final GeoJSON drops cleanly into their MapLibre GL configuration, no server-side processing required.
Common Pitfalls and Gotchas
- Missing .prj file β Without it, the converter cannot reproject and your features may end up in unprojected coordinates somewhere off the coast of West Africa. Always include the .prj.
- Encoding mismatches β A .dbf saved in Windows-1252 with Cyrillic text will look like garbage if read as UTF-8. Provide a .cpg file or rename it manually.
- Truncated field names β Shapefile field names are limited to 10 characters, so a column called
population_densitymight already bepopulationin the .dbf. The converter cannot recover the original names. - Self-intersecting polygons β Shapefile allows topologically invalid geometries that GeoJSON technically also tolerates but that may break downstream tools. Run the result through a validator.
- Mixed Z/M values β Shapefile lets you store XYZM coordinates, which the converter flattens to XY. If you need to preserve elevation, export to a different format.
- Multi-shapefile bundles β A single ZIP can contain several shapefiles with different base names. The converter usually only handles one at a time.
- Large files β A multi-million-feature shapefile may exceed browser memory; preprocess with desktop GDAL/OGR if needed.
Tips for Best Results
- Always zip the full shapefile component set before dropping it in.
- Verify the bounding box on the rendered map matches the country or region you expect.
- Use the GeoJSON Validator & Fixer afterward to catch winding-order, ring closure, or coordinate precision issues.
- For large datasets, run the GeoJSON Simplifier or Coordinate Precision Reducer to keep the output web-friendly.
- If the source CRS is unusual (a state plane projection, a custom datum), double-check the reprojection with the CRS Metadata Inspector.
- For attribute-heavy datasets, the Attribute Table Exporter can spit the table out as CSV without the geometry overhead.
Comparison with Other GIS Approaches
Desktop GIS like QGIS and ArcGIS Pro can convert shapefiles via Save As or Export Features, but they require installation, take seconds to launch, and are overkill for a one-off conversion. The command-line workhorse ogr2ogr (part of GDAL) is the gold standard for batch conversion but assumes you're comfortable with a terminal. Online converters like MyGeodata Cloud and AnyConv work but typically upload your data to a remote server, raising privacy concerns. The browser-based converter on gis.tools occupies the niche where you want speed, privacy, and zero installation, with the trade-off being a practical file size cap of a few hundred megabytes.
Performance Considerations
The converter parses everything in memory using JavaScript and WebAssembly under the hood. A typical desktop browser can handle shapefiles up to 200β300 MB without slowdowns. Beyond that, you'll start hitting memory pressure. Mobile browsers cap out lower, around 50 MB. If your shapefile is gigabytes in size, preprocess it with ogr2ogr first to crop, simplify, or split it into smaller pieces before conversion.
Data Privacy and Browser-Based Processing
Everything happens client-side. Your shapefile is read directly from your file system into your browser tab and never sent to any server. There are no uploads, no temporary files on a backend, no telemetry, and no logs that can be subpoenaed. This makes the tool suitable for confidential parcel records, infrastructure asset inventories, pre-publication research datasets, and any other shapefile you would not feel comfortable uploading to a third-party service.
Related GIS Concepts
RFC 7946 GeoJSON β The IETF specification that standardised GeoJSON in 2016. Among other things, it requires WGS84 coordinates and right-hand rule polygon winding.
Spatial Index β Files like .qix and .sbn that speed up spatial queries on a shapefile. The converter ignores them; GeoJSON has no equivalent on disk.
FlatGeobuf and GeoPackage β Modern alternatives to the shapefile that fix its limitations while staying file-based. They are increasingly common in open-data portals.
Frequently Asked Questions
Can I convert just the .shp file without the rest of the bundle?
Not reliably. Without the .dbf you lose all attributes; without the .prj you lose the CRS. Always include the full bundle.
What's the maximum shapefile size this converter supports?
Practically, a few hundred megabytes on a desktop browser. Beyond that, performance degrades or the browser crashes.
Will the converter preserve my coordinate reference system?
It reprojects to WGS84 (EPSG:4326) for compatibility with web maps. The original CRS is recorded in the metadata if you need it.
Can I convert GeoJSON back to shapefile?
Not in this tool. For GeoJSON-to-shapefile conversion, use ogr2ogr or QGIS, since shapefile's limitations make GeoJSON a strict superset.
Related Tools on gis.tools
Related Tools
View All ToolsLayer Packaging Tool
Package selected layers with style JSON into a downloadable ZIP
Import & ExportGeoTIFF Tiles Preview
Preview GeoTIFF as PNG tiles with client-side tiling
Import & ExportCSV to Points Layer
Build a points layer from CSV with latitude/longitude columns
Import & ExportWKT Viewer & WKB Converter
View and convert Well-Known Text (WKT) and Well-Known Binary (WKB) geometries
Import & ExportGeoJSON Simplifier
Simplify GeoJSON geometries with an adjustable tolerance slider
Import & ExportGPX β GeoJSON Converter
Convert GPS exchange format (GPX) to/from GeoJSON
Import & Export100% client-side processing - your data stays private and never leaves your device