insomnia-plugin-jwt-encoder
v1.0.1
Published
Generate JWT tokens with symmetric (HMAC) and asymmetric (RSA/ECDSA) algorithms for Insomnia
Maintainers
Readme
Insomnia JWT Encoder Plugin
Generate JWT tokens with both symmetric (HMAC) and asymmetric (RSA/ECDSA) algorithms directly in Insomnia.
Informations
It's a simple code that uses jwt.sign() to encode information. Nothing will be saved on the web; everything will run locally on your computer. You can see the code in my github: https://github.com/lorenzomlazzarin/insomnia-plugin-jwt-encoder
Algorithms
🔐 Asymmetric JWT: Generate JWTs using RSA and ECDSA algorithms
- RS256, RS384, RS512 (RSA with SHA)
- ES256, ES384, ES512 (ECDSA)
- PS256, PS384, PS512 (RSA-PSS)
🔑 Symmetric JWT: Generate JWTs using HMAC algorithms
- HS256, HS384, HS512
Installation
- Open Insomnia
- Go to
Application > Preferences > Plugins - Search for
insomnia-plugin-jwt-encoder - Click Install
Usage
Getting Started
- In any Insomnia request field (URL, headers, body, etc.)
- Press
Ctrl + Spaceto open the template tag selector - Search for "JWT" to find the JWT template tags
- Choose between:
- 🔐 JWT Asymmetric - for RS/ES/PS
- 🔑 JWT Symmetric - for HS

To add information
when you select any option, a tag (blue box) will appear and the text "JWT" will disappear:

After that, you need to click on the tag, and a box will appear. The information you need to enter depends on the chosen algorithm. The tag indicates the selected algorithm type. Note the letters and numbers written in the tag encode JWT => xxxxx, where xxxxx is one of the algorithms described in the Features section.
Asymmetric JWT
- check the algorithm selected. i can't find algorithm
- Add any additional fields you want in the header, in addition to
algandtyp. If you don't add anything, it will only be the two fields. - Set expiration time (e.g., "1h", "30m", "7d")
- Add your payload (JSON format), without the
expattribute - Specify path to your private key file (.pem)
Exemple:
without custom headers

with custom headers

Symmetric JWT
- check the algorithm selected. i can't find algorithm
- Add any additional fields you want in the header, in addition to
algandtyp. If you don't add anything, it will only be the two fields. - Set expiration time (e.g., "1h", "30m", "7d")
- Add your payload (JSON format), without the "exp" attribute
- Enter your secret key (string or Base64) (Auto-detect Base64 encoded secrets)
Important
- Only the
headersection is optional. - You can put this tag in any tab of insomnia.
- You can only see the algorithm options for the type you are using. If you are using asymmetric algorithms and want to switch to symmetric algorithms, change the
function to performoption.
- If any important information is missing, the "Live Preview" section will display messages for you.

Possible problems
don't appear options:
Look in the Application > Preferences > Plugins if insomnia-plugin-jwt-encoder appears in the section Plugins with green check.
can't find the algorithm:
Please, look the 3° tópic of Important.
