Hash Generator API

Compute MD5, SHA-1, SHA-256, SHA-384, SHA-512 and CRC32 of text or files in one call, as hex or base64, with optional HMAC signing.

GETPOSThttps://apibox.io.vn/v1/hash
Security & Crypto▶ Try it online

The Hash API computes checksums and cryptographic digests of a string or a file. By default it returns all supported algorithms at once – MD5, SHA-1, SHA-256, SHA-384, SHA-512 and CRC32 – or only the ones you list in algorithm (comma separated, e.g. sha256,md5).

Send the input as text (query or JSON), as a raw text body, or hash binary data: upload a file in the multipart field file, post the raw bytes, or pass base64 in file_base64. Files can be as large as your plan allows (Free 5 MB, Starter 20 MB, Pro 50 MB). The response also reports the number of bytes hashed.

Set hmac_key to get HMAC signatures instead of plain digests (HMAC-SHA256 is what most webhook providers use), and encoding=base64 for base64 output instead of hex. CRC32 is always returned as 8 hex characters.

Parameters

NameInTypeRequiredDefault
textbody|querystringyesText to hash (UTF-8). Not needed when a file or a raw text body is sent.
filebodyfilenoFile to hash: multipart field file, raw binary body, or base64 in file_base64. Max 5/20/50 MB by plan.
algorithmbody|querystringnoallall or a comma-separated list of md5, sha1, sha256, sha384, sha512, crc32 (alias algorithms).
encodingbody|querystringnohexhex or base64 (CRC32 is always hex).
hmac_keybody|querystringnoSecret key: returns HMAC signatures instead of plain hashes.

Example

curl -X POST "https://apibox.io.vn/v1/hash" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"hello world"}'

Response

{
  "encoding": "hex",
  "bytes": 11,
  "hashes": {
    "md5": "5eb63bbbe01eeed093cb22bb8f5acdc3",
    "sha1": "2aae6c35c94fcfb415dbe95f408b9ce91ee846ed",
    "sha256": "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9",
    "sha384": "fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd",
    "sha512": "309ecc489c12d6eb4cc40f50c902f2b4d0ed77ee511a7c7a9bcd3ca86d4cd86f989dd35bc5ff499670da34255b45b0cfd830e81f605dcf7dc5542e93ae9cd76f",
    "crc32": "0d4a1185"
  }
}

Use cases

  • Verify file integrity with SHA-256 checksums after upload or download
  • Compute HMAC-SHA256 signatures to test webhook verification code
  • Create cache keys or ETags from content
  • Deduplicate uploaded files by their hash

FAQ

How do I compute an HMAC-SHA256 signature?

POST {"text": "payload", "algorithm": "sha256", "hmac_key": "your-secret"}. Add "encoding": "base64" if the provider expects base64 (Shopify, for example) instead of hex (GitHub, Stripe).

Can I hash a file instead of text?

Yes. Upload it as multipart field "file", send the raw bytes as the request body, or pass "file_base64" in JSON. The limit is your plan’s file size (5/20/50 MB).

Is MD5 still safe to use?

Not for passwords or signatures: MD5 and SHA-1 are broken against collisions. They are still fine for non-security checksums and legacy compatibility; use SHA-256 or SHA-512 for anything security related, and a slow KDF such as bcrypt or Argon2 for passwords.

Related APIs

Start with 1,000 free requests every month. Get free API key →