# Large-file hasher: MD5, SHA-1 and SHA-256

Hash very large files in the browser, with no fixed size limit: MD5, SHA-1 and SHA-256 in a single pass. Files are read from the user's own disk in small chunks and never uploaded. Interactive tool: https://digitalforensics.co.uk/tools/file-hasher/ (offline copy available there, with its SHA-256).

## Reference values to test any hashing tool

| Input | Algorithm | Hash |
|---|---|---|
| Empty file (0 bytes) | MD5 | `d41d8cd98f00b204e9800998ecf8427e` |
| Empty file (0 bytes) | SHA-1 | `da39a3ee5e6b4b0d3255bfef95601890afd80709` |
| Empty file (0 bytes) | SHA-256 | `e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855` |
| abc (3 bytes) | MD5 | `900150983cd24fb0d6963f7d28e17f72` |
| abc (3 bytes) | SHA-1 | `a9993e364706816aba3e25717850c26c9cd0d89d` |
| abc (3 bytes) | SHA-256 | `ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad` |

## Good practice

- Use SHA-256 to show that evidence has not changed. MD5 and SHA-1 are still quoted for matching older records, but deliberate collisions are possible for both. Collisions do not let someone change an existing file to match a hash already recorded, but SHA-256 removes the argument.
- Hash the original, record the value and the tool, and re-hash the working copy to confirm they match.
- Quick check only: verify hashes you will rely on with validated tools and record the method you used.

## Questions

### Are my files uploaded?

No. The hasher reads each file from your own disk in small chunks inside your browser and sends nothing to this site or anyone else. You can disconnect from the internet after the page loads, or use the offline copy. Browser extensions and your own device are outside our control, so follow your organisation's rules for case data.

### How large a file can it hash?

There is no fixed limit: files are read a few megabytes at a time, so memory use stays small. Very large disk images simply take longer. Keep the tab open until it finishes.

### Why is it slower than a desktop tool?

The hashing runs as JavaScript inside the browser rather than as native code, and the three algorithms share one pass over the data. Untick MD5 and SHA-1 if you only need SHA-256.

### Which hash should I use for evidence?

SHA-256. MD5 and SHA-1 are still quoted in older records and some procedures, but practical collision attacks exist for both, so they should not be the only hash you rely on. Collisions do not let someone change an existing file to match a hash already recorded, but SHA-256 removes the argument.

### Can I check a download against a published hash?

Yes. Paste the published hash into the expected hash box and the tool says whether any hashed file matches. You can use this to check the offline copies of our own tools.

### Can I rely on this for a report or court?

Treat it as a quick check, not validated forensic software. Verify important results with your own validated tools and record the method you used. Nothing here is legal advice.
