Postman — Covert String to base64

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=

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store