Direct Comparison Matrix
| Feature | HS256 | HS384 | HS512 |
| :--- | :--- | :--- | :--- |
| **Hash Algorithm** | SHA-256 | SHA-384 | SHA-512 |
| **Minimum Key Size** | 256 bits (32 B) | 384 bits (48 B) | 512 bits (64 B) |
| **Signature Size** | 32 bytes (43 Base64 chars) | 48 bytes (64 Base64 chars) | 64 bytes (86 Base64 chars) |
| **Quantum Collision Margin** | 128 bits | 192 bits | 256 bits |
| **Recommended For** | General Web & Mobile Apps | Enterprise & Compliance | Maximum Long-term Security |
Generate in Browser
Launch GeneratorNeed a cryptographically secure JWT secret right now?
Generate 128 to 512-bit keys in Hex or Base64 using Web Crypto with zero server transmission.
Frequently Asked Questions
Which algorithm is best for mobile APIs?
HS256 is generally preferred for mobile APIs because its 43-character signature minimizes HTTP header overhead on cellular connections while providing formidable security.
Related Technical Guides
JWT Algorithms
HS256 Secret Key Requirements: Specifications, Code Examples, and Common Traps
Learn the official RFC 7518 requirements for HS256 JWT keys. Understand key derivation, minimum byte lengths, and implementation examples.
JWT AlgorithmsSymmetric vs. Asymmetric JWT Signing: Complete Architecture Guide
Understand the fundamental difference between symmetric HMAC shared secrets and asymmetric RSA/ECDSA public/private key pairs for JWT signing.