WKB to GeoJSON Converter
Inspect or debug binary geometry output from a spatial database in a format you can actually read and render.
Common issues converting WKB to GeoJSON
- Concatenated WKB records are read sequentially — the file is parsed as a stream of back-to-back WKB blobs, mirroring the typical PostGIS export pattern. Single-record WKB also works.
- EWKB with an SRID flag is decoded — the SRID byte is stripped and the geometry is emitted in WGS 84 coordinates if no reprojection is requested.
- Hex-encoded WKB (text strings) is not auto-detected. Convert to raw binary first, or use the WKT pair instead for text-based geometry.
- The output FeatureCollection has empty properties for every feature; WKB carries no attribute data.
Frequently asked questions
Does it support PostGIS EWKB?
Yes. The EWKB high-bit type modifiers (0x80000000 for Z, 0x40000000 for M, 0x20000000 for SRID) are decoded. SRID is read but the output is always WGS 84 unless you specify a target CRS.
Can I paste hex-encoded WKB?
Not directly. Hex-encoded geometry is what `ST_AsText()` competes with — convert via `decode('...', 'hex')` in PostGIS, or use the WKT converter if your source is text.
What if my WKB file has mixed geometry types?
That's the normal case. Each record is parsed independently; the output FeatureCollection holds whatever geometry types appear in order.
How do I attach attributes?
WKB has none. If you have a parallel CSV of attributes keyed by row order, join after conversion. For round-tripping with attributes, use Shapefile, FlatGeobuf, or GeoParquet instead.