> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usebruno.com/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)

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

## 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/bKrHa_JvyAqCslj1/images/screenshots/script/set-vars.webp?fit=max&auto=format&n=bKrHa_JvyAqCslj1&q=85&s=843110a2ca169ff50b6b062418fbb17d" alt="bru vars" width="2472" height="1070" data-path="images/screenshots/script/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/bKrHa_JvyAqCslj1/images/screenshots/script/set-vars-usage.webp?fit=max&auto=format&n=bKrHa_JvyAqCslj1&q=85&s=20674bd5ca753c7e50df7860ca5a3ca5" alt="Screenshot showing how to use defined variables in the request body" width="2472" height="1070" data-path="images/screenshots/script/set-vars-usage.webp" />

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