GeoJSON to WKB Converter

The shortest path from a web-mapping dataset to a row in a spatial database — convert once, then bulk-load via psql or your ORM.

Convert GeoJSON to WKB now

Common issues converting GeoJSON to WKB

Frequently asked questions

Is the output EWKB or plain OGC WKB?

Plain OGC WKB. If you need EWKB (PostGIS's internal form with an SRID flag), call ST_SetSRID(ST_GeomFromWKB($1), 4326) at INSERT time.

What endianness does the output use?

Little-endian, which is the de-facto standard among GIS libraries. The first byte of each geometry record is 0x01.

Can I bulk-load WKB into PostGIS?

Yes. Use `COPY table FROM stdin BYTEA` with hex-encoded WKB, or pipe through `ST_GeomFromWKB` in a prepared statement. The output here is raw binary; encode-to-hex if your tooling expects that.

Does the converter preserve Z (elevation)?

Yes. 3D GeoJSON coordinates produce WKB records with the OGC ISO Z-modifier (type code + 1000). Z=0 is written for any feature where the source coordinate has only X/Y.

Related conversions