Digital Signature Validator
Check an RSA, RSA-PSS, ECDSA or Ed25519 signature against a message and a public key, certificate or JWK. Verified with Web Crypto in your browser.
The interactive tool loads here when JavaScript runs.
About this toolWhat is Digital Signature Validator?
The Digital Signature Validator checks whether a signature was made over a given message by the holder of a given key. Paste the original message, the public key and the signature, then click Validate Signature. The result is a real cryptographic check done with the browser's Web Crypto API, not a format check.
The key can be an SPKI PEM (-----BEGIN PUBLIC KEY-----), a PKCS#1 RSA PUBLIC KEY, an X.509 certificate or a JWK. The signature can be Base64, Base64url or hex, and ECDSA signatures can be in DER form (what OpenSSL produces) or raw r||s (what JWS uses). Supported schemes are RSA PKCS#1 v1.5 and RSA-PSS with SHA-256, SHA-384 or SHA-512 (plus legacy SHA-1), ECDSA on P-256, P-384 and P-521, and Ed25519.
With Algorithm on Auto-detect the tool tries every scheme that fits the key type and reports which one verified. Earlier versions returned a random result; this version verifies or fails deterministically. Nothing is uploaded.
- RSA PKCS#1 v1.5, RSA-PSS, ECDSA and Ed25519 verification
- Keys as SPKI PEM, PKCS#1 PEM, X.509 certificate or JWK
- Base64, Base64url or hex signatures; DER or raw ECDSA
- Auto-detect reports which algorithm matched
- Web Crypto API, nothing uploaded
Updated
How to use Digital Signature Validator
- Paste the exact signed text into Original Message.
- Paste the public key, certificate or JWK into Public Key.
- Paste the signature into Digital Signature and leave Algorithm on Auto-detect, or pick the scheme you expect.
- Click Validate Signature and read the Validation Results: the verdict, the algorithm that matched, the key type and size, and the byte lengths of the signature and message.
- Click Load Sample to see a valid RS256 signature made with OpenSSL.
Worked examples
OpenSSL RSA signature (Load Sample)
Input
Message "Release 4.2.0 approved for production." signed with openssl dgst -sha256 -sign key.pem msg.txt | base64
Output
Signature Valid, algorithm RS256, RSA 2048 bits, signature 256 bytes (base64), message 38 bytes
Auto-detect tried RS256 first and it verified. Add a newline to the end of the message and the same signature fails.
Forcing the wrong algorithm
Input
The sample RSA key with Algorithm set to ES256
Output
Error: ES256 does not match the RSA public key
An explicit algorithm must fit the key type. Use Auto-detect when you are not sure which padding or hash the signer used.
Background and insight
A signature is computed over bytes, so verification needs the exact bytes that were signed. The message box is treated as UTF-8 text. The most common false failure is a trailing newline: echo "text" | openssl dgst -sign adds one, and the signed data then differs from what you paste. Line endings (CRLF versus LF) cause the same problem.
RSA has two padding schemes, both in RFC 8017. PKCS#1 v1.5 (RS256 in JWT terms) is deterministic and still the most common. PSS (PS256) adds a random salt; verifiers need to know the salt length, so the validator tries the hash length (the usual default) and the maximum. ECDSA signatures are two integers, r and s. OpenSSL wraps them in an ASN.1 DER sequence, while JWS (RFC 7518) concatenates them as fixed-length raw bytes, which is why a JWT signature and an OpenSSL signature for the same key look different.
Ed25519 (RFC 8032) signs the message directly, without a separate hash choice, and its signatures are always 64 bytes. Browser support for Ed25519 in Web Crypto is recent, so very old browsers may not verify those signatures.
Common use cases
Checking release signatures
Verify a detached signature over a release note, manifest or checksum file against the publisher's key.
Debugging webhook or API signatures
Find out whether a failure comes from the key, the algorithm or the exact bytes being signed.
Cross-checking a signing implementation
Compare output from your code with a signature made by OpenSSL for the same message and key.
Learning signature formats
See how DER and raw ECDSA signatures, PSS and PKCS#1 v1.5 behave with the same key.
Tips and limitations
- Use printf instead of echo when signing test messages, so no newline is added.
- Paste only public keys. The validator refuses private keys, and you should never paste one into a web page.
- Many APIs sign an HMAC with a shared secret rather than a public-key signature. HMAC is not supported here; a matching HMAC needs the secret.
- A valid signature proves the key holder signed the bytes. Whether you trust that key is a separate question: check the certificate or fingerprint through another channel.
- To convert between JWK and PEM before verifying, use the JWK Converter.
Sources and further reading
- RFC 8017: PKCS #1: RSA Cryptography Specifications Version 2.2, IETF. RSASSA-PKCS1-v1_5 and RSASSA-PSS
- RFC 7518: JSON Web Algorithms (JWA), IETF. The raw r and s format for ECDSA in JWS
- RFC 8032: Edwards-Curve Digital Signature Algorithm (EdDSA), IETF
- FIPS 186-5: Digital Signature Standard (DSS), NIST. RSA, ECDSA and EdDSA as approved by NIST
- SubtleCrypto: verify() method, MDN Web Docs
Frequently asked questions
How do I verify a digital signature with a public key?
Paste the signed message, the public key and the signature, then click Validate Signature. The tool imports the key with the Web Crypto API and runs the verification. On the command line, openssl dgst -sha256 -verify pub.pem -signature sig.bin msg.txt does the same for a binary signature.
Why does my signature fail even though the key is correct?
Almost always because the bytes differ: a trailing newline, CRLF line endings, a different text encoding, or the signer hashed or canonicalised the data first. Other causes are the wrong padding (PSS versus PKCS#1 v1.5) or the wrong hash. Auto-detect rules out the algorithm mismatches.
What is the difference between DER and raw ECDSA signatures?
Both encode the same two numbers, r and s. DER wraps them in an ASN.1 sequence and is what OpenSSL and most X.509 tooling produce. Raw format concatenates them at a fixed length (64 bytes for P-256) and is what JWS and Web Crypto use. The validator accepts both.
Can I verify a signature using a certificate instead of a public key?
Yes. Paste the PEM certificate into the Public Key box and the validator uses the key inside it. It does not check the certificate's chain, dates or revocation, so confirm separately that the certificate itself is one you trust.
Which signature algorithm should a new system use?
Ed25519 or ECDSA P-256 for small, fast signatures, or RSA-PSS with at least a 2048-bit key when RSA is required. RSA PKCS#1 v1.5 is still secure for signatures and widely supported, but PSS has the stronger security proof.
Does this validator support HMAC or JWT signatures?
It verifies public-key signatures only, so HMAC (HS256) is not supported. For a JWT signed with RS256, ES256 or EdDSA, paste the header.payload part as the message and the third segment as the signature; raw ECDSA and Base64url are both handled.
Is there an in-depth guide to Digital Signature Validator?
Yes. “Checksums vs Digital Signatures: How to Verify What You Download” covers the background, how it works, common pitfalls and worked examples. Read the full guide.
Related Tools You May Like
Free, in-browser tools that pair well with this one.