JWK and JWKS Viewer with JWK to PEM Converter
Paste a JWKS from an identity provider or your own key, see what every key is, spot published private keys and weak sizes, and convert between JWK and PEM.
ทำงานในเบราว์เซอร์ของคุณ ไฟล์ไม่ออกจากอุปกรณ์ ดูวิธีตรวจสอบ
…
วิธีทำ
- 1Paste keys
Paste a JWK, a JWKS or open a .json file.
- 2Review each key
Read type, size, use, alg, kid and the problem list.
- 3Copy the thumbprint
Use it as a kid or to compare keys.
- 4Get PEM
Copy or download the public or private PEM for each key.
- 5Convert PEM to JWK
Paste a PEM, choose alg, use and kid, and copy the JWK.
- 6Generate test keys
Pick an algorithm, generate, and download the JWKS and PEMs.
เกี่ยวกับเครื่องมือนี้
JSON Web Keys are how OAuth 2.0 and OpenID Connect publish signing keys. An identity provider serves a JWKS document, a JSON object with a keys array, and every API that validates tokens downloads it and picks the key whose kid matches the token header. Meanwhile, much server software still wants keys as PEM files. Moving between the two formats, checking that a published set contains only public keys, and working out a stable key ID are routine jobs that usually need a script. This viewer reads a single JWK, a JWKS or an array of keys, describes each key, flags problems such as private members in a public set, short RSA moduli and mismatched alg values, computes the RFC 7638 thumbprint, and converts every key to PEM. It also converts PEM public keys, private keys, RSA and EC legacy formats and certificates into JWKs, and can generate test key pairs with the browser's WebCrypto.
What each key shows
Key type (RSA, EC, OKP for Ed25519 and X25519, or oct for shared secrets), curve, size in bits, use or key_ops, alg and kid. Any x5c certificate chain is decoded with its subject and expiry date. The problem list is specific: an RSA modulus under 2048 bits, an unknown curve, a missing required member, an alg that does not fit the key type, both use and key_ops present, no kid, private members such as d, p or q, and symmetric keys that should never be published.
Thumbprints
RFC 7638 defines a key fingerprint that does not depend on formatting: take only the required members (e, kty and n for RSA; crv, kty, x and y for EC), sort them, write them without spaces and hash with SHA-256, then base64url-encode. Many providers use this as the kid. The viewer shows the exact input string so you can reproduce it in your own code.
Converting
JWK to PEM uses WebCrypto: the key is imported and exported again as SubjectPublicKeyInfo (BEGIN PUBLIC KEY) or PKCS#8 (BEGIN PRIVATE KEY). PEM to JWK accepts BEGIN PUBLIC KEY, PRIVATE KEY, RSA PUBLIC KEY, RSA PRIVATE KEY, EC PRIVATE KEY and CERTIFICATE blocks, wrapping the older PKCS#1 and SEC1 forms first. You can record an alg and use, and set the kid to the thumbprint. The public JWKS output strips every private member from the set you pasted, ready to publish.
Test keys
The generator creates ES256, ES384, ES512, EdDSA (Ed25519), RS256, PS256, RS512 key pairs or HS256 and HS512 secrets, with the thumbprint as kid. Use them in unit tests, local development and documentation.
Limits
WebCrypto supports P-256, P-384 and P-521 but not secp256k1, so ES256K keys can be read but not converted. Ed25519 needs a recent browser. Password-protected private keys are not opened; decrypt them first. Keys you paste stay in this page and in its local draft; still, do not paste production private keys into any website, including this one, unless your policy allows it.
ตัวอย่างพร้อมวิธีทำ
An API team pastes the JWKS of its identity provider. It holds two keys: an EC P-256 key with kid ec-2026-11, use sig and alg ES256, which shows no problems and has a 43-character thumbprint, and an RSA 2048-bit key with alg RS256 but no kid and no use. The viewer gives notices for both missing members, explains that verifiers cannot select a key without a kid during rotation, and shows the public PEM for each key. Converting the RSA PEM back with kid set to thumbprint produces a JWK whose kid is the RFC 7638 value, which the team adds to its configuration.
สรุปสั้น ๆ
- หมวดหมู่: ความปลอดภัย
- ทำงานในเบราว์เซอร์ ไม่ต้องสมัคร ไม่ต้องอัปโหลด
- ข้อมูลที่คุณกรอกอยู่บนอุปกรณ์ของคุณ
- มีภาษาอังกฤษ
- ตรวจสอบเนื้อหาล่าสุด:
- แหล่งข้อมูลทางการ: IETF RFC 7517 JSON Web Key and RFC 7638 JWK Thumbprint
คำถามที่พบบ่อย
What is the difference between JWK and JWKS?
A JWK is one key as a JSON object. A JWKS is a JSON object with a keys array holding several JWKs, usually served at a URL such as /.well-known/jwks.json.
Is it safe to publish my JWKS?
Yes, if it holds only public keys. The viewer warns if any key contains private members or is a symmetric secret.
What is a JWK thumbprint used for?
It is a stable fingerprint of the key, often used as the kid and in proof-of-possession schemes like DPoP.
Can I convert an X.509 certificate to a JWK?
Yes. Paste the CERTIFICATE PEM and the public key inside it is converted.
Why does my EC key fail to convert?
It probably uses secp256k1 or another curve WebCrypto does not support. P-256, P-384 and P-521 work.
Are generated keys secure?
They use the browser's cryptographic random generator, but they exist in a web page. Use them for tests; create production keys in a key management service.
