# How to gzip and base64 encode a value of a variable

**URL:** <https://community.postman.com/t/how-to-gzip-and-base64-encode-a-value-of-a-variable/21298>\
**Category:** Help Hub\
**Created:** [March 12, 2021, 7:48am UTC](https://community.postman.com/t/how-to-gzip-and-base64-encode-a-value-of-a-variable/21298 "2021-03-12T07:48:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![elchicco392](https://avatars.discourse-cdn.com/v4/letter/e/a6a055/32.png) [@elchicco392](https://community.postman.com/u/elchicco392)\
**Post date:** [March 12, 2021, 7:48am UTC](https://community.postman.com/t/how-to-gzip-and-base64-encode-a-value-of-a-variable/21298/1 "2021-03-12T07:48:48Z")

</div>

Hi all,  
I need some help on this problem.  
I’ve got a token extracted from a response and need to gzip and encode it for futher actions.  
I found the embedded way to encode via js-lib in postman - but no clue how to gzip the value.

Thanks in advance.  
Kind regards  
Stephan

---

<div class="post-metadata">

**Author:** ![jency.stella19](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/jency.stella19/32/16633_2.png) [@jency.stella19](https://community.postman.com/u/jency.stella19)\
**Post date:** [March 16, 2021, 4:44am UTC](https://community.postman.com/t/how-to-gzip-and-base64-encode-a-value-of-a-variable/21298/2 "2021-03-16T04:44:57Z")

</div>

Hi @elchicco392 Welcome to the community 🙂

Some useful links that might be helpful to you

> <https://github.com/postmanlabs/postman-app-support/issues/2622>
>
> I needed to gzip all the json responses in our app because of the large amount of data we have. Any...

> <https://stackoverflow.com/questions/43844192/encoding-variables-using-postman>

---

<div class="post-metadata">

**Author:** ![elchicco392](https://avatars.discourse-cdn.com/v4/letter/e/a6a055/32.png) [@elchicco392](https://community.postman.com/u/elchicco392)\
**Post date:** [March 18, 2021, 7:56am UTC](https://community.postman.com/t/how-to-gzip-and-base64-encode-a-value-of-a-variable/21298/3 "2021-03-18T07:56:52Z")

</div>

Hi @jency.stella19 . Thank you for helping. In need to zip the value of a variable inside the body. It is already decoded but need to be zipped as well.  
Thank you for helping.  
Kind regards  
Stephan
