v13.4+ Confidential variables let you hide the value of an environment variable in the Insomnia interface. This avoids exposing the value if you share your screen, for example. Insomnia replaces the value with •••••• in previews, generated code, the timeline, and the console. Insomnia still uses the real value when it sends a request or runs a script.
Unlike secret variables, Insomnia doesn’t encrypt confidential variables, and they don’t require a vault key. You reference them like a standard environment variable.
Confidential variables reduce accidental exposure, not access. They don’t stop someone with access to the variable from retrieving its value, for example by sending a request to a server they control. The value is also stored in plain text on disk, and in your response history if it was visible when you sent the request. You can clear the history and the logs:
- At general level: In the toolbar, select Tools and Clear All Response History.
- For the collection: Go to Settings > Actions > Clear Response History.
- For the request: Click the arrow showing the time since the last request was sent, and either delete the current response or clear the history.
To mark a variable as confidential or make it visible again, navigate to an environment in table mode and click the lock icon beside a variable.
Notes
- The lock icon isn’t available for variables with the
Secret type, because secrets are already encrypted and masked.
- If you change a variable’s type from
Secret to another type, Insomnia decrypts the value and marks the variable as confidential.
- Confidential markings only exist in table view. Before you switch an environment to JSON view, Insomnia asks you to remove all confidential markings and secrets.
Insomnia hides confidential values by default. To change this:
- Navigate to the Preferences settings at the bottom left in the Insomnia sidebar.
- In the General tab, turn off Hide Confidential values in Preview/Console.
When you export an environment or sync it with Git Sync, Insomnia records which variables are confidential in a confidentialKeys list in the v5 file. The list contains variable names only. Values are exported like any other variable value.
Insomnia exports confidential values in plain text. Anyone with access to the exported file or the Git repository can read them. To store a value in encrypted form, use secret variables instead.