Outils · Texte · Générateur de hachage · Guides · How to Compute a SHA-256 or MD5 Hash of Text in Your Browser
How to Compute a SHA-256 or MD5 Hash of Text in Your Browser
There's no button to click here - Hash generator recomputes the digest live as you type or switch algorithms. Here's the actual process.
Step 1 - type or paste your text
There's no digest shown until you actually put something in the field - an empty-string hash is a real, correct value, but showing it unprompted before you've typed anything reads as broken rather than accurate, so the tool waits until the field has been touched.
Step 2 - choose an algorithm
Five options: MD5, SHA-1, SHA-256, SHA-384, SHA-512. SHA-256 is selected by default - the modern, least-surprising choice for a general-purpose checksum. Switching algorithms recomputes the digest for whatever text is already in the field; nothing needs retyping.
Step 3 - read or copy the digest
The digest updates automatically about 150ms after you stop typing, not on every single keystroke - fast enough to feel live, without recomputing on every character of a long paste. If you type quickly enough to trigger a second request before the first finishes (more likely with the slower SHA-384/512 on a long paste), the tool only ever shows the result of your most recent input - an older, slower response can never overwrite a newer one, even if it happens to finish computing later. Click Copy to put the exact digest on your clipboard.
If you're on an insecure (non-HTTPS) connection
The SHA family is computed with the browser's native Web Crypto API, which requires a secure context. If you somehow land on this tool over plain HTTP, a note explains that only MD5 - implemented by hand in this tool rather than through Web Crypto - is available, and the SHA options are disabled with a reason attached rather than just missing.
If your text is long
This tool works best under 200,000 characters. Longer text is still hashed correctly - there's no hard cutoff - but the update may take a little longer to catch up after you stop typing, which the tool warns you about rather than leaving you wondering why the digest seems to lag.
Non-English text, emoji, and anything outside plain ASCII
Text is hashed as its UTF-8 byte sequence, the standard, unambiguous way to turn any text - Arabic, emoji, accented characters, anything - into bytes before hashing. That means the digest this tool produces is reproducible against any other correct UTF-8-based hasher: shasum, openssl dgst, Node's own crypto module, all of them agree on the same input.
Checking the result against a command-line tool
If you want a second opinion, or you're pasting text that originally came from a file, you can verify the same digest from a terminal - shasum -a 256 file.txt or openssl dgst -sha256 file.txt for SHA-256, with the algorithm name adjusted for MD5 or the other SHA variants. Because both this tool and those commands hash the exact same UTF-8 bytes, a real match confirms the text is genuinely identical, not just visually similar - useful when you've copied text through several apps and want to be sure nothing invisible (a stray character, a different line ending) snuck in along the way before you rely on the result for anything.
Why there's no button to click
Most tools on this site have a primary action button, because most of them do something to a file - convert it, compress it, merge it. A hash has no equivalent "run" step: it's a pure function of the text and the chosen algorithm, so the moment either one changes, there's a new correct answer, and showing it immediately is more honest than making you click something first to see a value that was already determined the instant you finished typing.
Getting more than one digest of the same text
Because switching algorithms never clears or retypes anything, you can get several digests of the exact same input in a few seconds - useful if you need to publish both an MD5 and a SHA-256 checksum for the same file's contents, or you're just not sure which one a system you're integrating with actually wants.
Clearing the field and starting over
Select the text in the box and delete it, or select-all and retype - there's no separate "reset" step, and no digest lingers on screen once the field is genuinely empty. Every field in this tool is a native textarea, so normal keyboard editing, undo, and paste all work exactly as they would anywhere else on the page, with no special shortcuts to learn first.
What it isn't for
This version hashes text you type or paste, not an uploaded file - if you need a file's checksum, that's a different tool. And whatever you do, don't use this for storing a password; the background piece explains exactly why a fast general-purpose hash is the wrong tool for that job specifically.
For which of the five algorithms actually fits your situation, see the comparison guide. Or start typing and watch the digest update.