WKB (Well-Known Binary Hex)WKT (Well-Known Text)
Map Visualizer →
Free Online GIS Converter

Convert WKB (Hex) to WKT Online

When querying spatial tables without wrapping columns in ST_AsText(), databases return raw hexadecimal WKB strings (e.g., 0101000000...). This tool decodes binary hex into human-readable WKT and visualizes the shape on a real map.

Input (WKB)
WKT

SQL & Code Example

How to perform this conversion directly in your PostgreSQL / PostGIS database:

-- Decode WKB in PostGIS using ST_AsText
SELECT ST_AsText('0101000000B81E85EB514253C0448B6CE7FB1728C0'::geometry);
-- Result: POINT(-77.0363 -12.0468)

Frequently Asked Questions

Why did my database return a long hex string instead of coordinates?+

Spatial databases store geometries in native binary format. When queried directly without ST_AsText(geom), PostgreSQL/PostGIS outputs the hex encoding of the WKB representation.

Can I view decoded WKB on a map?+

Yes. Click "Open on Map" once decoded to plot the geometry directly on our interactive map viewer.

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.

More GIS Converters