Developer Tools
SHA Hash Generator
Generate SHA-2 hashes for text and files locally.
Maximum 25 MB. The file stays in your browser and is not uploaded.
About This Tool
A cryptographic hash turns a sequence of bytes into a fixed-length digest. Developers use hashes to compare file contents, verify that data matches an expected checksum, identify content, and build integrity workflows. This tool calculates modern SHA-2 digests for typed text or a local file and shows the same digest in hexadecimal and Base64 representations.
How To Use It
- Choose SHA-256, SHA-384, or SHA-512.
- For text, enter the exact characters to hash and select Hash text. Text is encoded as UTF-8 before hashing.
- For a file, choose a local file up to 25 MB. The browser reads it locally and calculates the digest without uploading it.
- Compare or copy the hexadecimal or Base64 digest. When verifying a checksum, make sure the algorithm and output encoding match the expected value.
Examples
Verify downloaded content
If a publisher provides a SHA-256 checksum, choose SHA-256, select the downloaded file, then compare the generated hexadecimal digest with the publisher's value. Matching hashes provide strong evidence that the bytes are identical to the referenced file.
Hash UTF-8 text
Hashing Hanakash and hashing hanakash produce different digests. Case, whitespace, punctuation, and every other encoded byte affect the result.
Hex versus Base64
Hexadecimal and Base64 can represent the same digest bytes using different alphabets. A SHA-256 digest is 32 bytes; its usual hex form has 64 characters while Base64 is shorter.
Useful Notes
SHA-2 algorithms
SHA-256, SHA-384, and SHA-512 are members of the SHA-2 family. The number refers to the digest length in bits. This tool intentionally does not offer MD5 or SHA-1 because they are unsuitable for collision-resistant security uses.
Hashing is not encryption
A hash is a one-way digest, not encrypted text. There is no decryption key that restores the original input. The same exact input produces the same digest, which makes hashing useful for integrity comparisons rather than reversible storage.
Text encoding matters
Text is converted to UTF-8 bytes before hashing. Visually similar text can have different underlying Unicode representations, and spaces or line endings change the bytes. When comparing hashes from different systems, confirm that both systems hashed exactly the same byte sequence.
Local file hashing and size limit
The Web Crypto digest API processes the selected file locally, but this implementation must read the complete file into memory. Hanakash therefore limits file input to 25 MB to keep the tool responsive on mobile devices. No file content is sent to an API.
Not a password-storage tool
General-purpose SHA-2 hashes are fast by design and should not be used alone to store user passwords. Password storage normally requires a dedicated salted password-hashing function such as Argon2id, scrypt, bcrypt, or PBKDF2 with an appropriate configuration.
FAQ
Which hash algorithm should I choose?
Use the algorithm specified by the checksum or system you are interoperating with. If you are defining a new general integrity workflow and have no external requirement, SHA-256 is a widely supported modern default.
Does Hanakash upload the file?
No. The selected file is read and hashed in the browser. This tool does not send its contents to a server or third-party service.
Why does one character change the whole hash?
Cryptographic hash functions are designed so small input changes produce substantially different-looking digests. This avalanche behavior helps make accidental or intentional changes easy to detect when comparing expected hashes.
Can I use this to recover text from a hash?
No. Hashing is intentionally one-way. This tool calculates a digest from input; it does not reverse or crack hashes.
Related Tools
Base64 Encode / Decode
PopularConvert plain text and Base64 in either direction.
Text Difference Checker
Compare two texts and find line-by-line changes.
JSON Formatter & Validator
PopularValidate JSON, pretty-print it, minify it, and inspect JSON paths.
UUID Generator
PopularCreate secure random UUID v4 values.