Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

JSON Web Token implementation in Python

Project description

A Python implementation of RFC 7519. Original implementation was written by @progrium.


Install with pip:

$ pip install PyJWT


>>> import jwt
>>> encoded = jwt.encode({'some': 'payload'}, 'secret', algorithm='HS256')

>>> jwt.decode(encoded, 'secret', algorithms=['HS256'])
{'some': 'payload'}

Command line


pyjwt [options] INPUT

Decoding examples:

pyjwt --key=secret decode TOKEN
pyjwt decode --no-verify TOKEN

See more options executing pyjwt --help.


View the full docs online at


You can run tests from the project root after cloning with:

$ python test

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
PyJWT-1.7.1-py2.py3-none-any.whl (18.9 kB) Copy SHA256 hash SHA256 Wheel py2.py3
PyJWT-1.7.1.tar.gz (42.0 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page