Practical guide
Compare SHA-256 before and after a metadata edit
Use a file hash to identify the exact copy you received or edited. Then make a controlled metadata-only change so a different digest has a concrete explanation without becoming an image-authenticity verdict.
18 October 2026 · Check AI Free
Keep the two questions separate
SHA-256 covers every original file byte, including metadata and container structure. It does not hash only the displayed picture, authenticate a sender or certify authorship. The tool uses Web Crypto and accepts a local file up to 20 MiB; it does not rename, resize or rewrite that file.
Use original.png as the editing input. It contains one Description tEXt occurrence and the 8 × 6 chart retained in the replacement below. This is a self-authored fixture with fictional metadata. Exact before/after hashes below come from the actual writer output and independent hash checks, rather than a guessed effect of editing.
- Download the original synthetic RGBA PNG — Project-authored 8 × 6 PNG, 338 bytes. Four colored regions, alpha controls and one Description tEXt field: Fictional metadata; pixel samples are unchanged. This canonical download differs from the separate 266-byte built-in hash sample.
- Download the verified metadata text replacement — 330-byte output replacing original.png chunk-2 Description with “Edited locally for the SHA-256 exercise.” using tEXt. Original IDAT is retained; independent decoded samples match.
- NIST FIPS 180-4, August 2015 — Fixed Secure Hash Standard used for SHA-256. A content digest identifies bytes; this workflow does not add identity authentication or signature validation.
- W3C Web Cryptography API, 26 January 2017 — Fixed Recommendation defining SubtleCrypto.digest and SHA-256. The tool uses the browser API with no substitute hash algorithm.
Hash, edit and hash the actual output
Step 1
Record the first SHA-256
Open Image file SHA-256 and choose original.png. It is 338 bytes. Copy SHA-256 or Download hash JSON. Paste the expected original digest below into Expected SHA-256 (optional); the match concerns these bytes, not the truth of its Description.
Step 2
Replace the exact stored Description
Open the PNG text editor with the same file. Click Edit chunk-2, keep Keyword as Description, replace Stored text with Edited locally for the SHA-256 exercise. and retain tEXt encoding. Stage replacement, review one staged change and create the verified PNG. Download verified PNG only after changed text, CRC and retained-IDAT checks pass.
Step 3
Choose the saved edited-text.png in the hash tool
The defined output is 330 bytes. Compute its SHA-256 and paste the new expected value below. The old digest must differ; the new one must match. The writer independently re-read the selected text and checked the original IDAT bytes, so a changed hash here is explained by this text/container change.
Replacement text, including the final full stop:
Edited locally for the SHA-256 exercise.Compare exact outputs
This exact output assumes the specified source bytes, field occurrence, spelling and tEXt encoding. Using another encoder, adding a different field, moving chunks or including a newline can produce a different digest while preserving image samples. Preserve the original and inspect the change instead of treating every unexpected hash as a pixel edit.
| File | Bytes / stored value | Expected SHA-256 |
|---|---|---|
| original.png | 338; Fictional metadata; pixel samples are unchanged. | 18c472a1a2280e3b9521780f171d289b09389986236ee9c5f3bd8e5381e64f65 |
| metadata-edit.png / defined replacement output | 330; Edited locally for the SHA-256 exercise. | 2fa04e1ba0dbfca6e08b1759c13ef57216bf60da1449337b070f31874f570cec |
| Separate built-in Try synthetic PNG hash | 266; no Description text; not downloadable original.png | 35a2e63eea43294926f80c6edca1f55e49234429ee9f7bf3b343870cf840cd57 |
Use mismatch, empty and error states deliberately
Change one hexadecimal character of a valid expected digest to exercise a mismatch. A blank expected field skips the comparison; it is not a zero hash. The expected input requires 64 hexadecimal characters without a filename or prefix. Uppercase hex and outer whitespace are accepted.
An empty file has a real SHA-256, while an unreadable file, over-20-MiB input, cancellation or Web Crypto failure has no accepted new digest. Cancel discards a late result; the browser's current read/digest may still finish internally. For an image-level question, use the separate native-size RGBA comparer and keep its conditions in the exported report.
- Compare the actual decoded-image policy — A different file digest does not by itself locate any pixel difference.
Sources and reproducible inputs
- Download the original synthetic RGBA PNG — Project-authored 8 × 6 PNG, 338 bytes. Four colored regions, alpha controls and one Description tEXt field: Fictional metadata; pixel samples are unchanged. This canonical download differs from the separate 266-byte built-in hash sample.
- Download the verified metadata text replacement — 330-byte output replacing original.png chunk-2 Description with “Edited locally for the SHA-256 exercise.” using tEXt. Original IDAT is retained; independent decoded samples match.
- NIST FIPS 180-4, August 2015 — Fixed Secure Hash Standard used for SHA-256. A content digest identifies bytes; this workflow does not add identity authentication or signature validation.
- W3C Web Cryptography API, 26 January 2017 — Fixed Recommendation defining SubtleCrypto.digest and SHA-256. The tool uses the browser API with no substitute hash algorithm.
- W3C PNG Third Edition, 24 June 2025 — Fixed primary specification for the PNG signature, chunks, CRC, image dimensions, alpha and embedded metadata. A subset structure check does not certify full conformance.
Continue with your file
- Group byte duplicates and compare decoded pixels — Use the operation that matches the identity question you need to answer.
- Review exact-field PNG editing — Staged operations, duplicate keywords and retained-IDAT checks have their own scope.