ToolsHub4u

Hash text with SHA-1, SHA-256, SHA-384 or SHA-512

Type or paste text and read its SHA-1, SHA-256, SHA-384 and SHA-512 digests side by side. Choose which digest to copy, switch the hex case, or load a small file.

  • SHA-1, 256, 384, 512
  • All four at once
  • Runs locally
Ready Developer & Utility
1Enter
2Adjust
3Copy result

Hash Generator

1

Text to hash

The text is hashed as UTF-8 bytes. An empty string has a valid hash too.

Copy which digest?

All four are calculated; this choice controls the copy button and the download.

No data yet Live
2

Digests

Hashed 43 characters (43 UTF-8 bytes).

SHA256 digest

d7a8fbb307d7809469ca9abcb0082e4f8d5651e46d3cdb762d02d0bf37c9e592

  • Hashes computed locallyThe digest is calculated from the text in this tab. No request is made and no key is involved.
  • SHA-1 is not safe for signaturesSHA-1 has practical collision attacks. Use SHA-256 or stronger for security, and keep SHA-1 only for legacy checks.
  • A hash is not encryptionIt cannot be reversed in general, but guesses can be tested. Add a secret salt if you are storing passwords, and use a dedicated password hashing function such as Argon2 or bcrypt.
SHA digests of the input
AlgorithmDigestBits
SHA-12fd4e1c67a2d28fced849ee1bb76e7391b93eb12160
SHA-256d7a8fbb307d7809469ca9abcb0082e4f8d5651e46d3cdb762d02d0bf37c9e592256
SHA-384ca737f1014a48f4c0b6dd43cb177b0afd9e5169367544c494011e3317dbf9a509cb1e5dc1e85a941bbee3d7f2afbc9b1384
SHA-51207e547d9586f6a73f73fbac0435ed76951218fb7d0c8d788a309d785436bbb642e93a252a954f23912547d1e8a3b5ed6e1bfd7097821233fa0538f3db854fee6512
UTF-8 bytes
43
Characters
43
Output length
64 hex

The same text always produces the same digest, including case and invisible whitespace. A trailing newline changes the result.

This page calculates four SHA digests of the text you type: SHA-1, SHA-256, SHA-384 and SHA-512. All four are computed on every run and shown in a table with their bit lengths. A separate choice controls which one the copy and download buttons use, so you can read all four and still copy the one you need.

It is a fingerprint tool. Paste a sentence, a line from a config file or a checksum you want to reproduce, and the page returns the same hex string that sha256sum or a browser's crypto API would produce for the same bytes. There is no key, no salt and no account, and the text stays in the tab.

What exactly gets hashed

The input is converted to UTF-8 bytes before hashing, and the status line reports both the character count and the byte count. For plain English the two numbers match. For anything else they diverge: é takes two bytes, 東 takes three and 👋 takes four, so a short string with emoji can have more bytes than characters.

Characters are counted as grapheme clusters, which is what a reader sees as one character. An emoji counts once even though it is four bytes, and a letter written as e plus a combining accent counts once even though it is two code points. The stats also show the code-point count, because that is the number of Unicode scalar values behind the visible characters, and the UTF-8 byte count, because that is what the hash actually consumes. For café 東京 👋 the page reports 9 characters, 9 code points and 17 UTF-8 bytes.

Every byte matters. A trailing space, a capital letter or a line ending changes the digest completely, and there is no way to recover the original from the result. If a checksum you calculated here does not match one from another tool, compare the exact bytes first: a copied newline at the end of the text is the most common cause.

An empty input is valid. It produces the well-known digest of the empty string rather than an error, which is useful when you are checking that a pipeline hashes the absence of data consistently. The page reports Hashed an empty string and shows the four results.

The four algorithms

SHA-1 produces 160 bits, written as 40 hex characters. SHA-256 produces 256 bits and 64 characters, SHA-384 produces 384 bits and 96 characters, and SHA-512 produces 512 bits and 128 characters. The digest table lists the bit length beside each value, and the output-length stat follows whichever digest the copy button is set to.

SHA-256 is the sensible default for checksums, cache keys and integrity checks. SHA-512 is stronger but longer, and it is common on 64-bit platforms. SHA-384 is a truncated variant of SHA-512 and is used in some TLS and government profiles. SHA-1 still appears in old systems, but practical collision attacks exist, and the page marks it with a warning rather than pretending it is equivalent.

None of these is a password hash. A fast general-purpose digest lets an attacker test billions of guesses per second. Password storage needs a slow, salted function such as Argon2, bcrypt or scrypt, and this page does not implement any of them.

A worked example

