Developer tools

Hash Generator

Create standards-based SHA-2 hashes from UTF-8 text using the browser’s Web Crypto API, with hexadecimal and Base64 output.

Hash text with SHA-2

Check a known SHA-256 digest

Choose SHA-256 and hash abc without a trailing newline. Compare the complete result below. Hexadecimal and Base64 are representations of the same digest bytes; they are not different hashing algorithms.

Input or checkExpected result or decision
abcba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
abc followed by a newlineA different digest: line endings are part of the UTF-8 input.
Password storageUse an appropriate password hashing scheme in an application; this text-digest tool is not one.
abc followed by LF (U+000A)edeaaff3f1774ad2888673770c6d64097e391bc362d7d6fb34982ddf0efd18cb; the final newline is part of the UTF-8 input.
abc followed by CRLF (U+000D U+000A)Browser textareas normalize CRLF to LF, so this tool hashes abc followed by LF. Hash the original file bytes in a file-checksum workflow if you need to preserve CRLF.

How it works

  • Choose SHA-256, SHA-384, or SHA-512.
  • Text is encoded as UTF-8 before hashing.
  • Compare the complete digest; even a one-character change produces a different value.

Common uses

  • Checking whether copied text changed.
  • Generating a test digest for an API integration.
  • Comparing content fingerprints without uploading the content.
Your input stays in this browser. Nothing entered into this tool is sent to the Anvil Tools server.

A practical walkthrough

  1. Enter a short text sample, choose SHA-256, and generate its digest. Change one character and compare the new result.
  2. Use the same algorithm and exact input bytes when comparing two digests. Spaces and line endings are part of the input.
  3. Use Copy hexadecimal to copy the hexadecimal digest, or select the Base64 digest manually. Compare the exact input bytes when checking a known hash.

Tips for a reliable result

This hashes UTF-8 text. It is not a password-storage system, and a digest cannot be decoded back into its original text.

What to use next

These tools open separately; inputs are not transferred.

Text tools

Text Difference Checker

Compare two texts line by line and highlight additions and removals.

Open tool →
Developer tools

Base64 Encoder & Decoder

Convert text to Base64 and back, entirely in your browser.

Open tool →
Generators

UUID Generator

Generate cryptographically random RFC 4122 version 4 UUIDs.

Open tool →
Developer tools

CSV to JSON Converter

Convert quoted CSV data into JSON arrays or objects locally.

Open tool →

How this tool handles your data

The browser calculates the digest from UTF-8 text. The input and hash are not sent to an Anvil processing server.

Compare privacy behavior across all tools.

Known limitations

A hash does not encrypt data, prove authorship, or safely store passwords by itself. Unicode normalization and byte-for-byte input differences produce different results.

Related guide and Lab test

Questions and troubleshooting

Can a hash be reversed?

A cryptographic hash is designed to be one-way. It is not encryption and cannot be decoded back into the original text.

Should I hash passwords with this tool?

No. Password storage requires a salted, deliberately slow password-hashing function such as Argon2id, scrypt, bcrypt, or PBKDF2 on a trusted server.

When two digests do not match

Use the same algorithm and compare the exact UTF-8 text, including capitalization, trailing spaces, and line endings. Compare the same output representation. This text tool does not hash uploaded file bytes; use a file-checksum workflow for archives or downloads.

Why do two visually identical texts have different hashes?

Invisible spaces, line endings, and Unicode representations change the input bytes. Compare the exact input before assuming the hashing algorithm is wrong.

Can I use a plain SHA digest to store passwords?

This tool computes general-purpose text digests. Password storage requires a purpose-built password hashing scheme with appropriate salts and work factors in your application.

Explore practical guides and experiments

Choosing SHA-256, SHA-384, or SHA-512: A Practical Hashing Decision Guide

Compare SHA-256, SHA-384 and SHA-512 for integrity checks, text hashing, APIs and authentication, and learn when hashing is the wrong tool.

Why SHA-256 Hashes Differ for Identical-Looking Text

Thirteen browser tests compare SHA-256 results for whitespace, Unicode, CRLF normalization, and JSON formatting, with independent checks and fixtures.

Debug API Data with JSON, Base64, and Browser Tools

Work through JSON types, encoding, URL components, JWT claims, hashes, CSV conversion, and timestamps with small reproducible examples.