Nimble Toolbox

Generate a hash

Type anything, or drop a file for its checksum, and all ten digests appear together. Nothing is uploaded, which matters when the text is a key or a password.

Digests

Digests appear here once there is something to hash.

How to use it#

  1. Type or paste the text you want to hash, or switch to File and drop one in.
  2. Every algorithm is computed as you type or as soon as the file is read, so there is nothing to press.
  3. To check a download, paste the checksum its page publishes. The Checksum verdict says whether it matches, and the digest that matches turns green.
  4. Switch between hex and Base64 to reformat the same digests, then copy the one you need.

What a hash can and cannot do for you#

A hash function turns any amount of input into a fixed-length value, and the same input always produces the same output. Change one character and the digest changes completely, which is what makes it useful for checking that a file arrived intact or that a value has not been edited.

It only works in one direction. You cannot recover the text from the digest, because the function throws information away. What you can do is guess: hash a candidate and see whether it matches. For short or common inputs that guessing is cheap, which is why a hash on its own is not a way to store passwords.

Storing passwords needs a function built to be slow and salted per user, such as bcrypt, scrypt, or Argon2. The bcrypt generator makes and checks bcrypt hashes. A SHA-256 of a password is fast to compute, which means it is also fast for somebody else to compute several billion times against a leaked database.

Which of these are still safe#

MD5 and SHA-1 are both broken in the sense that matters: it is practical to construct two different inputs with the same digest. MD5 collisions can be produced in seconds, and a SHA-1 collision was demonstrated in 2017. Neither should be used where somebody might benefit from forging a match, such as a signature or a security token.

They remain perfectly reasonable as non-adversarial checksums. Verifying that a download was not corrupted in transit, or that a cache key still points at the same content, does not involve an attacker choosing the input. A great deal of existing software emits MD5 for exactly this reason, which is why the tool still offers it.

CRC32 is not a hash in this sense at all. It is a checksum: a four-byte value built to catch accidental damage, such as a flipped bit on a disk or a dropped byte on a network, and ZIP, PNG, and gzip files each store one to check their own data. Anyone who wants to can change a file and keep its CRC32, so it proves nothing when someone might tamper on purpose. Use it to match a value a ZIP tool or a file format gives you, and a SHA digest for anything that has to be trusted.

For anything new, SHA-256 is the sensible default. It belongs to SHA-2, the family SHA-384 and SHA-512 come from too, so a request for a SHA-2 hash usually means SHA-256. SHA-384 and SHA-512 produce longer digests and are no slower on 64-bit hardware, but a longer hash is not more secure in any way that will matter to most work.

SHA-3 is a separate design, standardised in 2015 so there would be a standard to fall back on if SHA-2 were ever broken. It has not been, so SHA-3 is mostly asked for by a specification that names it. SHA3-256 and SHA-256 give different digests of the same input, so the name matters when you check one.

Keccak-256 is SHA-3 as it was before the standard changed its padding. Ethereum had already adopted it and kept it, so it is what Solidity's keccak256 computes. It shares SHA3-256's length and design and still gives a different digest for every input, which is why the page lists them as separate rows.

Hex and Base64 are the same bytes#

A digest is a fixed number of bytes: 4 for CRC32, 16 for MD5, 32 for SHA-256, 64 for SHA-512. Hex writes each byte as two characters, so a SHA-256 becomes 64 characters. Base64 packs three bytes into four characters, which makes the same digest about a third shorter.

Checksums published alongside downloads are almost always hex. Base64 turns up in HTTP headers and in subresource integrity attributes, where length matters more than being able to read it. Switching the setting here reformats the digests already on screen rather than computing them again.

Frequently asked questions#

Which algorithm should I use?

#

SHA-256 for anything new, SHA3-256 where a specification asks for SHA-3, and Keccak-256 for Ethereum. Use MD5 or SHA-1 only to match a value produced by a system that already uses them, because both have practical collision attacks, and CRC32 only to check for accidental corruption, such as in ZIP or PNG data. The hex and Base64 setting is separate from the algorithm: it only changes how the same digest is written out.

Can I get the original text back from a hash?

#

No. Hashing discards information, so there is no reverse operation. Sites advertising hash reversal are looking the value up in a table of previously hashed common inputs, which works for short passwords and not for anything else.

Is it safe to hash a password here?

#

The text never leaves your browser, so nothing is exposed by typing it. Whether the resulting hash is safe to store is a different question, and the answer is no: use bcrypt, scrypt, or Argon2 for passwords, because they are deliberately slow and salted. The bcrypt generator makes one.

Why do I get a different hash from another tool?

#

Usually a difference in what was hashed rather than how. A trailing newline, a different character encoding, or Windows line endings in one copy of the text will all change the digest. This tool hashes exactly the characters in the box, encoded as UTF-8, and a file byte for byte as it is on disk.

Can I get the checksum of a file?

#

Yes. Switch to File and drop it in, and its CRC32, MD5, SHA-1, SHA-2, SHA-3, and Keccak-256 digests appear together. The file is read in this tab and never uploaded. It works for files up to 1 GB, because the browser has to hold the whole file in memory to hash it. For a larger one, such as a disc image, use the command built into your system: shasum -a 256 on macOS, sha256sum or md5sum on Linux, Get-FileHash in PowerShell, or certutil -hashfile followed by the file name and SHA256 in the Windows Command Prompt.

How do I check a checksum without a command line?

#

Drop the file here instead. The page works as a checksum calculator for CRC32, MD5, SHA-1, SHA-2, and SHA-3 at once, gives the same digests the commands do, and works on a phone, where there is no command line to open.

Is SHA3-256 the same as the Keccak-256 Ethereum uses?

#

No. Ethereum settled on Keccak before it became SHA-3, and the standard then changed the padding added to the input. The sponge is the same, but the digests differ for every input. The quickest check is the empty string: SHA3-256 of nothing is a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a, and Keccak-256 of nothing is c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470. This page computes both, so use the Keccak-256 row to match Ethereum, and paste a digest into the compare box with its 0x in front if it has one. Text is hashed as its UTF-8 bytes, the same as keccak256 of a string in Solidity, so transfer(address,uint256) gives a digest starting a9059cbb, the function selector. A hex value such as 0x1234 is hashed as those six characters, not as the two bytes they spell.

When is CRC32 the right choice?

#

When you need the value a ZIP archive, a PNG chunk, or a gzip file records, or a quick way to spot a copy that was damaged by accident. It is short and fast to compute. It is the wrong choice wherever someone might change the data on purpose, because a file can be altered to keep any CRC32 it likes. The value here is the standard IEEE CRC-32, the one zlib, 7-Zip, and most ZIP tools report, written in hex as eight characters. The cksum command on macOS and Linux computes a different CRC by default, so its number will not match this one.

How do I check a download against its checksum?

#

Drop the downloaded file in, then paste the checksum from the download page into the compare box. If one of the digests matches, that row turns green and names the algorithm, so you do not need to know which one the page used. A line copied from a SHA256SUMS file works as it is, name and all, and so does a line from OpenSSL or the md5 command on a Mac. No match means the file is not the one the page describes, unless the page used an algorithm not listed here. The download may have been cut short, it may be a different version, or it may have been altered.