WKT to WKB Converter

Common when moving human-readable WKT into the compact binary form spatial databases store and index.

Convert WKT to WKB now

Common issues converting WKT to WKB

Frequently asked questions

Is WKB smaller than WKT?

Yes — typically 2–4× smaller. Coordinates become 8-byte doubles with no delimiters or decimal text. That compactness is why PostGIS stores geometry as WKB internally.

Can I load the output straight into PostGIS?

Yes. Pass the hex to ST_GeomFromWKB(decode('<hex>','hex')), or ST_GeomFromEWKB if you included an SRID.

Which byte order does the output use?

Little-endian (NDR) — the dominant convention and what PostGIS emits from ST_AsBinary.

Does GEOMETRYCOLLECTION survive?

Yes. WKB represents collections natively, so mixed-type geometries round-trip without being split.

Related conversions