Hash Generator
Type a text to generate its MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes — calculated live.
crypto.subtle).
Type a text to generate its MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes — calculated live.
crypto.subtle).
A hash function transforms an input of any size (a text, a file) into a fixed-size sequence — the digest. The same input always produces the same hash, and a small change in the input completely changes the result (avalanche effect). A good cryptographic hash is one-way: it is infeasible to recover the original input from the digest. Hashes are used to verify file integrity, index data, store passwords (with salt and dedicated algorithms like bcrypt/argon2) and sign content.
The SHA hashes are calculated by the Web Crypto API
(crypto.subtle.digest), native to modern browsers and implemented in
optimized code. MD5, which Web Crypto deliberately does not
offer (being a legacy algorithm), is calculated by a pure JavaScript implementation
included on this page, following RFC 1321. In both cases, the text is first converted
to UTF-8 bytes, so accented characters and emojis produce the same
hash as command-line tools.
No. MD5 and SHA-1 are broken and, in addition, general-purpose hashes are too fast for passwords (making brute-force attacks easier). For passwords, use algorithms designed for that purpose, such as bcrypt, scrypt or argon2, always with salt.
The result depends on the byte encoding. This tool uses UTF-8, the web standard. If another tool uses Latin-1 or UTF-16, the hash of the same text will be different because the input bytes are different.
This version works with text. For files, the same concept applies by reading the file's bytes; we may add support for local upload (without sending) in a future version.