Digital Signature Tool: Sign and Verify (RSA-PSS, ECDSA)
Sign a text message and check whether a signature is valid. Sign with a private key (PKCS#8 PEM) and verify with a public key (SPKI PEM). It uses the browser built-in Web Crypto API, so your keys and messages are never sent to a server. You can create keys with the Key Pair Generator. The JWT Generator does not cover RS256; for RSA signatures use RSA-PSS here (JWT RS256 uses PKCS#1 v1.5, which is a different scheme).
🔒 Runs in your browser · Your data is never sent to a server
How to use
- Choose "Create signature" or "Verify signature".
- Pick an "Algorithm" and "Hash", then enter the "Message".
- To sign, paste the "Private key (PKCS#8 PEM)", press "Sign", and copy the Base64 signature.
- To verify, paste the "Public key (SPKI PEM)" and the "Signature (Base64)", then press "Verify".
Notes
- A PEM does not reveal its key type, so the key is loaded with the algorithm you select. A mismatch shows a key-loading error.
- ECDSA signatures use the Web Crypto r||s concatenated format (IEEE P1363). They are not compatible with the DER-encoded signatures produced by OpenSSL and similar tools, so a DER signature cannot be verified as-is.
- The RSA-PSS salt length is fixed to the hash size in bytes (32 for SHA-256).
- Signing and verifying must use the same hash. For ECDSA the default matches the curve (P-256 uses SHA-256, P-384 uses SHA-384, P-521 uses SHA-512).
- The message is signed as UTF-8 bytes. A different line ending or trailing space makes it a different message.
- Do not share your private key. This tool neither sends nor stores keys, but important production keys are best handled in a controlled environment.
- Passphrase-encrypted PEM (ENCRYPTED PRIVATE KEY), the RSA PRIVATE KEY format, and Ed25519 are not supported.
Glossary
Digital signature
A proof that only the private-key holder can create and anyone can check with the public key. It shows the message was not altered and who signed it.
RSA-PSS
An RSA signature scheme that adds a random salt, so the signature differs every time. A newer design than the older PKCS#1 v1.5 (RS256).
ECDSA
A signature scheme using elliptic curves, giving comparable strength to RSA with shorter keys. A signature is two numbers, r and s, which this tool handles concatenated.
PEM / SPKI / PKCS#8
PEM is a text format that wraps Base64 data in header lines. Public keys are stored as SPKI and private keys as PKCS#8.
FAQ
Can I create a JWT RS256 signature with this tool?
No. JWT RS256 uses RSASSA-PKCS1-v1_5, which is a different scheme from the RSA-PSS offered here. The two signatures are not interchangeable and cannot verify each other.
Can I verify a signature made with OpenSSL?
For ECDSA, this tool uses the Web Crypto r||s format (IEEE P1363), not the DER format OpenSSL produces, so a DER signature cannot be verified as-is. An RSA-PSS signature with the salt length equal to the hash size can be verified once Base64-encoded.
I get "key could not be loaded for the selected algorithm".
A PEM does not state its key type, so it is loaded with the algorithm you pick. This happens when you choose ECDSA for an RSA key, or P-384 for a P-256 key. Check the key type and curve.
Can I use an RSA key from the Key Pair Generator?
Yes. PKCS#8 and SPKI keys are the same regardless of intended use, so this tool simply loads the RSA key as RSA-PSS. ECDSA keys work as they are.
Why does RSA-PSS give a different signature for the same message?
RSA-PSS adds a random salt when signing, so this is normal. Every one of those different signatures still verifies successfully.
Share this page
