GeoJSON Bounding Box
Compute the bounding box [minLng, minLat, maxLng, maxLat] of any GeoJSON document — Feature, FeatureCollection, or raw Geometry. Optionally inject the result as the top-level bbox member per RFC 7946 §5. 100% in-browser.
GeoJSON Bounding Box
Before you start
Drop a .geojson file or paste the raw text. The tool computes the axis-aligned bounding box across every coordinate in every geometry — Point, LineString, Polygon, and the Multi* variants, plus nested GeometryCollections. The Copy button gives you a four-element array; the Download with bbox button hands back the original document with a top-level "bbox" member added (or replaced) per the RFC 7946 spec.
Coordinates are read as decimal degrees (WGS84). The math works for any projected coordinate system too — units just won't be lng/lat anymore — but the antimeridian-crossing optimisation in §5.2 of the spec is intentionally not applied here. If your features cross the 180° meridian, the bbox will span the whole world the long way around. That's the conservative behaviour and matches what most GIS libraries do.
How to use it
- Paste your GeoJSON or drop a
.geojsonfile into the left pane. - Click Compute bbox. The right pane shows the four-number array.
- Click Copy bbox array for just the
[minLng, minLat, maxLng, maxLat], or Download with bbox to save the original document with thebboxmember added.
Example
Input:
{
"type": "FeatureCollection",
"features": [
{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [-122.42, 37.77] }, "properties": {} },
{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [-73.98, 40.75] }, "properties": {} }
]
}
Output bbox:
[-122.42, 37.77, -73.98, 40.75]
Tips & common pitfalls
- Order matters. RFC 7946 §5 specifies
[west, south, east, north], i.e.[minLng, minLat, maxLng, maxLat]. Some tools emit[lat, lng]order — this one does not. - Antimeridian crossings. A FeatureCollection that straddles 180°/−180° will produce a bbox that "wraps the long way" rather than two split boxes. If you need the spec-compliant crossing form, post-process the array yourself.
- Empty input. A document with no geometries (e.g. an empty FeatureCollection) returns no bbox — there's nothing to bound.
- Z values are ignored. If your coordinates have a third altitude/elevation entry, the bbox stays 2D. The spec does allow a 6-element 3D bbox, but that's rare in practice and not emitted here.
Related tools
Frequently asked questions
What format is the output?
A four-element JSON array: [minLng, minLat, maxLng, maxLat]. This matches the bbox member defined in RFC 7946 §5 and is what most GIS libraries (Turf, Leaflet, Mapbox GL) expect.
Does it modify my GeoJSON?
Only if you click Download with bbox. That option re-emits the original document with a top-level "bbox" field added (or replaced if one already existed). The Copy button just gives you the array.
Is my data uploaded anywhere?
No. All the math happens in your browser. Your coordinates never leave the tab. See the privacy policy for details.