01What is Content-Digest Generator?
Content-Digest Generator computes and checks the HTTP integrity fields from RFC 9530, Digest Fields, published in February 2024. RFC 9530 replaced the old Digest header from RFC 3230 with two fields. Content-Digest covers the bytes of the message content as sent. Repr-Digest covers the whole selected representation, before content coding such as gzip and regardless of range requests. Both are Structured Field dictionaries: the key is the algorithm and the value is a byte sequence written as base64 between colons, for example sha-256=:...:. They also pair with HTTP Message Signatures (RFC 9421): a signature can cover the Content-Digest field, which in turn covers the body. Type or paste the content and pick algorithms. The tool hashes the exact UTF-8 bytes with the browser's Web Crypto API and prints Content-Digest and Repr-Digest lines. sha-256 and sha-512 are the only Active algorithms in the IANA registry the RFC sets up. sha (SHA-1), adler and crc32c can also be computed for checking old systems, and they are marked deprecated. md5, unixsum and unixcksum are recognised but not computed. To verify, paste a received field value. Each entry is recomputed and shown as match or mismatch, or as unsupported when the tool can't compute that algorithm. A third box reads Want-Content-Digest and Want-Repr-Digest. Those fields carry weights from 0 to 10, where 10 is most preferred and 0 means not acceptable; the tool sorts them and flags weights out of range. The RFC's own sample values make a good test. Its Appendix D hashes the 18-byte JSON {"hello": "world"}, and the tool gives sha-256=:X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=:. Add a trailing newline, as in the RFC's Appendix B responses, and the value becomes RK/0qy18MlBSVnWgjwz6lZEWjP/lF5HF9bvEF8FabDg=. Mismatches almost always come from bytes like that: a newline, re-serialised JSON or a different encoding. The tool works on the text you paste, not on raw binary files. Content-Digest and Repr-Digest only match when the content is the full, unencoded representation. For gzip or partial responses, compute Repr-Digest over the decoded full body yourself. Nothing leaves your browser. Sources: RFC 9530, Digest Fields (https://www.rfc-editor.org/rfc/rfc9530), including the sample values in Appendices B and D; RFC 9651, Structured Field Values (https://www.rfc-editor.org/rfc/rfc9651).
Backend developers working on webhooks, payment or banking APIs, and anyone implementing HTTP Message Signatures. The tool runs entirely in your browser, so your data never leaves your device.
02How to use Content-Digest Generator
- Paste the exact request or response body into the content box
- Tick sha-256 (and sha-512 if you want both) to get the header lines
- To check a received header, paste its value into the verify box
- Optionally paste a Want-Content-Digest or Want-Repr-Digest value to see the preference order
03Worked examples
- Input:
{"hello": "world"} (sha-256 and sha-512) - Result:
Content-Digest: sha-256=:X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=:, sha-512=:WZDPaVn/7XgHaAy8pmojAkGWoRx2UFChF41A2svX+TaPm+AbwAgBWnrIiYllu7BNNyealdVLvRwEmTHWXvJwew==: - Both values match RFC 9530 Appendix D.
- Input:
{"hello": "world"} followed by a newline - Result:
Content-Digest: sha-256=:RK/0qy18MlBSVnWgjwz6lZEWjP/lF5HF9bvEF8FabDg=: - The 19-byte body from the RFC's Appendix B examples.
- Input:
Verify md5=:Sd/dVLAcvNLSq16eXua5uQ==:, crc32c=:Q3lHIA==: against {"hello": "world"} - Result:
unsupported md5 - Deprecated in RFC 9530: do not rely on it for integrity. match crc32c - Deprecated in RFC 9530: do not rely on it for integrity. - Deprecated algorithms are checked where possible but flagged.
- Input:
Verify SHA-256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE= - Result:
Not a valid Structured Field Dictionary: Key must start with a lowercase letter or "*", found "S" (at position 0) - Old RFC 3230 Digest syntax is not a valid Content-Digest value.
04Common use cases
- Checking why a webhook receiver rejects a request whose Content-Digest doesn't match
- Creating a Content-Digest value to send with curl when testing an API that requires one
- Preparing a request body before signing it with HTTP Message Signatures
- Migrating from the old RFC 3230 Digest header to Content-Digest
- Reading a server's Want-Content-Digest to see which algorithm it prefers
05Tips
- Hash the bytes that are actually sent; pretty-printing JSON again changes the digest
- Use sha-256 or sha-512; the other algorithms are deprecated in RFC 9530
- Algorithm keys are lowercase: SHA-256=... is the old Digest syntax and fails to parse
- With gzip, Content-Digest covers the compressed bytes while Repr-Digest covers the decoded body
06Related concepts
RFC 9530, Content-Digest, Repr-Digest, Want-Content-Digest, HTTP Message Signatures, SHA-256.
Frequently Asked Questions
What is Content-Digest Generator?
Content-Digest Generator is a free, browser-based developer tool on AIDToolStack. Compute Content-Digest and Repr-Digest headers (RFC 9530) with SHA-256 or SHA-512, verify a received digest, and read Want-Content-Digest preferences. It requires no installation or sign-up and works entirely in your browser.
Is Content-Digest Generator free to use?
Yes. No sign-up, no fees and no usage cap.
Does Content-Digest Generator store my data?
No. It runs in your browser; nothing is uploaded.