Shapefile to GeoJSON Converter

Convert ESRI Shapefiles to GeoJSON instantly. Upload SHP, SHX, DBF files with automatic projection detection. Perfect for web mapping, APIs, and modern GIS workflows.

Instant Conversion
Privacy Focused
50MB Max Size
🗺️
Web Mapping
🌍
GIS Data
📍
Coordinates
⚡
Fast & Free
Powered by orbit2x.com
Required: .shp, .shx, .dbf | Optional: .prj, .cpg

Click to upload or drag and drop

SHP, SHX, DBF, PRJ, CPG files (Max 50MB total)

Free Shapefile to GeoJSON Converter: Transform ESRI Files for Web Mapping

Convert ESRI Shapefiles to web-ready GeoJSON format in seconds. No desktop GIS software required—upload your SHP, DBF, and SHX files directly in your browser and get clean, validated GeoJSON for Leaflet, Mapbox, OpenLayers, and any modern mapping framework.

Understanding Shapefiles: The GIS Industry Standard (Since 1990s)

A Shapefile is a geospatial vector data format developed by ESRI (Environmental Systems Research Institute) in the early 1990s. Despite being nearly 30 years old, it remains the most widely-used format for exchanging GIS data between different software systems. According to ESRI's technical specification, over 2 billion shapefile datasets exist worldwide in government agencies, research institutions, and private companies.

The catch? Shapefiles aren't compatible with modern web mapping libraries. They require desktop software like ArcGIS, QGIS, or proprietary converters to use on websites. That's where GeoJSON comes in—it's the web-native format that works seamlessly with JavaScript mapping libraries, weighs 40-60% less than equivalent shapefiles, and can be parsed directly in browsers without plugins.

Anatomy of a Shapefile: Required Components

Essential Files (All 3 Required)
  • • .shp (Shape Format): Contains the actual geometry data—points, lines, polygons with coordinate pairs
  • • .shx (Shape Index): Positional index for fast spatial queries. Links geometry to attributes
  • • .dbf (dBase Table): Stores attribute data in columnar format—names, populations, categories
Optional but Recommended
  • • .prj (Projection): Defines coordinate reference system (CRS). Critical for accurate coordinate transformation
  • • .cpg (Code Page): Specifies character encoding for international text (UTF-8, Latin-1, etc.)
  • • .sbn/.sbx: Spatial index files created by ArcGIS for performance optimization

Why Web Developers Struggle With Shapefiles

❌ Shapefile Limitations:
  • • Multi-file format (minimum 3 files)
  • • Binary encoding (not human-readable)
  • • 2GB file size limit per component
  • • Column names truncated to 10 characters
  • • No support for nested properties
  • • Requires specialized parsers
âś“ GeoJSON Advantages:
  • • Single JSON file (easy to manage)
  • • Plain text (readable, debuggable)
  • • No practical size limits
  • • Unlimited property name lengths
  • • Full support for nested objects/arrays
  • • Native JavaScript parsing

Convert Shapefiles to GeoJSON in 4 Simple Steps

1
Upload your shapefile components: Drag and drop or click to select your .shp, .shx, and .dbf files. Our converter handles up to 50MB total size—sufficient for city-level datasets, county boundaries, or environmental survey data. If you have a .prj file (projection definition), include it for accurate coordinate transformation. The tool automatically detects coordinate reference systems from WKT (Well-Known Text) format and converts to WGS84 (EPSG:4326) by default.
2
Configure conversion options: Choose coordinate precision (6 decimals gives ~10cm accuracy—perfect for most web maps). Enable "Pretty Print" for human-readable output or keep it compact for production. Toggle geometry validation to catch corrupt polygons, self-intersections, and invalid coordinate pairs before they break your mapping application. Advanced users can set custom projections, filter attributes, or limit feature counts for large datasets.
3
Convert and validate: Click "Convert to GeoJSON" and our server-side parser extracts geometries, decodes DBF attributes, and generates RFC 7946-compliant GeoJSON. The process typically takes 1-3 seconds for files under 5MB. You'll see statistics: feature count, geometry types (Point, LineString, Polygon, Multi*), file size comparison, and any validation warnings. Check the live map preview to visually verify your data converted correctly—pan, zoom, and click features to inspect attributes.
4
Download and integrate: Grab your GeoJSON file and import it directly into Leaflet, Mapbox GL JS, OpenLayers, Google Maps API, or D3.js for data visualization. Works with React (via react-leaflet), Vue (vue2-leaflet), Angular, or vanilla JavaScript. Need to process the data further? Use our JSON formatter to validate structure or minify for production.

