Hash / HMAC

Compute MD5, SHA, and HMAC digests locally in the browser

Run digest and HMAC computations over UTF-8 text or hex/base64 binary input. Ideal for file checksums, verifying server signatures, and producing test data. Output is copyable as hex or base64.

Algorithms available

  • MD5 — checksum only. Fast but not cryptographically safe.
  • SHA-1 — useful for Git commit comparisons and legacy signatures. Avoid in new systems.
  • SHA-256 / SHA-384 / SHA-512 — modern defaults for integrity, signatures, and identifiers.
  • HMAC-SHA-1/256/384/512 — keyed authentication for webhooks, API signing, and similar flows.

Working with HMAC

HMAC is not simply `hash(key + message)`. It pads the key, XORs it with ipad and opad, and hashes twice. A mismatched encoding between client and server is the most common cause of signature mismatch.

Three usual culprits: (1) the key should be raw UTF-8 but was pasted as base64, (2) newline style (`\n` vs `\r\n`) differs in the message, (3) output is compared as hex while the server returns base64. This tool lets you flip each encoding independently to spot the mismatch.

Common recipes

AWS Signature v4 style

HMAC-SHA-256, key: derived signing key, message: canonical request, output: hex

GitHub webhook

HMAC-SHA-256, key: repo secret, message: raw body, output: 'sha256=' + hex

File integrity

SHA-256 digest, input: UTF-8 text or file bytes, output: hex

FAQ

Q. Can I use MD5 to hash passwords? No. Use bcrypt, argon2, or scrypt — memory-hard algorithms built for the purpose.

Q. Are SHA-256 and HMAC-SHA-256 the same? No. SHA-256 summarises data without a key. HMAC pairs a shared key with the data to prevent forgery.

Q. Can I hash binary files? Today only hex or base64 pasted input is supported; direct file upload is not.

Pairs well with

Jump to other JSON2Class utilities that naturally follow this one.

JSON to Java

Generate Java DTOs and review validation-oriented API models.

JSON to Kotlin

Review nullability and Kotlin data class structure quickly.

JSON Formatter

Format sample payloads before sending them back into the converter.