GeoJSON is a modern format for web GIS and APIs, while Shapefile is the classic desktop GIS standard. The choice depends on where you'll use the data.
| Criteria | GeoJSON | Shapefile |
|---|---|---|
| Web compatibility | ✓ | ✗ |
| Desktop GIS | ✓ | ✓ |
| Single file | ✓ | ✗ |
| Big data performance | ✗ | ✓ |
| Human-readable | ✓ | ✗ |
For web apps, APIs, Leaflet/Mapbox/OpenLayers, processing in Python/JS.
For ArcGIS, QGIS, government systems, large datasets, legacy workflows.

GeoJSON was designed in 2008 by a working group of developers and standardised by the IETF as RFC 7946 in 2016. It encodes geographic features in JavaScript Object Notation, which made it the default exchange format of web mapping and of most geospatial APIs.
A typical file is a FeatureCollection: an array of features, each with a geometry (Point, LineString, Polygon or their Multi variants) and a free-form properties object. Coordinates are decimal longitude and latitude. There are no styles, no spatial index and no fixed schema — every feature may carry different properties.
Leaflet, MapLibre GL, OpenLayers and D3.js load GeoJSON directly; QGIS, ArcGIS Pro, GDAL/ogr2ogr, GeoPandas and PostGIS import it, and GitHub previews GeoJSON files on a map.
It is readable by humans, parsed by every programming language and needs no companion files. Properties can hold any number of attributes with long names and Unicode values, which makes the format ideal for web APIs and small to medium datasets.
Text encoding makes files big and slow once they reach millions of features, there is no spatial index, and the single fixed coordinate system means projected data must be reprojected. Mixed geometry types in one file confuse desktop tools that expect one type per layer.
osm2cdr writes one FeatureCollection holding every layer of the selected area. Each feature keeps its OpenStreetMap name, type and tags, plus a _layer property naming its source layer — roads, buildings, water, greenery or points of interest — so a single filter splits the data apart again.

The shapefile was introduced by Esri in the early 1990s with ArcView GIS, and Esri published its technical description in 1998. It is not a formal standard, yet three decades of use have made it the most widely accepted exchange format in desktop GIS.
A shapefile is a set of files sharing one base name: .shp holds the geometry, .shx an index into it, .dbf the attribute table in dBASE format, .prj the coordinate system and .cpg the text encoding. Each shapefile stores exactly one geometry type — points, lines or polygons.
ArcGIS, QGIS, MapInfo, Global Mapper, GRASS GIS, GeoPandas, PostGIS (through shp2pgsql) and GDAL read and write shapefiles, and AutoCAD Map 3D and many surveying packages import them.
Support is universal and fast, the structure is simple to implement, and public agencies and contractors routinely request it. The attribute table opens even in tools that know nothing about geometry but understand dBASE.
Field names are capped at ten characters, text fields at 254 characters and each component file at 2 GB. One geometry type per file means a map becomes several shapefiles, and losing a companion file breaks the dataset.
osm2cdr delivers a ZIP in which every layer — roads, buildings, water, greenery, points of interest — sits in its own folder as a complete .shp, .shx, .dbf and .prj set, with a README describing the contents. OpenStreetMap attributes are written in UTF-8, and coordinates are WGS 84.
At the most basic level, GeoJSON is a JSON-based open format for geographic features, while Shapefile is a multi-file vector format created by Esri. On disk, GeoJSON is plain UTF-8 JSON text; Shapefile is binary geometry files plus a dBASE attribute table.
Here is what the comparison table above means in practice, point by point:

In short: choose GeoJSON when the data feeds a web map, an API or a script. Choose Shapefile when the data goes into a desktop GIS workflow or to an agency that asks for shapefiles.
You are adding a layer of local cafés to a Leaflet or MapLibre web map. GeoJSON loads with one line of JavaScript, keeps every OpenStreetMap tag as a property and needs no unpacking, so it is the obvious choice.
A municipal GIS department asks for road and building data for a planning study and says it works in ArcGIS with shapefiles. Sending a shapefile set per layer saves them a conversion step and matches their delivery checklist.
You are cleaning OSM data in Python with GeoPandas before analysis. Either format loads, but GeoJSON keeps long tag names intact, while a shapefile cuts field names to ten characters — which matters as soon as tags like building:levels or addr:housenumber become columns.
When converting GeoJSON to a shapefile, long property names are truncated and may collide, mixed geometry types have to be split into separate files, and text longer than 254 characters is cut. Going from shapefile to GeoJSON, coordinates must end up in WGS 84 to meet RFC 7946, so projected data needs reprojection. Note also that osm2cdr's GeoJSON keeps every layer in one file with a _layer property, whereas its shapefile export already separates layers into folders.
For a quick visual check of either file, drag it into QGIS: both open without settings, and the OSM attributes appear in the attribute table.
On osm2cdr, pick GeoJSON for web maps, APIs and scripts. Pick Shapefile when the recipient's workflow or contract explicitly requires it, or when older desktop GIS tools are involved. If you want a modern single-file alternative to both, GeoPackage is worth a look.
osm2cdr builds GeoJSON and Shapefile directly from OpenStreetMap data — there is no need to download raw OSM extracts or install conversion tools. The steps:
Converter pages related to GeoJSON and Shapefile explain each route in more detail:
GeoJSON is a JSON-based open format for geographic features, whereas Shapefile is a multi-file vector format created by Esri. In the comparison table, GeoJSON is ahead on web compatibility, single file and human-readable; Shapefile is ahead on big data performance.
GeoJSON. It is readable by humans, parsed by every programming language and needs no companion files.
When big data performance matters most. Support is universal and fast, the structure is simple to implement, and public agencies and contractors routinely request it.
Yes. osm2cdr has a dedicated GeoJSON to Shapefile converter page for existing files. If you are starting from OpenStreetMap, export the area straight to Shapefile instead.
GeoJSON files open in Leaflet, MapLibre GL, OpenLayers, QGIS, GDAL and GeoPandas. Shapefile files open in ArcGIS, QGIS, MapInfo, Global Mapper, GRASS GIS and PostGIS.
GeoJSON is fixed by RFC 7946 to WGS 84 longitude and latitude, and osm2cdr follows the rule, so every feature is ready for web maps. Shapefile keeps its coordinate system in the .prj companion file; osm2cdr writes WGS 84 (EPSG:4326) with a matching .prj for every layer.