Base64 Decode Base64 Encode
More Tools
Other tools: Base64 Image Encoder | Base64 Image Decoder | Url Encoder | Url Decoder

PostgreSQL encode()

Encode binary data to different representation. Supported types are: base64, hex, escape. Escape merely outputs null bytes as \000 and doubles backslashes.

Function

encode(data bytea, type text)

Parameters

bytea - The String to be encoded
text - Encoding type

Return value

text - Returns the Base64 encoded version of bytea.

Example
select encode('base64 encoded string', 'base64');
-----------------------------
YmFzZTY0IGVuY29kZWQgc3RyaW5n
Github

https://github.com/base64encode/examples/blob/master/base64encode.pgsql