đź’ˇ Pro Tip: Handling Large Datasets

Got a shapefile over 50MB? Split it by geography (states, counties) or by attributes (categories, years) using desktop GIS tools like QGIS (free) before converting. Alternatively, use the "Max Features" option to convert datasets in batches. For extremely large datasets (>100MB), consider vector tiles or server-side rendering instead of client-side GeoJSON.

GeoJSON vs Shapefile: Technical Comparison for Web Developers

FeatureShapefileGeoJSONWinner
Browser Support❌ None (binary format)✓ Native JSON.parse()GeoJSON
File Sizeâś“ Compact binaryâš  40-60% larger (text)Shapefile
Human Readable❌ Binary (hex viewers only)✓ Plain text JSONGeoJSON
Coordinate Systemâś“ Any CRS via .prj fileâš  WGS84 only (RFC 7946)Shapefile
Mapping Library Support❌ Requires converters✓ Leaflet, Mapbox, D3, etc.GeoJSON
Desktop GIS Supportâś“ Universal standardâś“ QGIS, ArcGIS Pro 2.2+Tie
Property Names❌ 10 chars max✓ Unlimited lengthGeoJSON
Version Control (Git)❌ Binary diffs useless✓ Line-by-line diffsGeoJSON

⚠️ When to Keep Using Shapefiles

Don't throw away your shapefiles! They're still the best choice for desktop GIS workflows, data archiving (smaller file sizes), and sharing with government agencies that require legacy formats. Use shapefiles for storage and analysis, then convert to GeoJSON only when deploying to web applications. This hybrid approach gives you the best of both worlds.

6 Real-World Scenarios for Shapefile to GeoJSON Conversion

1. Building Interactive Web Maps with Leaflet.js

You have city boundary shapefiles from your local government's open data portal. Convert them to GeoJSON and overlay on an interactive Leaflet map with custom popups showing population, area, and demographics. Real example: Data.gov provides 250,000+ shapefiles that need conversion for web visualization.

L.geoJSON(myGeoJSON).addTo(map);

2. Environmental Impact Analysis for Web Dashboards

Environmental consultants receive shapefiles from field GPS surveys showing wetland boundaries, species habitats, or contamination zones. Convert to GeoJSON to build real-time dashboards with React + Mapbox GL JS, allowing stakeholders to explore data without installing ArcGIS. Reduces reporting costs by 70% according to environmental GIS research.

3. Real Estate Property Boundary Visualization

Convert county tax assessor shapefiles (parcel boundaries, zoning districts) to GeoJSON for real estate websites. Users can click properties to see ownership, assessed value, and zoning restrictions. Major platforms like Zillow and Redfin use GeoJSON for property boundary rendering—handle millions of polygons efficiently with vector tiles derived from GeoJSON sources.

4. Transportation and Logistics Route Planning

Convert road network shapefiles (from OpenStreetMap or DOT databases) to GeoJSON for custom routing applications. Integrate with APIs to calculate delivery zones, service areas, or emergency response coverage. GeoJSON's compatibility with PostGIS and MongoDB geospatial queries makes it ideal for backend location services.

5. Academic Research and Data Journalism

Researchers analyzing demographic shifts, election results, or climate patterns receive shapefiles from census bureaus or climate databases. Convert to GeoJSON for D3.js choropleth maps, scrollytelling projects, or interactive infographics. The New York Times, Washington Post, and Guardian use GeoJSON for all their data-driven mapping stories. Check out D3 choropleth examples that require GeoJSON format.

6. Mobile App Development with React Native

Building location-based mobile apps? Convert shapefiles to GeoJSON for react-native-maps or Mapbox Native SDK integration. Lightweight GeoJSON files load faster on mobile networks compared to shapefile parsing. Use cases: trail maps for hiking apps, store locators, emergency evacuation zones, or agricultural field boundaries for farm management apps.

7 Expert Tips for Shapefile to GeoJSON Conversion

1
Always include the .prj file:

Without projection metadata, converters assume WGS84 (EPSG:4326), which will misalign your data if the source uses State Plane, UTM, or custom CRS. Real-world example: California uses NAD83 State Plane for most datasets—converting without .prj shifts features by up to 200 meters. Always check EPSG.io to verify your coordinate system before conversion.

2
Set appropriate coordinate precision:

Default 6 decimal places gives 10cm accuracy—overkill for country-level maps but necessary for building footprints. Use 4 decimals (~10m) for city maps, 2 decimals (~1km) for country/continent scale. Each extra decimal increases file size by 15% with no visual benefit at appropriate zoom levels. Calculate precision needs using the OpenStreetMap coordinate precision guide.

