# Hash generator > How do you get the hash of some text? SHA-256, SHA-512, SHA-1 and MD5 hashes of any text, made in your browser. Get the SHA-256, SHA-384, SHA-512, SHA-1 or MD5 hash of any text, as hex or Base64, and compare it with the one you expect. Nothing leaves your device. - Page: https://how.box/hash/ - Runs entirely in the browser. - License: HowToolbox's own text and data (titles, explanations, FAQs, tool descriptions and schemas, this file) are CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/); AI training and answers are welcome. Attribute "HowToolbox (how.box)" with a link to the page used. Third-party data keeps its own terms; the name and logo are not licensed. Publisher: HowToolbox, contact@how.box. Terms: https://how.box/about/terms/ ## Inputs Answer link: https://how.box/hash/?alg={alg}&text={text}&enc={enc}&expect={expect} - `alg` (md5, sha-1, sha-256, sha-384 or sha-512): md5, sha-1, sha-256, sha-384 or sha-512. Example: `sha-256`. - `text` (text): The text to hash. Example: `Hello, world!`. - `enc` (hex or base64): hex or base64. Example: `hex`. - `expect` (text): A hash to compare the result with. Example: ``. Example answer: https://how.box/hash/?alg=sha-256&text=Hello%2C+world%21&enc=hex&expect= The page computes the answer in the browser: read results from the agent tools below, not from the page HTML. ## Agent tools - `hash_compute`: Computes the hash (message digest) of a text: MD5 (RFC 1321, checksums only), SHA-1, SHA-256, SHA-384 or SHA-512 (FIPS 180-4), reading the text as UTF-8. - MCP, one POST to https://how.box/mcp: `{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"hash_compute","arguments":{"algorithm":"sha-256","text":"Hello, world!","encoding":"hex","expected":""}}}` - GET: https://how.box/mcp/run/hash_compute?algorithm=sha-256&text=Hello%2C+world%21&encoding=hex&expected= ## How it works A hash is a short fingerprint of some data. The same input always gives the same hash, but change a single character and the hash changes completely. You cannot work backwards from a hash to the data, which makes hashes handy for checking that data arrived unchanged, spotting duplicates and storing fingerprints instead of the data itself. SHA-1, SHA-256, SHA-384 and SHA-512 are the Secure Hash Algorithms of FIPS 180-4, producing 160, 256, 384 and 512 bits. For example, the SHA-256 hash of abc starts with ba7816bf (RFC 6234). MD5 (RFC 1321) makes 128 bits. Text is hashed as UTF-8, and the result is written as hex or as Base64. MD5 and SHA-1 are broken for security, because different data with the same hash can be made on purpose (RFC 6151 for MD5, RFC 6194 for SHA-1). They still catch accidental damage, so many download pages still list them. A hash is also not encryption, and it is not enough on its own to store passwords. The text is hashed in your browser and never uploaded. ## FAQ **Which algorithm should I use?** SHA-256 for almost everything. Use MD5 or SHA-1 only when something else, such as an old download page, asks for them. **Why is my hash different from the one I was given?** Check that you picked the same algorithm and that the text is exactly the same, including spaces and line breaks. Even one changed character gives a completely different hash. The comparison field shows at once whether they match. **Can a hash be turned back into the text?** No. A hash throws information away. Short or common texts can be guessed by trying many, so do not rely on a plain hash to hide a password. **Does a newline change the hash?** Yes. A newline is part of the input, so otherwise identical text can produce a different digest. **Are hex and Base64 different hashes?** No. They are two ways to write the same digest bytes. Choose the encoding used by the value you are comparing. More: [HowToolbox index](https://how.box/llms.txt) · [Agent Skill](https://how.box/skill.md) · [agent terms](https://how.box/about/agents/)