Skip to content
Plaintools

Hash generator

Compute cryptographic digests directly in your browser using the Web Crypto API. Paste text or drop a local file to calculate SHA-256, SHA-384, SHA-512, or legacy SHA-1 in hex and base64. Your data never leaves your device.

Web Crypto API · Never uploaded

Enter or paste text above to compute its cryptographic hash.

Hash generator example

SHA-256 digest of sample text

Text 'The quick brown fox jumps over the lazy dog' produces SHA-256 hex d7a8fbb307d7809469ca9abb0082e4f8d5651e46d3cdb762d02d0bf37c9e592e and base64 16j7swfXgJRpypq7AILk+NVlHkbTzbdi0C0L83yeWS4=.

Hash generator how-to

  1. Select algorithm: SHA-256, SHA-384, SHA-512, or SHA-1. Warn that SHA-1 is legacy and insecure.
  2. If input is text: encode to UTF-8 bytes using TextEncoder(). If input is a File: read into an ArrayBuffer via file.arrayBuffer().
  3. Call Web Crypto API: `await crypto.subtle.digest(algorithm, bytes)`.
  4. Convert the resulting ArrayBuffer to hex: map each byte to 2-character zero-padded lowercase hex.
  5. Convert the ArrayBuffer to base64: byte-to-binary string, then btoa.
  6. Never upload bytes or transmit them over the network.

Related tools

Dev

JWT decoder

Read a JWT header and payload, with human timestamps and an expired flag. The token stays in the tab.

Dev

Timestamp converter

Convert Unix epoch timestamps in seconds or milliseconds to ISO 8601, UTC, and local time.

Dev

Password generator

Generate strong, cryptographically secure random passwords with customizable length and character sets client-side.

Dev

UUID generator

Generate RFC 4122 compliant UUID v4 (random) and UUID v1 (timestamp-based) identifiers with bulk generation and formatting options.

Dev

Base64 encode & decode

Encode and decode Base64 strings and files entirely in your browser. Supports full UTF-8 Unicode, URL-safe Base64, line wrapping, and data URLs.

People also use

Dev

Text diff checker

Compare two texts with a live line and word diff. Optional ignore-whitespace.

Dev

CSV to JSON converter

Convert CSV records to a JSON array of objects with header mapping and type detection.

Hash generator FAQ

What is a hash generator?
A hash generator turns text or a file into a fixed-length digest (checksum) using a hash function such as SHA-256, SHA-384, SHA-512, or SHA-1. The same input always gives the same output, and any change gives a completely different one, which is how people verify downloads and file integrity. On Plaintools it runs locally in the browser via the Web Crypto API, so nothing is uploaded.
Does this hash generator send my files or text to a server?
No. Calculations run locally using the browser’s Web Crypto API (crypto.subtle.digest). Files are read into a local memory buffer and are never uploaded or transmitted over the network.
Which hash algorithms are supported?
SHA-256, SHA-384, SHA-512, and SHA-1. SHA-256 is the standard default for data integrity. SHA-1 is labeled legacy because it is cryptographically broken and should only be used to verify existing legacy checksums.
Why are both hex and base64 outputs provided?
Hexadecimal is standard for file checksums (such as sha256sum) and git commits. Base64 is commonly used for HTTP headers, Subresource Integrity (SRI) attributes, and API authentication tokens. Both can be copied with one click.
Can I hash large files?
The tool reads files directly into an in-memory buffer in your browser tab. Typical files up to hundreds of megabytes hash quickly, limited only by your computer’s available memory.
Is MD5 supported?
No. MD5 is not part of the standard Web Crypto API (SubtleCrypto) in modern web browsers due to collision vulnerabilities. Use SHA-256 or SHA-512 for secure checksums.
How do I calculate hashes without this page?
Select algorithm: SHA-256, SHA-384, SHA-512, or SHA-1. Convert text to UTF-8 bytes with TextEncoder, or read a file as an ArrayBuffer. Call crypto.subtle.digest(algorithm, buffer). Convert resulting bytes to lowercase hex (pad with leading zero to 2 hex digits per byte) or base64 with btoa.