https://github.com/litert/jwt.js
The JWT (JSON Web Token) implementation library written in TypeScript, for Node.js.
https://github.com/litert/jwt.js
ecdsa eddsa jwa jws jwt ml-dsa rsa sign token verify
Last synced: 3 months ago
JSON representation
The JWT (JSON Web Token) implementation library written in TypeScript, for Node.js.
- Host: GitHub
- URL: https://github.com/litert/jwt.js
- Owner: litert
- License: apache-2.0
- Created: 2025-10-28T16:35:32.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2025-11-23T14:51:57.000Z (7 months ago)
- Last Synced: 2025-11-23T16:21:20.412Z (7 months ago)
- Topics: ecdsa, eddsa, jwa, jws, jwt, ml-dsa, rsa, sign, token, verify
- Language: TypeScript
- Homepage: https://litert.org/projects/jwt.js/
- Size: 271 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
README
# LiteRT/JWT
[](https://www.typescriptlang.org)
[](https://www.npmjs.com/package/@litert/jwt "Stable Version")
[](https://github.com/litert/jwt/blob/master/LICENSE)
[](https://github.com/litert/jwt.js/issues)
[](https://github.com/litert/jwt.js/releases "Stable Release")
The JWT (JSON Web Token) implementation library written in TypeScript, for Node.js.
> By now, this library only supports JWT with JWS (JSON Web Signature).
## Installation
```sh
npm i @litert/jwt --save
```
## Features
- ✔️ All mainly signing JWA algorithms are supported。
RSA | HMAC | ECDSA | EdDSA | ML-DSA
:--------:|:---------:|:----------:|:-----------:|:---------:
 |  |  |  | 
 |  |  |  | 
 |  |  | | 
 | |  |
 |
 |
> ML-DSA only supported in Node.js v24.6.0 or newer.
- ✔️ Signing and verifying JWTs
There are two kinds of APIs for signing and verifying JWTs:
- Core APIs
- [`function stringify()`](./src/examples/quick-start-stringify.ts)
Sign and generate a JWT string directly.
- [`function parse()`](./src/examples/quick-start-parse.ts)
Parse a JWT string, without verifying it.
- Managed APIs
- [`class JwtBuilder`](./src/examples/quick-start-builder.ts)
A builder class for signing and generating JWTs, providing rich methods to customize the JWT contents.
- [`class JwtVerifier`](./src/examples/quick-start-verifier.ts)
A verifier class for parsing and verifying JWTs.
## Requirements
- Node.js v18.x (Or newer)
- TypeScript v5.1.x (Or newer)
## Documents
- [en-US](https://litert.org/projects/jwt.js/)
- [Quick Start](https://litert.org/projects/jwt.js/guides/quick-start.html)
- [FAQ](https://litert.org/projects/jwt.js/guides/faq.html)
- [API Reference](https://litert.org/projects/jwt.js/api/)
## License
This library is published under [Apache-2.0](./LICENSE) license.