> ## Documentation Index
> Fetch the complete documentation index at: https://bruno-a6972042-docs-clustered-top-nav-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Vars tab

The **Vars** tab in Bruno allows you to manage variables at different stages of your request lifecycle. You can set and use variables:

* Before the request (Pre Request)
* After receiving the response (Post Response)

<Info>
  Variables are scoped within the request and cannot be accessed outside of it. This ensures clean separation between different requests.
</Info>

## Pre Request Vars

In the **Vars** tab > **Pre Request** variables section, you can write any strings, numbers or any valid JavaScript literal.

Example:

<img src="https://mintcdn.com/bruno-a6972042-docs-clustered-top-nav-v2/BvuRWm3msuj2Grf1/v2/images/screenshots/set-vars.webp?fit=max&auto=format&n=BvuRWm3msuj2Grf1&q=85&s=72a48daf601c3d17396dc2d0ffddc9ef" alt="bru vars" width="2984" height="1580" data-path="v2/images/screenshots/set-vars.webp" />

## Post Response Vars

In the **Vars** tab > **Post Response** variables section, you can write any valid JavaScript expression. The `res` object is available, allowing you to declaratively parse the [response object](/testing/script/response/response-object) and set variables, instead of writing scripts to do the same.

Example:

<img src="https://mintcdn.com/bruno-a6972042-docs-clustered-top-nav-v2/Jq6-mIJ5ByL6QssV/v2/images/screenshots/vars.webp?fit=max&auto=format&n=Jq6-mIJ5ByL6QssV&q=85&s=43611e8983a7c7cd13cb2c17eef75485" alt="Screenshot showing how to use defined variables in the request body" width="2984" height="1580" data-path="v2/images/screenshots/vars.webp" />

For parsing the response, you can checkout the [response query](/testing/script/response/response-query) that allows you to easily query your response.
