# .geojson MIME Type: application/geo+json

> Geographic features — points, lines and polygons — as JSON, standardized by RFC 7946.

- MIME type: `application/geo+json`
- Extensions: .geojson
- Content-Type header: `application/geo+json`
- Compress in transit: yes

## Good to know

- Coordinates are `[longitude, latitude]`, in that order. Swapping them is the classic GeoJSON bug: points land in the wrong hemisphere or in the ocean.
- RFC 7946 fixes the coordinate system to WGS 84, so the old `crs` member is gone.
- Most servers have no `.geojson` mapping. `fetch().then((r) => r.json())` ignores the Content-Type, so map code rarely breaks — but set the type so caches and CDNs compress the file.

## Server configuration

### nginx (inside the types block in mime.types)

```
application/geo+json geojson;
```

### Apache (.htaccess or server config)

```
AddType application/geo+json .geojson
```

### Express

```
res.set("Content-Type", "application/geo+json");
```

### Python

```
import mimetypes

mimetypes.add_type("application/geo+json", ".geojson")
```

### HTML file input

```
<input type="file" accept=".geojson,application/geo+json">
```

## FAQ

### What is the MIME type for .geojson files?

`application/geo+json`.

### What Content-Type header should a .geojson file be served with?

`Content-Type: application/geo+json`. It compresses well, so let the server apply gzip or Brotli.

## Related types

- [.json — application/json](https://www.devkult.com/mime/json.md)
- [.kml — application/vnd.google-earth.kml+xml](https://www.devkult.com/mime/kml.md)
- [.gpx — application/gpx+xml](https://www.devkult.com/mime/gpx.md)

Open the interactive page: https://www.devkult.com/mime/geojson