Free Online GIS Converter
Convert WKT to WKB (Hex) Online
Well-Known Binary (WKB) is the compact binary representation of OGC geometries used by relational database engines (such as PostGIS, MySQL Spatial, and SpatiaLite) to store spatial geometries on disk with maximum performance and minimal byte footprint.
Input (WKT)
WKB Hex
SQL & Code Example
How to perform this conversion directly in your PostgreSQL / PostGIS database:
-- PostGIS returns WKB hex by default when querying a geometry column directly SELECT geom FROM parcels LIMIT 1; -- Output: 0101000000B81E85EB514253C0...
Frequently Asked Questions
What is the advantage of WKB over WKT?+
WKB is smaller, avoids floating-point decimal string formatting loss, and is processed much faster by database engines because it avoids text parsing.
How do I convert WKB back to readable text in PostgreSQL?+
Use ST_AsText(geom) in your SQL query to serialize binary geometry back into human-readable WKT.
WKT Geometry Reference
Not sure your input is valid? Each geometry type has its own page with syntax rules, the mistake that most often breaks it, and PostGIS and Shapely recipes.