Postman — Covert String to base64

Pavel Saman
Jan 19, 2023

--

Sometimes you need to get base64 encoded string inside Postman. Or decode a base64 encoded string.

I think two easy ways are:

const base64encoded = btoa('stringToEncode'); // c3RyaW5nVG9FbmNvZGU=
const decoded = atob(base64encoded); // stringToEncode

Another way to encode might be:

Buffer.from('stringToEncode').toString('base64'); // c3RyaW5nVG9FbmNvZGU=

--

--