# Hash Generator

Canonical URL: https://offlineutils.com/hash-generator
Category: Developer
Published: 2026-06-24
Publisher: offlineutils.com
Runs entirely in the browser; nothing entered into the tool is uploaded.

> A Hash Generator takes input text and produces a fixed-length cryptographic digest — SHA-256, SHA-1, SHA-512, or MD5 — using the browser's native SubtleCrypto Web API, with no server processing.

Paste text or upload a file to compute its hash in real time. SHA-256 and SHA-512 are computed via crypto.subtle.digest, the standardized Web Cryptography API. MD5 is provided for legacy interoperability and is computed with a small pure-JavaScript implementation — never use MD5 for security-critical work.

## Features

- SHA-256, SHA-384, SHA-512 via the Web Crypto SubtleCrypto API
- SHA-1 and MD5 for legacy interoperability
- Live hashing as you type for text input
- Drag-and-drop file hashing (streamed, never uploaded)
- Hex or Base64 output

## Use cases

- Verifying an integrity checksum from a download mirror
- Generating a content-addressed key for a static asset
- Comparing a hash you computed locally with one posted by a vendor
- Building a quick fingerprint for a config blob

## How to use it

1. **Paste text or drop a file** — Either paste a string or drag-and-drop a file into the input area.
2. **Pick an algorithm** — SHA-256 is the safe default. SHA-1 and MD5 are available for legacy interop only.
3. **Copy the digest** — Choose hex or Base64 output and click Copy.

## When to use it, and when to use something else

- **vs `shasum` / `openssl dgst` in the terminal** — use Hash Generator when you want a paste-and-go UI in the browser with file drag-and-drop. Use `shasum` / `openssl dgst` in the terminal when you are already scripting and want it in a pipeline.
- **vs Online hash sites that upload your file** — use Hash Generator when the file or text is sensitive and cannot be uploaded. Use Online hash sites that upload your file when you also need server-side comparison against a known DB.

## Frequently asked questions

### Which hash should I use?

SHA-256 is the right default for general-purpose use. SHA-512 is faster on 64-bit systems for large inputs. SHA-1 and MD5 are broken for cryptographic purposes and should only be used for legacy interop or non-security checksums.

### Why is MD5 considered insecure?

Practical collision attacks against MD5 have existed since 2004. Treat MD5 as a non-cryptographic checksum only — never use it to verify integrity against an adversary.

### Are hashes reversible?

No. A cryptographic hash is a one-way function. There is no key that decrypts a SHA-256 digest back into the original input.

### Does this support hashing files?

Yes. Drop a file onto the input — we stream it through SubtleCrypto without ever uploading it.

## Related tools

- https://offlineutils.com/uuid-generator
- https://offlineutils.com/password-generator
- https://offlineutils.com/jwt-decoder
