GeoJSON to TopoJSON & WKT Converter
Convert GeoJSON into compact TopoJSON or standard WKT. Coordinates stay in longitude, latitude order.
GeoJSON
18 lines · 265 charsTopoJSON
27 lines · 380 chars · bbox [29,41,29,41]Examples
Point round-trip plus WKT
convertGeoJsonJson('{"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[10,20]}}]}'){ wkt: "Feature 1: POINT (10 20)", bbox: [10, 20, 10, 20] }The point survives topology conversion exactly and renders as WKT with its bbox.
Quantized polygon
convertGeoJsonJson(polygonRaw, 1000).topology{ transform present, round-trip error < 0.01 }Quantization adds a topology transform while keeping coordinates within tolerance.
About this tool
GeoJSON TopoJSON Converter bridges formats with convertGeoJson(collection, quantization = 0) and convertGeoJsonJson(raw, quantization): parseGeoJson validates a FeatureCollection, topojson-server builds the Topology, and topojson-client converts it back to a FeatureCollection for round-trip checks.
Each conversion returns { topology, feature, wkt, bbox }: WKT renders Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, and GeometryCollection with Feature N: prefixes, while bbox is the [minX, minY, maxX, maxY] sweep over every finite coordinate.
Quantization is strict and deterministic: 0 means no transform, values below 2 throw, and N >= 2 emits a quantized transform that bounds round-trip error — identical inputs always produce identical TopoJSON strings via formatGeoJsonResult.
How to use this tool
Paste GeoJSON
Provide a FeatureCollection string or object with valid feature geometries.
Set quantization
Keep 0 for exact arcs or pass an integer >= 2 for smaller topology output.
Verify round-trip
Compare topologyToFeature output coordinates and the WKT plus bbox summary.
Use cases
Shrinking map payloads
Quantize shared arcs before serving TopoJSON to web maps.
Validating imports
Catch non-JSON, non-FeatureCollection, and bad-geometry uploads with explicit errors.
Previewing geometry
Read WKT lines and bbox extents without opening a GIS client.
Common mistakes
Mistake:Passing quantization 1 for light compression.
Fix:Only 0 or integers >= 2 are valid — 1 throws a quantization error by design.
Mistake:Expecting quantized coordinates to match exactly.
Fix:Quantization rounds positions, so assert within tolerance instead of deep equality.
Mistake:Feeding a bare Feature or Geometry.
Fix:The converter requires a FeatureCollection with a features array — wrap single features first.
Frequently asked questions
What does this tool do?
It converts a FeatureCollection with convertGeoJsonJson into TopoJSON via topojson-server, converts back with topojson-client, and reports WKT plus a [minX, minY, maxX, maxY] bbox.
How does quantization affect output?
Quantization 0 keeps exact arcs with no transform, integers >= 2 add a transform that bounds round-trip error, and 1 or negative values throw a quantization error.
Is my map data uploaded or stored?
No. Validation, topology building, WKT rendering, and bbox math run entirely in your browser.
Why a FeatureCollection or JSON error?
Only valid JSON FeatureCollection objects with a features array convert — bare Features and malformed JSON throw before any topology work.
Related guides
References & standards
Related tools
.env Secret Safety Linter
Validate .env syntax and spot likely leaked credentials or placeholder secrets.
.gitattributes Generator
Build .gitattributes rules for line endings, Git LFS, GitHub linguist marks and merge drivers — with a one-line explanation for every rule.
.htaccess Generator
Build an Apache .htaccess — HTTPS redirects, rewrites, error pages, security headers, and basic auth
2D Fluid Dynamics & Particle Physics Sandbox
A physics playground with two engines sharing one canvas. The fluid mode runs a real Eulerian Navier-Stokes solver — semi-Lagrangian advection, explicit diffusion, Jacobi pressure projection and vorticity confinement — that you paint with dye and velocity using mouse or touch. The particle mode is a damped Verlet N-body engine with gravity wells, Coulomb attractors and repulsors, spring links, wall restitution and elastic circle collisions. Particle counts adapt to the device (100k target on WebGL2 desktop, 2k-5k on CPU fallback), and every configuration exports as runnable code: a Matter.js world, a PixiJS ticker setup, or a standalone vanilla Canvas engine.
A/B Test Sample Size Calculator
Compute required sample size per variant and test duration from baseline conversion rate, minimum detectable effect, alpha and power.
ABA Routing Number Validator
Validate 9-digit US ABA routing numbers with 3-7-1 Mod-10 breakdown.