Hash Generator Online Free

💻 Developer Tools ✔ Free Forever

Hash Generator Online Free

Generate MD5, SHA-1, SHA-256, SHA-384, SHA-512, and SHA-3 hashes from any text or file. Instant output, compare mode, batch hashing, and HMAC support. All processing stays in your browser.

✔ MD5 / SHA-1 / SHA-256 / SHA-512 ✔ SHA-3 & HMAC support ✔ File hashing ✔ Hash comparison ✔ 100% browser based
Algorithm
Format
Input Text
Hash Output
MD5enter text to generate
SHA-1enter text to generate
SHA-256enter text to generate
SHA-384enter text to generate
SHA-512enter text to generate
Load a sample
📄
Drop a file here
or browse to upload
MD5load a file to hash
SHA-1load a file to hash
SHA-256load a file to hash
SHA-384load a file to hash
SHA-512load a file to hash

Enter one value per line. Each line will be hashed with all selected algorithms.

Input (one per line)
Batch Output
Compare using
Text A
Text B
About This Tool

How this hash generator combines native crypto with hand-written algorithms

Modern browsers ship a real cryptographic library, the Web Crypto API, but it deliberately leaves out MD5 and SHA-3 because both are considered weak or nonstandard for security work. This tool covers that gap by implementing MD5 and Keccak-based SHA-3 (256 and 512-bit) entirely in hand written JavaScript, alongside SHA-1, SHA-256, SHA-384, and SHA-512, which come straight from the browser’s native crypto.subtle.digest. Seven algorithms, two different code paths, one consistent interface.

All hashing happens locally: native algorithms run through window.crypto.subtle, and MD5/SHA-3 run through pure JavaScript bit operations in this file. No text, file, or hash ever leaves your browser; there is no network call anywhere in the script.

Two hashing engines, one output format

AlgorithmOutput lengthEngine
MD5128 bits (32 hex chars)Hand-written JS, 64-round Merkle-Damgard construction
SHA-1160 bits (40 hex chars)Web Crypto API
SHA-256256 bits (64 hex chars)Web Crypto API
SHA-384384 bits (96 hex chars)Web Crypto API
SHA-512512 bits (128 hex chars)Web Crypto API
SHA3-256 / SHA3-512256 / 512 bitsHand-written JS Keccak-f[1600] permutation

What the MD5 implementation actually does

Since crypto.subtle won’t compute MD5, the tool carries its own implementation of the full algorithm: UTF-8 byte conversion, padding the message to a length congruent to 56 mod 64, appending the original bit length as a 64-bit value, then running four rounds of 16 operations each (the classic FF, GG, HH, and II bitwise functions) across four 32-bit state words.

Step 1 UTF-8 encode and pad Text is converted to UTF-8 bytes, a single 0x80 byte is appended, then zero bytes fill the buffer until its length is 56 modulo 64, leaving exactly 8 bytes free for the length field.
Step 2 Append the bit length The original message length in bits is written as a 64-bit little-endian value into those final 8 bytes, per the MD5 specification in RFC 1321.
Step 3 Process in 512-bit blocks Four 32-bit state variables (a, b, c, d), initialized to fixed constants, are transformed across 64 rounds per 512-bit block using bitwise rotation, modular addition, and a table of 64 precomputed sine-derived constants.
Step 4 Concatenate and hex-encode The four final state words are converted to little-endian hex and concatenated into the familiar 32-character MD5 digest string.
// simplified from the MD5 core round in the tool source function md5ff(a, b, c, d, x, s, t) { return md5cmn((b & c) | ((~b) & d), a, b, x, s, t); } function md5cmn(q, a, b, x, s, t) { return safeAdd( bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b ); }
MD5 and SHA-3 are text-only in this tool, by design. Hashing a binary file with the hand-written MD5 or SHA-3 implementations would mean converting every byte of the file into a JavaScript string first, which is both slow and error-prone for large files. Rather than risk an incorrect hash on binary data, the file-hashing panel explicitly reports “not supported in browser” for those two algorithms and only computes file hashes with the four Web Crypto SHA variants, which accept raw ArrayBuffer data directly and don’t have that limitation.
HMAC mode

When a secret key is supplied, SHA-1 through SHA-512 switch to HMAC via crypto.subtle.importKey and sign, producing a keyed hash for verifying message authenticity rather than a plain digest. MD5 and SHA-3 are excluded from HMAC mode since Web Crypto doesn’t support them as HMAC hash functions.

Compare mode

Runs one chosen algorithm against two separate text inputs and reports a direct match or mismatch, useful for confirming two pieces of text are byte-for-byte identical without eyeballing two long hex strings.

Batch mode

Hashes every non-empty line of a multi-line input independently, producing one output line per input line with all active algorithms’ results appended, for processing lists of values at once.

Web Crypto SubtleCrypto Hand-written MD5 (RFC 1321) Hand-written Keccak SHA-3

Cryptographic standards

  • RFC 1321 is the original MD5 specification this tool’s hand-written implementation follows.
  • FIPS 180-4 is the NIST standard defining SHA-1 through SHA-512, all computed here via Web Crypto.
  • FIPS 202 defines SHA-3 and the underlying Keccak sponge construction implemented by hand in this tool.
  • MDN: SubtleCrypto.digest() documents the native browser API this tool wraps for its non-MD5, non-SHA-3 algorithms.
  • RFC 2104 specifies HMAC, the keyed-hashing construction used in HMAC mode.

Where hashing gets used

Verifying a downloaded file’s SHA-256 checksum against the value published by its distributor, generating a quick MD5 fingerprint for legacy systems that still expect it, checking whether two configuration files or text blobs are truly identical using compare mode, computing HMAC signatures for testing webhook payload verification, and batch hashing a list of values, such as passwords for a training exercise, in one pass.

Common Questions

FAQ: Hash Generator Online Free

A hash generator takes any input (text, file, or data) and produces a fixed-length string called a hash or digest. Hashes are used to verify file integrity, store passwords securely, sign API requests, generate checksums, and confirm that data has not been tampered with.

MD5 and SHA-1 are older algorithms that produce shorter hashes and are considered cryptographically broken. They are still useful for checksums and non-security purposes. SHA-256 is the most widely used secure algorithm today. SHA-512 offers a longer output with higher security margin. For new systems, SHA-256 or SHA-512 is recommended.

No. All hashing runs inside your browser using the Web Crypto API and pure-JavaScript implementations. Nothing leaves your device. You can safely hash passwords, API keys, and confidential documents.

HMAC (Hash-based Message Authentication Code) combines a hash function with a secret key. It confirms both that the data has not changed and that the sender holds the correct key. HMAC is commonly used in webhook signatures, API request authentication, and JWT tokens.

Yes. Switch to File Hash mode and drop any file onto the upload area. The tool reads the file in your browser and computes SHA-1, SHA-256, SHA-384, and SHA-512 hashes immediately. This is useful for verifying that a downloaded file matches the checksum published by its source.

Batch mode lets you enter one value per line and hash all of them at once using every selected algorithm. The output shows each input alongside its hashes in a structured format you can copy or download as a .txt file.

No. Hash functions are one-way by design. There is no mathematical way to reverse a hash back to its input. Attackers can try to crack weak passwords by hashing common words and comparing results, which is why salted hashing is used for password storage.

Privacy Overview

Cookies let this site remember your preferences and show us which tools people actually use. Full detail sits in our Privacy Policy.