Postman How to Encode a String to Base64 in Postman? To encode a string to Base64 in Postman, first write a JavaScript script, then send the request in the test script, and finally view the encoded value.