# PHP-JWT

> Encode and decode JSON Web Tokens in PHP

Source: https://talira.ai/catalog/php-jwt-0479yw0g
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [security / auth / libraries](https://talira.ai/categories/security/auth/libraries), [languages / php](https://talira.ai/categories/languages/php)
- Licence: BSD-3-Clause[^2]
- Pricing: Free and open source[^2]
- Free tier: yes[^2]
- Supports: [JWT](https://talira.ai/standards/jwt.md)[^1]
- Backed by: [Google](https://talira.ai/orgs/google.md)
- Funding: public company (NASDAQ:GOOGL)[^3]

PHP-JWT (the Composer package firebase/php-jwt, now maintained under Google's googleapis organization) is a library for encoding and decoding JSON Web Tokens in PHP, conforming to RFC 7519. It supports JSON Web Signature, JSON Web Keys and the HS, RS, ES and PS families of algorithms plus EdDSA (Ed25519), can parse JWK sets, and can fetch and cache a JWKS from a public URL with its CachedKeySet class. It handles signed tokens only, not encrypted ones.

## Links

- GitHub: https://github.com/googleapis/php-jwt
- Docs: https://docs.cloud.google.com/php/docs/reference/php-jwt/latest

## Problems it solves

- verify a JWT in a PHP app
- issue signed JSON Web Tokens from PHP
- validate tokens against a provider's JWKS endpoint in PHP

## Features

- Encodes and decodes JWTs per RFC 7519
- HS256/384/512, RS256/384/512, ES256/384, PS256 and EdDSA (Ed25519)
- Parses JSON Web Key sets
- Fetches and caches JWKS from a public URL

## Limitations

- Supports only signed JWTs (JWS): encrypted JWTs (JWE) aren't supported[^1]

## Trust

Overall: 0.61 out of 1.
Signals: maintenance 0.67, adoption 0.80, momentum 0.54, community 0.79, backing 0.55, extensibility 0.00.

- last commit 13 days ago
- 10 commits in the last 90 days
- latest release v7.2.2 12 days ago
- 9.8k GitHub stars
- 95 contributors
- backed by Google
- funding: public company (NASDAQ:GOOGL)

## Alternatives

- [lcobucci/jwt](https://talira.ai/catalog/lcobucci-jwt-by7h6zsk.md): Framework-agnostic PHP library to issue, parse and validate JSON Web Tokens
- [jwt-auth](https://talira.ai/catalog/jwt-auth-j3eeh8w4.md): JSON Web Token authentication for Laravel and Lumen
- [OAuth 2.0 Client](https://talira.ai/catalog/oauth-2-0-client-3wh4kc1s.md): PHP League's base library for OAuth 2.0 sign-in with any provider

## Sources

[^1]: https://github.com/googleapis/php-jwt (checked 28 Nov 2026)
[^2]: https://github.com/googleapis/php-jwt/blob/main/LICENSE (checked 28 Nov 2026)
[^3]: https://www.sec.gov/files/company_tickers_exchange.json (checked 20 Nov 2026)
