Whether you're taking a "fingerprint" of a file, verifying that a download wasn't tampered with, or solving a CTF challenge, you'll run into hashes all the time: MD5, SHA-256… But what exactly are they, and how do you compute one?
What is a hash?
A hash is a one-way function that turns any data (text, a file) into a fixed-length string. The same input always produces the same hash; even the smallest change produces a completely different result. That's why it's ideal for integrity checks: you compare the MD5/SHA-256 of your download against the one the publisher provides.
MD5 vs SHA-1 vs SHA-256
- MD5 and SHA-1: fast but cryptographically broken — collisions can be produced, so they're not used for security (passwords, signatures). Still common for file verification and CTF.
- SHA-256 / SHA-512: the modern, secure standard, preferred for both integrity and security.
How to compute a hash in the browser
👉 swapfile.io hash generator — paste your text and it shows the MD5, SHA-1, SHA-256 and SHA-512 hashes at once, entirely in your browser, with nothing uploaded. Wondering which hash type a string is? Try the hash identifier; for more CTF tools, see the CTF toolkit.
In short
A hash is a fingerprint that proves data hasn't changed. To quickly get the MD5 or SHA-256 of some text, use the in-browser hash generator to get them all at once — private and instant. Note: use MD5/SHA-1 for verification/CTF, not security.