GeoJSON to TopoJSON Converter
Reduces bundle size for web maps shipping dense polygon networks (country, state, county boundaries).
Convert GeoJSON to TopoJSON now
Common issues converting GeoJSON to TopoJSON
- TopoJSON is lossy on coordinate precision due to quantization. The default is fine for country/state/county maps rendered above street level.
- Savings come from shared boundaries and delta encoding. Small datasets (few hundred points, isolated polygons) may actually grow slightly after conversion.
- Most JS libraries need topojson-client to expand to GeoJSON before rendering. D3-geo renders TopoJSON natively.
- Feature 'id' fields are preserved in the topology objects and survive expansion roundtrips.
Frequently asked questions
How much smaller will my file be?
Typically 70–90% on dense polygon networks (country/county/admin boundaries). Small or sparse datasets save less and can occasionally grow.
Is the conversion lossless?
The topology itself is lossless, but quantization (snapping coordinates to a grid) does round off precision. Default quantization is appropriate for country-level maps.
Which rendering libraries support TopoJSON directly?
D3-geo is the primary one. Leaflet, Mapbox GL, and deck.gl need topojson-client to expand to GeoJSON first; topojson-client is tiny (<10KB gzipped).
Should I use TopoJSON for a few hundred points?
Probably not. The topology overhead outweighs the savings on sparse datasets. TopoJSON shines on dense polygon networks with shared boundaries.