Calculate a SHA or MD5, or an HMAC with SHA or MD5

HEX-encoded result:
Base64-encoded result:
Notes:
  1. This page uses the crypto-js library, loaded from cdnjs.cloudflare.com, for the checksums and HMACs and encoding.
  2. Any data you enter on this page stays in the browser, and is never sent to any third-party site. The hash computation is performed in your browser.
  3. The base16 and base64 results shown by this page are different encodings that represent the same value.
  4. Base16 encoding is sometimes called "Hex encoding".
  5. If you specify a key for HMAC, the key is used only for HMAC calculation, and never leaves your browser.
  6. Here are a few test cases:
    Algmessagekeyresult
    SHA-1abc-- (b16) a9993e364706816aba3e25717850c26c9cd0d89d
    (b64) qZk+NkcGgWq6PiVxeFDCbJzQ2J0=
    SHA-256abc-- (b16) ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
    (b64) ungWv48Bz+pBQUDeXa4iI7ADYaOWF3qctBD/YfIAFa0=
    HMAC-sha256 abcsecret (b16) 9946dad4e00e913fc8be8e5d3f7e110a4a9e832f83fb09c345285d78638d8a0e
    (b64) mUba1OAOkT/Ivo5dP34RCkqegy+D+wnDRShdeGONig4=
  7. Just a reminder, base64-encoded values are case sensitive, base16-encoded results are not. This is characteristic of the encodings, not special to this page, or to hash functions or HMACs.
  8. For message content, whitespace in the content is significant. Line-breaks will be converted to newline (\n). It's not possible to include a carriage-return (CR) in the text value, because the logic on this page strips them. Trailing newlines will not be stripped. And remember, the hash for 'abc\n' is completely different from the hash for 'abc'.
  9. Unicode is ok. The calculator will encode the string as UTF-8 bytes before computing the checksum. UTF-8 ought to be good enough for anybody. :)