PHPackages                             50onred/php-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. 50onred/php-jwt

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

50onred/php-jwt
===============

A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.

1.0.3(11y ago)062BSD-3-ClausePHPPHP &gt;=5.2.0

Since Aug 28Pushed 11y ago3 watchersCompare

[ Source](https://github.com/50onRed/php-jwt)[ Packagist](https://packagist.org/packages/50onred/php-jwt)[ Docs](https://github.com/50onred/php-jwt)[ RSS](/packages/50onred-php-jwt/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (5)Used By (0)

[![Build Status](https://camo.githubusercontent.com/b9995e9b991a4634391e27753459a955b0809bc274a9734c98e1fbb1ce673296/68747470733a2f2f7472617669732d63692e6f72672f66697265626173652f7068702d6a77742e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/firebase/php-jwt)

PHP-JWT
=======

[](#php-jwt)

A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the [current spec](http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-06)

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

[](#installation)

Use composer to manage your dependencies and download PHP-JWT:

```
composer require firebase/php-jwt
```

Example
-------

[](#example)

```

```

Tests
-----

[](#tests)

Run the tests using phpunit:

```
$ pear install PHPUnit
$ phpunit --configuration phpunit.xml.dist
PHPUnit 3.7.10 by Sebastian Bergmann.
.....
Time: 0 seconds, Memory: 2.50Mb
OK (5 tests, 5 assertions)
```

License
-------

[](#license)

[3-Clause BSD](http://opensource.org/licenses/BSD-3-Clause).

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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 ~46 days

Total

4

Last Release

4141d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bc872d33a88383d69e5b34eec45d29c0ce7d33decfeac772762acd716f24cb8d?d=identicon)[sleekslush](/maintainers/sleekslush)

---

Top Contributors

[![anantn](https://avatars.githubusercontent.com/u/37190?v=4)](https://github.com/anantn "anantn (13 commits)")[![phansys](https://avatars.githubusercontent.com/u/1231441?v=4)](https://github.com/phansys "phansys (6 commits)")[![jlesueur](https://avatars.githubusercontent.com/u/944916?v=4)](https://github.com/jlesueur "jlesueur (5 commits)")[![4026](https://avatars.githubusercontent.com/u/7915060?v=4)](https://github.com/4026 "4026 (2 commits)")[![redian](https://avatars.githubusercontent.com/u/816941?v=4)](https://github.com/redian "redian (1 commits)")[![d3mcfadden](https://avatars.githubusercontent.com/u/472234?v=4)](https://github.com/d3mcfadden "d3mcfadden (1 commits)")[![luciferous](https://avatars.githubusercontent.com/u/24509?v=4)](https://github.com/luciferous "luciferous (1 commits)")[![progrium](https://avatars.githubusercontent.com/u/647?v=4)](https://github.com/progrium "progrium (1 commits)")

### Embed Badge

![Health badge](/badges/50onred-php-jwt/health.svg)

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

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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