Skip to tool content
Hash Generator
Generate MD5, SHA-1, SHA-256, SHA-512 hashes from text or files. Compare checksums. Everything runs in your browser.
Hash Text
Input
Type or paste text to hash...
Hash File
Drop a file here or click to browse
Compare Hashes
What are Cryptographic Hash Functions?
A cryptographic hash function takes an input of any size and produces a fixed-length output (the “hash” or “digest”). The same input always produces the same hash, but even a tiny change in input produces a completely different hash. Hash functions are one-way — you cannot reverse a hash back to the original input.
Algorithm Comparison
| Algorithm | Output Size | Security Status |
|---|---|---|
| MD5 | 128 bits (32 hex chars) | Broken — do not use for security |
| SHA-1 | 160 bits (40 hex chars) | Deprecated — collision attacks known |
| SHA-256 | 256 bits (64 hex chars) | Secure — recommended |
| SHA-512 | 512 bits (128 hex chars) | Secure — recommended |
Common DevOps Use Cases
- File integrity verification — Compare SHA-256 checksums after downloading ISO images, packages, or binaries.
- Docker image digests — Docker uses SHA-256 to identify image layers.
docker pull nginx@sha256:... - Git commits — Git identifies commits, trees, and blobs using SHA-1 hashes (migrating to SHA-256).
- Package verification —
npm audit signatures, GPG signatures on Debian/RPM packages. - etag / cache busting — Hash file content for cache invalidation in CDN and web deployments.
Common Commands
# Generate hashes from command line echo -n "hello" | md5sum # Linux echo -n "hello" | md5 # macOS echo -n "hello" | sha256sum # Linux echo -n "hello" | shasum -a 256 # macOS # Verify file checksum sha256sum -c checksums.txt # Linux shasum -a 256 -c checksums.txt # macOS # Hash a file sha256sum myfile.iso openssl dgst -sha256 myfile.iso
Security note: MD5 and SHA-1 are broken for cryptographic purposes — collision attacks are practical. Never use them for digital signatures, password storage, or certificate verification. Use SHA-256 or SHA-512 for security-critical applications.