Hash Generator
Type text or drop a file. Get six hashes at once. Nothing leaves your browser.
- 0
- Bytes
- 0
- Characters
- 0
- Hashes
On this page
About Hash Generator
Updated
What is a Hash Generator?
A Hash Generator computes hash digests of text or files. Type or paste text into the editor, or drop a file on it, and six algorithms run at once: MD5, SHA-1, SHA-256, SHA-384, SHA-512 and CRC32.
How to use this tool
Type text and the hashes update as you type. Each hash has its own Copy button. Copy and Download in the Result header take all six hashes as text. Open Options to switch between hex and Base64, upper or lower case letters, or to add a salt.
File hashing
Drop any file on the editor, or press File, to hash the file itself, byte for byte. The file is read in your browser and nothing is uploaded. This is useful to check a download against its published checksum. Type in the editor to go back to text.
About cryptographic hashing
A cryptographic hash function takes an input of any size and gives a fixed-size output, the hash or digest. The same input always gives the same hash, but even a tiny change in the input gives a completely different hash. That makes hashes useful to check data integrity, for digital signatures, and to address content.
Algorithms supported
- MD5 (128-bit). Fast but broken for security. Still used for checksums.
- SHA-1 (160-bit). Not safe for security any more. Git is moving from SHA-1 to SHA-256.
- SHA-256 (256-bit). The most widely used secure hash, used in TLS, Bitcoin and code signing.
- SHA-384 (384-bit). A shortened form of SHA-512, used in TLS.
- SHA-512 (512-bit). The largest SHA-2 variant, and often faster than SHA-256 on 64-bit computers.
- CRC32 (32-bit). Not cryptographic, but widely used in ZIP files, Ethernet and PNG to detect errors.
Security considerations
MD5 and SHA-1 are broken for cryptographic use. Do not use them for password hashing, digital signatures or certificate checks. To store passwords, use a dedicated algorithm such as bcrypt, scrypt or Argon2. Where collision resistance matters, use SHA-256 or SHA-512.
Hashing in the browser
This tool uses the Web Crypto API (crypto.subtle.digest()) for SHA-1, SHA-256, SHA-384 and SHA-512. MD5 comes from the small js-md5 library and CRC32 from our own code. Your data never leaves your browser.
Other hashing resources
- Cryptographic Hash FunctionsOverview of cryptographic hash functions, their properties, and common algorithms.
- MDN: SubtleCrypto.digest()The browser's Web Crypto API for computing hash digests.
- SHA-2 Family (SHA-256, SHA-384, SHA-512)The SHA-2 family of hash functions designed by the NSA, widely used for security.
- OWASP: Password StorageWhy SHA and MD5 should not be used to store passwords, and what to use instead.
- RFC 1321: MD5 SpecificationThe original MD5 message-digest algorithm by Ron Rivest.
- CRC32 ChecksumHow CRC32 works and how it detects errors in network protocols and file formats.
Hash Generator FAQ
Is my data sent to a server?
No. All hashing is done in your browser with the Web Crypto API and JavaScript. Your text and files never leave your device.
Which algorithm should I use?
For security, use SHA-256 or SHA-512. For file checksums where security does not matter, CRC32 or MD5 are fine. Never use MD5 or SHA-1 for passwords, certificates or digital signatures.
Can I hash large files?
Yes. The file is read into memory in your browser, so the limit is your browser's free memory. Files of several hundred megabytes work on modern computers.
Why are MD5 and SHA-1 marked as not for security?
Both have known collision attacks: it is possible to create two different inputs with the same hash. That makes them unsafe for anything security-critical. They are still useful for checksums, such as checking that a file transfer worked.
What does the salt do?
The salt is text that is put in front of your input before hashing, so salt + text is hashed. The same text with a different salt gives a different hash. For storing passwords, use a dedicated password algorithm such as bcrypt, scrypt or Argon2 instead.
Does text hash the same as in other tools?
Yes, when the text is the same. The text is encoded as UTF-8 before hashing, which is what most tools do. Line breaks count too: a line break at the end of a file is a character, and the editor stores every line break as one LF character, also when you paste text with Windows line breaks (CR LF). To hash a file exactly as it is on disk, drop the file or press File instead of pasting its text.