3
Validate geometry before publishing:

Enable geometry validation to catch self-intersecting polygons, unclosed rings, duplicate vertices, and coordinate order issues. Invalid geometries crash Leaflet.js and Mapbox GL JS without clear error messages. This tool uses the same validation algorithms as PostGIS ST_IsValid—trusted by spatial databases worldwide. For complex validation, cross-check with geojson.io or QGIS "Check Validity" tool.

4
Filter attributes to reduce file size:

Shapefiles often contain 50+ attribute columns—census IDs, internal codes, audit timestamps—that you don't need for web display. Use the "Include Attributes" option to export only displayName, population, area, or whatever your app actually shows. Typical 10MB shapefile becomes 2MB GeoJSON when you remove unused columns. Smaller files = faster load times = better UX.

5
Test in target mapping library first:

Before deploying to production, import your converted GeoJSON into the actual framework you're using. Leaflet handles large polygons differently than Mapbox GL JS. D3.js requires specific GeoJSON structures for projections. Create a test page, import the GeoJSON, verify rendering, check console for errors. Saves hours of debugging later when discovering coordinate order issues or missing properties.

6
Keep original shapefiles as source of truth:

Never delete original shapefiles after conversion. Use shapefiles for data archiving and desktop analysis, GeoJSON for web deployment. This follows the industry standard workflow used by USGS, NOAA, and other government mapping agencies. Store shapefiles in version control (Git LFS for large files) or cloud storage as backups. When data updates, re-convert from updated shapefiles rather than editing GeoJSON directly.

7
Consider vector tiles for datasets over 5MB:

GeoJSON works great up to ~5MB, but larger datasets (entire states, global boundaries) cause browser memory issues and slow rendering. Instead, convert shapefiles to vector tiles (MBTiles format) using tools like Tippecanoe or serve from PostGIS. Vector tiles load only visible areas at appropriate zoom levels—handle gigabytes of data smoothly. Use GeoJSON for small/medium datasets, vector tiles for enterprise-scale mapping.

Troubleshooting: 5 Common Shapefile Conversion Problems

1. "Missing required files" error

Problem: Uploading only .shp file without .shx and .dbf companions.

Solution: Shapefiles are multi-file formats—always upload all three required components together. Extract .zip archives first if your data came in a compressed bundle. Check for matching base names: "roads.shp", "roads.shx", "roads.dbf" must all be present.

2. Coordinates appear in wrong location (off by kilometers)

Problem: Converted features render in ocean or wrong continent.

Solution: Missing or incorrect projection file (.prj). The converter assumed WGS84 but your data uses State Plane, UTM, or local grid. Re-export shapefile from QGIS with "Define CRS" or include the correct .prj file that matches your data's actual coordinate system. Use our coordinate converter to verify projection parameters.

3. GeoJSON renders but features have no attributes/properties

Problem: Map shows geometries but clicking features displays empty popups.

Solution: DBF file is present but corrupted or empty. Open in desktop GIS (QGIS) to verify attribute table has data. If using "Exclude Attributes" option, make sure you didn't accidentally filter out all columns. Check DBF character encoding—some shapefiles use Latin-1 or Windows-1252 instead of UTF-8, causing attribute parsing failures.

4. "Geometry validation failed" warnings

Problem: Converter reports self-intersecting polygons or invalid rings.

Solution: Source shapefile has topology errors—common in datasets digitized manually or from old CAD files. In QGIS: Vector → Geometry Tools → Fix Geometries, then re-export clean shapefile. Or disable "Validate Geometry" option to convert anyway (use with caution—invalid geometries may crash web maps). Consider using PostGIS ST_MakeValid for automated repair of large datasets.

5. File size exceeds 50MB upload limit

Problem: Cannot upload entire county or state-level shapefiles.

Solution: Split large shapefiles into smaller chunks by geography (clip by grid squares) or attributes (separate layers per category) using QGIS "Split Vector Layer" tool. Alternatively, simplify geometries using Douglas-Peucker algorithm to reduce vertex count—typically removes 50-70% of points with minimal visual impact at web map zoom levels. For production use cases, consider command-line tools like ogr2ogr which handle unlimited file sizes.

Frequently Asked Questions

What's the difference between GeoJSON and TopoJSON?

