TopoJSON to GeoJSON Converter reverses TopoJSON encoding so you can use the data in the many tools that only read plain GeoJSON. It rebuilds each geometry by stitching together the topology’s shared arcs, undoing the delta encoding, and applying the transform to restore real-world coordinates — entirely in your browser with nothing uploaded.
How it works
A TopoJSON topology stores all line segments once in a global arcs array and references them by index from each geometry. Decoding reverses three encoding steps:
- Un-delta. Each arc lists its first point absolutely and every subsequent point as an offset from the previous one. The decoder accumulates these offsets to recover absolute integer coordinates.
- Transform. If the topology has a
transform, each integer pointpbecomespoint = p * scale + translate, converting the quantized grid back to longitude and latitude. - Arc stitching. A geometry’s
arcsare arrays of arc indices. A positive indexiuses arciforwards; a negative index uses arc~i(which is-i - 1) reversed. The decoder concatenates the arcs, dropping the duplicated shared vertex where one arc ends and the next begins.
Why TopoJSON exists and when to convert back
TopoJSON was designed by Mike Bostock (the creator of D3.js) to solve a specific problem with GeoJSON: when two adjacent countries share a border, a plain GeoJSON file stores that border twice — once in each country’s polygon. TopoJSON encodes the shared arc once and references it from both geometries, which reduces file size substantially for administrative boundary data. A typical world countries file is considerably smaller as TopoJSON than as GeoJSON.
The trade-off is compatibility. Most GIS tools, mapping libraries, and data pipelines understand GeoJSON natively. Tools that only support TopoJSON are the exception, not the rule. Converting back to GeoJSON is necessary when:
- Loading data into QGIS, ArcGIS, or other desktop GIS software
- Feeding boundaries into a PostGIS database
- Using Mapbox GL JS or Leaflet without a TopoJSON plugin
- Sharing data with colleagues who expect standard GeoJSON
- Passing geometries to a spatial analysis API
Handling multi-object topologies
A single TopoJSON file often encodes multiple named layers — for example, a US
atlas file might have counties, states, and nation as separate objects in
the same topology, all sharing the same arc pool. The dropdown in this tool lets
you select which object to decode, converting just that layer to a GeoJSON
FeatureCollection while leaving the other layers in the topology unchanged.
If you need all objects decoded, run the tool once per object and combine the resulting FeatureCollections in your pipeline.
Tips and notes
- Polygons in TopoJSON are arrays of rings, and MultiPolygons are arrays of those — the decoder rebuilds the full nesting so the output matches the GeoJSON spec.
- Properties attached to each topology geometry are copied onto the resulting GeoJSON feature, so attributes like country names, FIPS codes, and population figures carry through correctly.
- If the topology lacks a
transform(meaning coordinates are already in longitude/latitude), the decoder skips dequantization and uses the arc values directly — valid per the TopoJSON specification. - Use the companion GeoJSON to TopoJSON tool to compress data when you want smaller file sizes, and this tool to decode it back whenever downstream tooling needs GeoJSON format.