icon/x Created with Sketch.

Splunk Cookie Policy

We use our own and third-party cookies to provide you with a great online experience. We also use these cookies to improve our products and services, support our marketing campaigns, and advertise to you on our website and other websites. Some cookies may continue to collect information after you have left our website. Learn more (including how to update your settings) here.
Accept Cookie Policy

We are working on something new...

A Fresh New Splunkbase
We are designing a New Splunkbase to improve search and discoverability of apps. Check out our new and improved features like Categories and Collections. New Splunkbase is currently in preview mode, as it is under active development. We welcome you to navigate New Splunkbase and give us feedback.
Log4Shell Vulnerability: Information and guidance for you. Get resources.

Accept License Agreements

This app is provided by a third party and your right to use the app is in accordance with the license provided by that third-party licensor. Splunk is not responsible for any third-party apps and does not provide any warranty or support. If you have any questions, complaints or claims with respect to this app, please contact the licensor directly.

Thank You

Downloading JSON Web Token (JWT) Decoder
SHA256 checksum (json-web-token-jwt-decoder_104.tgz) 2fbe813675f004f8fb10652e63db73ab8f4f902e3168837237ac25ae315f5ece SHA256 checksum (json-web-token-jwt-decoder_103.tgz) 442db7137b95be4023e926acd0a288cf31cdfdd2495c92fbe946187d1ba533b6 SHA256 checksum (json-web-token-jwt-decoder_102.tgz) eaaa862f98def49cf9732f1c7624f9ea3db502cdf8b251c4c20df4eb40ddd242 SHA256 checksum (json-web-token-jwt-decoder_101.tgz) 1ea0e6190265fcc17e095a60da6f48cac40ab2128adc3149364649ccaa898eda
To install your download
For instructions specific to your download, click the Details tab after closing this window.

Flag As Inappropriate


JSON Web Token (JWT) Decoder

Splunk Cloud
Quickly and easily decode and parse encoded JWT tokens found in Splunk events. Token metadata is decoded and made available as standard JSON in a `jwt` added to each event, and can easily be passed through to spath for additional query needs.

The JSON Web Token (JWT) Decoder is a custom search command that simplifies decoding and parsing tokens found in Splunk events.


... | jwt field=string [secret=string] [filter=(True|False)] [wrap=(True|False)] [debug=(True|False)]
  • field: Specify the field containing the Base64 encoded JWT token. Will automatically detect standard HTTP Authorization header containing JWT bearer token if present.
  • secret: If specified, will validate the JWT signature against the provided secret (HMAC SHA-256 only).
  • filter: Optionally filter results to only include events which contain the specified field (default: False).
  • wrap: Returned JSON structure will be wrapped with a "jwt" object to automatically export fully-qualified properties (e.g. jwt.header.alg) when passed through spath with no options (default: True).
  • debug: Set to True to enable errors when decoding events (default: False).

The specified field can either contain only the encoded JWT value, or more commonly, it can be included as a bearer token value in a standard HTTP Authentication header:

Host: www.example.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6I....
Content-Type: application/json

The authorization header will automatically be detected and parsed to obtain the JWT value, and both muliline and mulivalue field types are supported.

The resulting JSON representation of the token will then be made available in a jwt field for further analysis, though in many cases it will be most desirable to use the spath command to access the properties directly. Without any additional arguments, simply passing the jwt field as the input to spath will result in fields being created for each property in the JWT token:

| jwt field="request_headers" | spath input=jwt

From this output, accessing the JWT values is as simple as referencing jwt.header.alg or jwt.payload.name.

However, more advanced use cases can be easily accomplished with the additional options provided. For example, to show only events which included a JWT token, validate the token's HMAC SHA-256 signature with a provided secret and target the validation result directly, the following query could accomplish this:

| jwt field="request_headers" secret="mySecret" wrap=false filter=true 
| spath input=jwt path=signature 
| search signature="Invalid"


As is, this app is functional and tested with standard JWT tokens as described above. If there is interest, support for additional signature algorithms and enhanced functionality may be considered.

Release Notes

Version 1.0.4
June 18, 2022

Adjusted configuration for compatibility with Splunk Cloud.
Updated Splunk Python SDK to version 1.7.0.

Version 1.0.3
May 18, 2021

Addressed AppInspect issues for Splunk Cloud compatibility

Version 1.0.2
May 15, 2021

Updated for Python 3.7 compatibility
Added logging functionality to simplify tracking app errors
Improved token decoding logic to handle padding errors with some JWT encodings

Version 1.0.1
March 4, 2020

Corrected an issue where events not containing the specified field were filtered from results.
Added option to filter events if desired.
Improved detection of HTTP Authorization headers to work with events where header values are in multiline or multivalue fields.

Subscribe Share

Are you a developer?

As a Splunkbase app developer, you will have access to all Splunk development resources and receive a 10GB license to build an app that will help solve use cases for customers all over the world. Splunkbase has 1000+ apps from Splunk, our partners and our community. Find an app for most any data source and user need, or simply create your own with help from our developer portal.

Follow Us:
Splunk, Splunk>,Turn Data Into Doing, Data-to-Everything, and D2E are trademarks or registered trademarks of Splunk Inc. in the United States and other countries. All other brand names,product names,or trademarks belong to their respective owners.