How GeoJSON Simplification Works
This tool uses the Douglas-Peucker algorithm (also known as the Ramer-Douglas-Peucker algorithm) to reduce the number of vertices in GeoJSON geometries while preserving the overall shape. The algorithm works by recursively finding the point farthest from a line segment between two endpoints. If that distance is below the tolerance threshold, all intermediate points are removed. If it exceeds the threshold, the farthest point is kept and the process recurses on both sub-segments.
Simplification is applied to LineString and Polygon geometries. Point features pass through unchanged since they have no vertices to remove. The tool uses the "high quality" variant of the algorithm, which processes each ring and segment independently for better shape preservation.
Choosing the Right Tolerance
The tolerance value represents the maximum distance (in degrees) that a simplified edge can deviate from the original geometry. As a rough guide:
- 0.001 — minimal simplification, good for city-level detail. A polygon with 10,000 vertices might reduce to 5,000.
- 0.01 — moderate simplification, suitable for country-level maps. File sizes typically shrink by 50-70%.
- 0.05–0.1 — aggressive simplification, best for world-overview maps. Complex coastlines become smooth curves.
Watch the map preview as you adjust the slider to find the right balance between file size and visual fidelity for your use case. The percentage reduction is shown in the status bar after each adjustment.
When to Simplify GeoJSON
- Reducing file size for faster loading in web mapping applications
- Improving rendering performance on mobile devices
- Creating overview tiles or thumbnails from detailed boundary data
- Preparing data for APIs with payload size limits
- Building zoom-dependent layers where lower zoom levels use simpler geometry
Simplification Pitfalls
Over-simplification can introduce geometry errors. Watch for these common issues:
- Self-intersecting polygons — aggressive simplification can cause polygon edges to cross each other, creating invalid geometry
- Topology breaks — adjacent polygons that shared a boundary before simplification may develop gaps or overlaps afterward, since each polygon is simplified independently
- Small feature loss — very small islands, enclaves, or narrow peninsulas may collapse to zero area and disappear entirely
After simplifying, validate the result with the validator and visually check the map for artifacts. For topology-preserving simplification, consider using TopoJSON, which simplifies shared boundaries together.
Programmatic Equivalent
In JavaScript with Turf.js:
JavaScriptconst simplified = turf.simplify(featureCollection, {
tolerance: 0.01,
highQuality: true
});For additional file size reduction, combine simplification with coordinate precision reduction (turf.truncate()) or whitespace stripping (JSON.stringify(geojson)). For a comprehensive approach, see the file size optimization guide.
Frequently asked questions
- What does the tolerance number actually represent?
- The tolerance is in decimal degrees of longitude/latitude — the same units as your input coordinates. At the equator, 0.01° works out to roughly 1.1 km; at 45° latitude, 0.01° of longitude is about 0.78 km. To start from a metres-based target, divide by ~111,000 to get a starting tolerance.
- Will simplification change feature properties?
- No. Only geometry coordinates are touched. Every Feature's properties object passes through unchanged, and feature IDs are preserved. The FeatureCollection's bbox is also left as you pasted it — recompute it with the bounding box calculator if you need a fresh value.
- Can I simplify a Point feature?
- No. Points have no edges or vertices to remove and pass through the simplifier unchanged. Simplification only affects LineString, Polygon, MultiLineString, and MultiPolygon geometries. A FeatureCollection containing both Points and Polygons will simplify the polygons and pass the points through.
- What is the difference between Douglas–Peucker and Visvalingam?
- Douglas–Peucker (this tool's algorithm) removes vertices that fall close to a straight line between their neighbours. Visvalingam removes the vertex whose triangle with its neighbours contributes least to the polygon's area, which preserves area better for choropleth maps. For most use cases the visual difference is small at moderate tolerance.
- How do I simplify large files from the command line?
- For files above ~50 MB or batch jobs, use Mapshaper: mapshaper input.geojson -simplify 5% keep-shapes -o output.geojson. The keep-shapes flag prevents tiny features from disappearing, and Mapshaper's percentage-based simplification removes the need to convert decimal-degree tolerances. Mapshaper is also the standard tool for topology-aware simplification across shared boundaries.