Compare signature and public-key sizes across RSA, ECDSA, Ed25519 and ML-DSA in raw, DER or Base64 encoding.
ECDSA and Ed25519 signatures are two field elements, so P-256 gives 64 raw bytes against RSA-2048's 256. ML-DSA-65 trades size for quantum resistance: a 3,309-byte signature and a 1,952-byte public key, roughly 50× an Ed25519 signature. Signature size lands directly in JWT headers, certificate chains, blockchain records and firmware images — the jump to post-quantum signatures is the main reason those formats need size headroom now.
Digital Signature Size
an ECDSA signature is 2 × ⌈field ÷ 8⌉ raw bytes, an RSA signature equals the modulus in bytes, and Base64 inflates any of them to 4 × ⌈bytes ÷ 3⌉.
an ECDSA signature is 2 × ⌈field ÷ 8⌉ raw bytes, an RSA signature equals the modulus in bytes, and Base64 inflates any of them to 4 × ⌈bytes ÷ 3⌉. ECDSA and Ed25519 signatures are two field elements, so P-256 gives 64 raw bytes against RSA-2048's 256. ML-DSA-65 trades size for quantum resistance: a 3,309-byte signature and a 1,952-byte public key, roughly 50× an Ed25519 signature.
Signature size lands directly in JWT headers, certificate chains, blockchain records and firmware images — the jump to post-quantum signatures is the main reason those formats need size headroom now.
This calculator takes 3 inputs: Signature algorithm, Wire encoding, Signatures stored or transmitted. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.
DER encodes r and s as signed integers, so a leading zero is prepended when the high bit is set and stripped when the value is short. A P-256 DER signature is therefore usually 70–72 bytes, which is why parsers must not assume a fixed length.