Skip to main content

PyJWT

https://github.com/jpadilla/pyjwt/workflows/CI/badge.svg https://img.shields.io/pypi/v/pyjwt.svg https://codecov.io/gh/jpadilla/pyjwt/branch/master/graph/badge.svg https://readthedocs.org/projects/pyjwt/badge/?version=stable

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

Sponsor

auth0-logo

If you want to quickly add secure token-based authentication to Python projects, feel free to check Auth0’s Python SDK and free plan at auth0.com/signup.

Installing

Install with pip:

$ pip install PyJWT

Usage

>>> import jwt
>>> encoded = jwt.encode({"some": "payload"}, "secret", algorithm="HS256")
>>> print(encoded)
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzb21lIjoicGF5bG9hZCJ9.4twFt5NiznN84AWoo1d7KO1T_yoc0Z6XOpOVswacPZg
>>> jwt.decode(encoded, "secret", algorithms=["HS256"])
{'some': 'payload'}

Documentation

View the full docs online at https://pyjwt.readthedocs.io/en/stable/

Tests

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

$ tox

Metadata

Release files for PyJWT 2.14.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PyJWT 2.14.0
File Size Uploaded Provenance Actions
pyjwt-2.14.0.tar.gz 113.2 kB With provenance Details for pyjwt-2.14.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for PyJWT 2.14.0
File Interpreter ABI Platform Actions
pyjwt-2.14.0-py3-none-any.whl Python 3 none any Details for pyjwt-2.14.0-py3-none-any.whl

Total release size: 146.1 kB

Release files / pyjwt-2.14.0.tar.gz

Download URL pyjwt-2.14.0.tar.gz
Size 113.2 kB
Tags Source
SHA-256 checksum
How to use checksums
77283c83fb56ecf566a886c757a714bc83668e38156de2cce8263302f42e0b86
BLAKE2b-256 checksum
How to use checksums
afc38a3b59c25070cc61dc517fbdfa5dc0904670c96f605cc69759dc09166b99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.

Transparency log

Release files / pyjwt-2.14.0-py3-none-any.whl

Download URL pyjwt-2.14.0-py3-none-any.whl
Size 32.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ad0cef71c756a56e74863c2919cf0985f72decbcfcb550ee2f422e7c62b5eedc
BLAKE2b-256 checksum
How to use checksums
9c97672cb32ce0dfea44b740cb7b4f97038463b9cf7c0ead1aacf595572851d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.

Transparency log

Security for PyJWT 2.14.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pyjwt-2.14.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.14.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page