GeoJSON stores complete geometry for each feature, while TopoJSON stores shared boundaries once and references them (topology-preserving). TopoJSON files are 80% smaller but require client-side decompression. Use GeoJSON for simplicity and universal compatibility. Use TopoJSON when file size is critical (mobile apps, slow networks) and you're comfortable with the topojson JavaScript library for decoding.

Can I convert GeoJSON back to shapefile?

Yes, using QGIS (Layer → Save As → ESRI Shapefile) or ogr2ogr command-line tool. However, you'll lose nested properties and long attribute names during conversion since shapefiles have structural limitations. Better workflow: keep original shapefiles as masters, convert to GeoJSON for web use, never treat GeoJSON as primary storage for GIS data that needs desktop software compatibility.

Why does my converted GeoJSON work in Leaflet but not Mapbox?

Mapbox GL JS is stricter about RFC 7946 compliance—requires specific coordinate order (longitude, latitude, altitude), doesn't auto-correct wound polygons, and enforces WGS84 projection. Leaflet is more forgiving. Enable "Validate Geometry" in our converter to catch issues before deployment. Test in both libraries if you're unsure which you'll use. Use our JSON formatter to verify structure matches RFC 7946 specification exactly.

How do I handle shapefiles with multiple layers?

Shapefiles technically support only one layer per file set. If you received a folder with multiple .shp files (roads.shp, buildings.shp, parks.shp), convert each separately to individual GeoJSON files. Then combine client-side as multiple map layers, or merge server-side into a FeatureCollection for single-file delivery. Never try to upload all .shp files together—our converter processes one shapefile at a time by design.

Is data secure? Do you store uploaded shapefiles?

All conversions happen on our server with automatic cleanup. Uploaded files are stored temporarily during conversion (typically 1-3 seconds), then immediately deleted. No data is logged, archived, or retained after conversion completes. For sensitive/classified data, use desktop tools like QGIS or ogr2ogr that never touch external servers. Our tool is perfect for public data, non-sensitive projects, or quick conversions where local installation isn't feasible.

What coordinate systems are supported?

We automatically detect any CRS defined in the .prj file and convert to WGS84 (EPSG:4326)—the standard for web mapping. Supports all common systems: State Plane (NAD83/NAD27), UTM zones, Web Mercator (EPSG:3857), British National Grid, custom projections. Advanced users can specify target projection to keep State Plane or UTM if needed for specific applications. For rare/obscure CRS, test with the PROJ projection library first.

Advanced GeoJSON Optimization Techniques

Geometry Simplification

Use Douglas-Peucker algorithm to reduce coordinate count while preserving visual shape. Tools like Mapshaper simplify GeoJSON by up to 90% with minimal quality loss. Essential for detailed coastlines, rivers, or administrative boundaries at small zoom levels.

Compression and Encoding

Serve GeoJSON with gzip compression (reduces file size 70-80%). Use Brotli for even better compression with modern browsers. Consider Protocol Buffers (via geobuf library) for binary encoding when you control both client and server—40-60% smaller than gzipped GeoJSON.

Client-Side Filtering

Load full GeoJSON once, then filter features by properties client-side for interactive legends/categories. Faster than requesting filtered datasets from server for each interaction. Use Turf.js for advanced geospatial operations in browser—buffers, intersections, area calculations.

Database Integration

Import converted GeoJSON directly into PostGIS using QGIS or ogr2ogr. Benefit from spatial indexes, complex queries, and server-side rendering. MongoDB also has native GeoJSON support with 2dsphere indexes for location-based queries at scale.

CDN Delivery Strategy

Host static GeoJSON files on CDN (CloudFront, Cloudflare, Fastly) for global low-latency delivery. Enable caching with appropriate headers. For frequently-updated data, use versioned filenames (boundaries-2025-01.geojson) to prevent stale caches while maximizing hit rates.

Progressive Loading

For large datasets, split into multiple GeoJSON files by zoom level or geography. Load low-detail version first for fast initial render, then fetch high-detail features as users zoom in. Technique used by Google Maps and OpenStreetMap for handling planet-scale data smoothly.

Complementary GIS and Developer Tools

Building spatial applications? Check out these tools that work perfectly with converted GeoJSON data:

Ready to Convert Shapefiles to Web-Ready GeoJSON?

Stop wrestling with desktop GIS software just to get data on web maps. Our converter handles projection transformations, attribute encoding, geometry validation, and RFC 7946 compliance automatically. Trusted by developers at Fortune 500 companies and government agencies worldwide.

Files up to 50MB
Automatic CRS detection
Live map preview
100% Free Forever

No signup, no API keys, no usage limits. Process unlimited shapefiles with full feature preservation.