PHPackages                             lcobucci/jwt - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. lcobucci/jwt

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

lcobucci/jwt
============

A simple library to work with JSON Web Token and JSON Web Signature

5.6.0(7mo ago)7.5k316.6M—5.5%600[6 issues](https://github.com/lcobucci/jwt/issues)[1 PRs](https://github.com/lcobucci/jwt/pulls)20BSD-3-ClausePHPPHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0CI passing

Since Mar 8Pushed today130 watchersCompare

[ Source](https://github.com/lcobucci/jwt)[ Packagist](https://packagist.org/packages/lcobucci/jwt)[ GitHub Sponsors](https://github.com/lcobucci)[ Patreon](https://www.patreon.com/lcobucci)[ RSS](/packages/lcobucci-jwt/feed)WikiDiscussions 6.0.x Synced 1mo ago

READMEChangelog (10)Dependencies (11)Versions (87)Used By (20)Security (1)

JWT
===

[](#jwt)

[![Gitter](https://camo.githubusercontent.com/82b37b704e2e79c5d50f45f6cf0aab5873f32ffcca6c38864d72b1a66c2ba48c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4749545445522d4a4f494e253230434841542532302545322538362539322d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://gitter.im/lcobucci/jwt?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)[![Total Downloads](https://camo.githubusercontent.com/1862f3190a73581e8fc508aca688fd0ce7cb95039781fd1900f051b1d1b5afa6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c636f62756363692f6a77742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lcobucci/jwt)[![Latest Stable Version](https://camo.githubusercontent.com/0b37242cd552fe13cf8fcfc7eaadb1cafaecccb4828017654317bf5f54a13af6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c636f62756363692f6a77742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lcobucci/jwt)[![Unstable Version](https://camo.githubusercontent.com/490eb6b244e49fadcdb096846ffde972fcea767c0bab9e50903f4075bb459534/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f767072652f6c636f62756363692f6a77742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lcobucci/jwt)

[![Build Status](https://camo.githubusercontent.com/390291af2ce1fa154d42da18a987161beafb522ffa1ea2548d98cc1d45856bc5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6c636f62756363692f6a77742f706870756e69742e796d6c3f6272616e63683d362e302e78267374796c653d666c61742d737175617265)](https://github.com/lcobucci/jwt/actions?query=workflow%3A%22PHPUnit%20Tests%22+branch%3A6.0.x)[![Code Coverage](https://camo.githubusercontent.com/81d10d428835c41edff39c6a7c2d0f1cf142e53f98f0404e95d45c71d371f624/68747470733a2f2f636f6465636f762e696f2f67682f6c636f62756363692f6a77742f6272616e63682f352e312e782f67726170682f62616467652e737667)](https://codecov.io/gh/lcobucci/jwt)

A simple library to work with JSON Web Token and JSON Web Signature based on the [RFC 7519](https://tools.ietf.org/html/rfc7519).

Installation
------------

[](#installation)

Package is available on [Packagist](https://packagist.org/packages/lcobucci/jwt), you can install it using [Composer](https://getcomposer.org).

```
composer require lcobucci/jwt
```

Documentation
-------------

[](#documentation)

The documentation is available at .

###  Health Score

86

—

ExcellentBetter than 100% of packages

Maintenance85

Actively maintained with recent releases

Popularity88

Widely adopted with strong download metrics

Community62

Healthy contributor diversity

Maturity96

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~55 days

Recently: every ~103 days

Total

81

Last Release

53d ago

Major Versions

3.4.6 → 4.0.42021-09-28

4.3.0 → 5.0.02023-02-25

3.4.x-dev → 4.0.x-dev2023-11-20

4.4.x-dev → 5.0.x-dev2023-11-20

5.6.x-dev → 6.0.x-dev2026-03-26

PHP version history (10 changes)1.0.0PHP &gt;=5.5

4.0.0-alpha1PHP ^7.1

4.0.0-alpha2PHP ^7.2

3.3.0PHP ^5.6 || ^7.0

4.0.0-beta1PHP ^7.4 || ^8.0

5.0.0PHP ~8.1.0 || ~8.2.0

5.1.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0

5.4.0PHP ~8.2.0 || ~8.3.0 || ~8.4.0

5.6.0PHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0

6.0.x-devPHP ~8.3.0 || ~8.4.0 || ~8.5.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/201963?v=4)[Luís Cobucci](/maintainers/lcobucci)[@lcobucci](https://github.com/lcobucci)

---

Top Contributors

[![lcobucci](https://avatars.githubusercontent.com/u/201963?v=4)](https://github.com/lcobucci "lcobucci (680 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (462 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (273 commits)")[![Slamdunk](https://avatars.githubusercontent.com/u/152236?v=4)](https://github.com/Slamdunk "Slamdunk (136 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (128 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (110 commits)")[![Ocramius](https://avatars.githubusercontent.com/u/154256?v=4)](https://github.com/Ocramius "Ocramius (30 commits)")[![henriquemoody](https://avatars.githubusercontent.com/u/154023?v=4)](https://github.com/henriquemoody "henriquemoody (7 commits)")[![t0mmy742](https://avatars.githubusercontent.com/u/29512640?v=4)](https://github.com/t0mmy742 "t0mmy742 (5 commits)")[![freebuu](https://avatars.githubusercontent.com/u/9998200?v=4)](https://github.com/freebuu "freebuu (4 commits)")[![Spomky](https://avatars.githubusercontent.com/u/1091072?v=4)](https://github.com/Spomky "Spomky (4 commits)")[![localheinz](https://avatars.githubusercontent.com/u/605483?v=4)](https://github.com/localheinz "localheinz (4 commits)")[![vanbrabantf](https://avatars.githubusercontent.com/u/12281411?v=4)](https://github.com/vanbrabantf "vanbrabantf (3 commits)")[![paragonie-security](https://avatars.githubusercontent.com/u/15914520?v=4)](https://github.com/paragonie-security "paragonie-security (3 commits)")[![b1rdex](https://avatars.githubusercontent.com/u/312855?v=4)](https://github.com/b1rdex "b1rdex (2 commits)")[![baijunyao](https://avatars.githubusercontent.com/u/9360694?v=4)](https://github.com/baijunyao "baijunyao (2 commits)")[![SvenRtbg](https://avatars.githubusercontent.com/u/416600?v=4)](https://github.com/SvenRtbg "SvenRtbg (2 commits)")[![Nyholm](https://avatars.githubusercontent.com/u/1275206?v=4)](https://github.com/Nyholm "Nyholm (1 commits)")[![ricardoseriani](https://avatars.githubusercontent.com/u/3369718?v=4)](https://github.com/ricardoseriani "ricardoseriani (1 commits)")[![royopa](https://avatars.githubusercontent.com/u/442991?v=4)](https://github.com/royopa "royopa (1 commits)")

---

Tags

hacktoberfestjwtphptokensjwtJWS

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/lcobucci-jwt/health.svg)

```
[![Health](https://phpackages.com/badges/lcobucci-jwt/health.svg)](https://phpackages.com/packages/lcobucci-jwt)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[web-token/jwt-framework

JSON Object Signing and Encryption library for PHP and Symfony Bundle.

94818.9M77](/packages/web-token-jwt-framework)[web-token/jwt-library

JWT library

2011.2M83](/packages/web-token-jwt-library)[bizley/jwt

JWT integration for Yii 2

67425.3k2](/packages/bizley-jwt)[web-token/jwt-bundle

JWT Bundle of the JWT Framework.

132.5M7](/packages/web-token-jwt-bundle)[gamegos/jws

Json Web Signature (JWS) PHP implementation

26359.6k6](/packages/gamegos-jws)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
