# Hash generator

> MD5, SHA-1, SHA-256, and SHA-512 checksums for text or a file, with HMAC.

Free SHA-256 and MD5 hash generator. Checksum text or a file with MD5, SHA-1, SHA-256, and SHA-512, copy hex or base64, compare an expected digest, and compute HMAC. The bytes stay in the browser.

- Page: https://benchline.fabwaseem.com/t/hash-generator
- Runs: in the browser. Input stays on the device.
- Price: free, no account
- Input: UTF-8 text or a file, an optional HMAC key, and an optional expected digest.
- Output: MD5, SHA-1, SHA-256, and SHA-512 in hex and base64, plus the algorithms that match an expected digest.
- Keywords: sha256 generator, md5 hash, file checksum, hmac generator
- Updated: 2026-10-18
- Built by: Waseem Anjum (https://fabwaseem.com)

## How to use it

1. **Paste text or drop a file.** Text is hashed as UTF-8. A file is hashed as its raw bytes.
2. **Add an HMAC key only if you need one.** Leave the key empty for a plain checksum. A key switches every algorithm to HMAC.
3. **Copy the digest or compare it.** Each algorithm is shown in hex and base64. Paste an expected checksum to see which one matches.

## Use it from an AI agent

MCP tool name: `hash_data`
MCP endpoint: https://benchline.fabwaseem.com/mcp (Streamable HTTP, no key)
HTTP: POST https://benchline.fabwaseem.com/api/v1/tools/hash-generator with the input as the JSON body
This call does not fetch anything. It runs on the arguments you send.

Compute MD5, SHA-1, SHA-256, and SHA-512 for UTF-8 text or base64 bytes. Pass hmacKey for HMAC and expected to see which digest matches.

### Input schema

```json
{
  "type": "object",
  "properties": {
    "text": {
      "description": "UTF-8 text to hash. Use this or base64.",
      "type": "string"
    },
    "base64": {
      "description": "Raw bytes as standard base64.",
      "type": "string"
    },
    "hmacKey": {
      "description": "UTF-8 HMAC key. Omit it for a plain digest.",
      "type": "string"
    },
    "expected": {
      "description": "Hex or base64 digest to compare.",
      "type": "string"
    }
  },
  "additionalProperties": false
}
```

### Example tools/call

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "hash_data",
    "arguments": {}
  }
}
```

Setup for Claude, Cursor, and VS Code: https://benchline.fabwaseem.com/mcp/guide

## Questions

### Which hash should I use for a file checksum?

SHA-256 is the usual choice. SHA-512 is fine too. MD5 and SHA-1 still show up in older manifests, but they are not collision-resistant.

### Is the file uploaded?

No. The browser reads the file and hashes it locally. Nothing is posted.

### What is HMAC?

HMAC mixes the message with a secret key before hashing. The same text and the same key always produce the same digest. A plain checksum has no key.

### Can I check a published checksum?

Yes. Paste the expected hex or base64 digest. The matching algorithm is marked, and spaces or colons in the hex are ignored.

## Related tools

- [Password generator](https://benchline.fabwaseem.com/t/password-generator): Cryptographic passwords and passphrases, with an entropy strength meter.
- [JWT decoder](https://benchline.fabwaseem.com/t/jwt-decoder): Paste a JSON Web Token, read the claims, and verify the signature in the browser.
- [UUID generator](https://benchline.fabwaseem.com/t/uuid-generator): Generate UUID v4 or v7 in bulk, and read the time stored in a v7 id.
- [Unix timestamp converter](https://benchline.fabwaseem.com/t/unix-timestamp): Turn epoch seconds or milliseconds into a date, and a date in any time zone back into epoch time.
