Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

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.

Files for PyJWT, version 1.7.1
Filename, size File type Python version Upload date Hashes
Filename, size PyJWT-1.7.1-py2.py3-none-any.whl (18.9 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size PyJWT-1.7.1.tar.gz (42.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page