Free Hash Generator — MD5, SHA-1, SHA-256, SHA-384 and SHA-512
This is a free online hash generator that computes cryptographic hashes from any text or file directly in your browser. Paste or type text and the five most common algorithms — MD5, SHA-1, SHA-256, SHA-384, and SHA-512 — update instantly as you type. Switch to File mode to drop a document, image, installer, or archive and get the same five hashes without the bytes ever leaving your device.
SHA algorithms run through the Web Crypto API (crypto.subtle.digest), the same primitive your browser uses for TLS. MD5 runs through a self-contained JavaScript implementation because browsers no longer expose MD5 natively. Files are read locally through the FileReader API, so even gigabyte-scale files are hashed without an upload.
Which hash algorithm should you use?
SHA-256 — the modern default
If you’re not sure which one to pick, use SHA-256. It’s fast, universally supported, and cryptographically secure for every mainstream use case — verifying file downloads, computing Subresource Integrity values, building content-addressed storage, signing tokens, and generating stable fingerprints of data. SHA-256 is the algorithm behind Git’s new object format, Bitcoin, TLS certificates, and most modern APIs.
SHA-384 and SHA-512 — longer digests
SHA-384 and SHA-512 produce longer outputs (96 and 128 hex characters respectively) and are mandated by some protocols and compliance regimes — for example, TLS 1.3 cipher suites, JWT HS384/HS512 signatures, and certain government standards. On 64-bit hardware, SHA-512 is often faster than SHA-256 because it processes 64-bit words natively. Use them when a spec tells you to; otherwise SHA-256 is plenty.
SHA-1 — legacy only
SHA-1 has been broken for collision resistance since 2017 (the SHAttered attack). Don’t use it for anything where an attacker picks the input — no signatures, no certificates, no security checks. It’s still fine for verifying legacy artifacts that were hashed with SHA-1 before the break: older Git commits, historical TLS fingerprints, and non-adversarial file checksums.
MD5 — checksums only
MD5 has been broken since 2004 and must not be used for anything security-sensitive. It is, however, still perfectly reasonable for non-adversarial integrity checks: verifying a trusted download matches the publisher’s advertised MD5, deduplicating files from a source you trust, or generating cache keys. Never hash passwords or sign documents with MD5.
How to use this hash generator
Hashing text
- Stay on the Text tab (the default).
- Paste or type into the text area. All five hashes update live as you type.
- Optionally toggle UPPERCASE or Base64 (not hex) to match the format you need.
- Click Copy next to any row, Copy all to grab the full set, or Download .txt to save a copy.
Hashing a file
- Switch to the File tab.
- Drop a file onto the drop zone or click to browse.
- The tool reads the file locally and computes all five hashes. Nothing is uploaded.
- Compare the generated SHA-256 (or whichever algorithm the publisher uses) against the value on their website. Matching strings confirm an untampered download.
Hex vs. Base64 — which format do you need?
Hex is the default and is what you’ll see on most “verify this download” pages — each byte becomes two hex digits, so a SHA-256 is 64 characters long. Base64 encodes the same bytes more densely (three bytes per four characters) and is what you’ll see in HTTP Subresource Integrity (integrity="sha256-…"), Content-Security-Policy headers, JWT signatures, and many TLS certificate fingerprints. Toggle Base64 (not hex) when the spec you’re following calls for it.
Common use cases
- Verify file downloads — compare the generated SHA-256 against the publisher’s published value to confirm the file wasn’t tampered with or corrupted.
- Subresource Integrity (SRI) — generate a Base64 SHA-256 or SHA-384 to drop into a
<script integrity="sha384-…">tag. - Git object hashes — compute the SHA-1 or SHA-256 of a file to compare against Git’s object store.
- Deduplication — hash each file in a set and treat matching digests as duplicates.
- Cache keys — turn a long input (a URL, a JSON payload) into a fixed-length key for a cache lookup.
- Content addressing — generate stable IDs for immutable blobs in object storage or a CDN.
What this tool is not for
Don’t use raw MD5, SHA-1, or SHA-256 to store passwords. Password hashing requires a slow, memory-hard algorithm with a per-user salt — Argon2id, scrypt, or bcrypt. Plain SHA-256 is designed to be fast, which is exactly the opposite of what you want when an attacker has stolen your password database and wants to brute-force it on a GPU. This tool is built for fingerprinting data, not credential storage.
Privacy and offline use
Everything runs locally in your browser. Text and file bytes never leave your device, nothing is logged or cached on a server, and there are no analytics on your input. Once the page has loaded you can disconnect from the internet and the hash generator keeps working — useful when you’re verifying a sensitive download and don’t want the contents to leave your machine.