The input abc was hashed with the copy target set to SHA-256 and uppercase off. The page reported 3 characters and 3 UTF-8 bytes, and the SHA-256 digest was the standard value for that input.

Digests produced for five inputs
InputAlgorithmDigest
abcSHA-256ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
abcSHA-1a9993e364706816aba3e25717850c26c9cd0d89d
Empty stringSHA-256e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
The quick brown fox jumps over the lazy dogSHA-256d7a8fbb307d7809469ca9abcb0082e4f8d5651e46d3cdb762d02d0bf37c9e592
abc, uppercase onSHA-256BA7816BF8F01CFEA414140DE5DAE2223B00361A396177A9CB410FF61F20015AD

These are reference values, not values invented by this page. The same inputs produce the same strings in any correct SHA implementation, which is what makes a digest useful for comparison. A different result from another tool means the bytes differed, not that the algorithm was different, unless the other tool used a different algorithm by default.

Ticking Uppercase output changed the same SHA-256 value to capitals, as the last row shows. The digest is identical; only the hex letter case changed. Some systems compare hex case-insensitively, but a text comparison will treat the two strings as different, so match the convention of the system you are feeding.

A digest is not a signatureA plain hash proves nothing about who produced it. Anyone can hash the same bytes. Use an HMAC or a public-key signature when the question is authenticity rather than integrity.

Checking a digest against another tool

On Linux, sha256sum file.txt reads the file's bytes and prints the same hex string. On macOS the command is shasum -a 256 file.txt. In PowerShell, Get-FileHash file.txt -Algorithm SHA256 returns an object whose Hash property is the digest. All three include the file's exact bytes.

The upload button is a shortcut for a text file, not a byte-exact file checksum. It reads the file as UTF-8 text and puts it in the text area, so three changes are possible before hashing: a leading byte-order mark is removed, Windows line endings are normalised to a single line feed, and a byte sequence that is not valid UTF-8 becomes the replacement character. Each of those changes the digest, so a file with a BOM or CRLF line endings will not match sha256sum. For a byte-exact checksum of any file, use the command line rather than this page. The 5 MB cap also applies to uploads here.

When a mismatch happens, compare the input rather than the output. Check for a trailing newline, a byte-order mark, smart quotes that replaced straight ones, or a file that was saved with Windows line endings instead of Unix ones. Changing the algorithm is rarely the fix.

Limits and safe use

The digests are computed in JavaScript in this tab. They do not depend on the Web Crypto API or on a secure context, and the page does not send the text anywhere. A long input is the practical limit, because the whole string is held in the text area and hashed in one pass; the upload path stops at 5 MB.

There is no HMAC mode, no salt field and no key. If you need a keyed hash, use a library or the platform's crypto API. There is also no batch mode: one input at a time, with a file upload that replaces the text area. The download contains the digest text, not a checksum file in sha256sum format with a filename.

Nothing is retained after the tab closes, so copy or download a value you need later. The four algorithms are implemented in the page itself, so the result does not change when a browser updates its crypto support.

Questions

Common questions

Short answers about this tool and its limits.

Which algorithm should I use?

SHA-256 for most checksums, cache keys and integrity checks. SHA-512 when a longer digest is required or the platform prefers it. Avoid SHA-1 for anything security-related; it is kept here for legacy comparisons.

How are characters counted now?

As grapheme clusters, so an emoji such as 👋 counts once and a letter with a combining accent counts once. The stats also show code points and UTF-8 bytes. café 東京 👋 is 9 characters, 9 code points and 17 UTF-8 bytes.

Is the result salted or keyed?

No. It is a plain digest of the UTF-8 bytes with no salt, secret or HMAC key. Two people hashing the same text get the same value. That is useful for comparison and unsuitable for password storage.

Can I reverse a hash?

Not in general. The digest is a fixed-size fingerprint, and many inputs can produce it in principle. Short or common inputs can still be found by guessing and hashing, which is why a plain hash does not hide a password.

Does a trailing newline change the digest?

Yes, completely. The newline is a byte like any other, and every byte changes the result. Compare the exact input when a checksum from this page does not match one from a command-line tool.

Why is SHA-1 marked with a warning?

Practical collision attacks against SHA-1 exist, so two different inputs can be made to share a digest. It is still useful for reproducing an old checksum, but it should not be chosen for new security work.

Can I hash a file?

You can load a text file up to 5 MB, but it is read as UTF-8 and placed in the text area, so a leading BOM is removed and CRLF is normalised to LF. The digest can therefore differ from a byte-exact file checksum. Use sha256sum, shasum or Get-FileHash when the file's exact bytes matter.

Is the text uploaded anywhere?

No. The digests are computed in this tab by the page's own JavaScript, with no request, account or history. Copy or download the digest before leaving the page.