sqlite> select hex(42), cast(x'3432' as typeof(42)) as originalValue; hex(42) originalValue ------- ------------- 3432 42 sqlite> In my case, the type to restore to is always known (BLOB). But I am unable to get the original value from the hex(?) value stored in a table.