Generate
Generate a hash from text
Type or paste text and read its digest in hex.
The digests come from crypto.subtle, the browser’s built-in implementation. No JavaScript written for this page does the hashing, so there is no second implementation to get wrong, and the input never leaves the tab.
The text is encoded as UTF-8 before hashing, which is the encoding every tool you would compare against assumes. The same characters in a different encoding give a different digest, and that is the usual reason two tools disagree on a value.
SHA-1 is included because old checksums and Git object names still use it, not because it is safe: deliberate collisions have existed since 2017, so it must not decide a security question. SHA-256 is the default everywhere else. MD5 is absent because the browser’s crypto does not implement it, and a hand-written MD5 would ask you to trust cryptography written for one page.
Questions
Is hashing the same as encryption?
No. A hash cannot be turned back into the input. Encryption can.
Why is there no MD5?
The browser’s crypto API does not offer it. The alternative would be a JavaScript MD5 written for this page, and a hash you cannot check is worse than no hash.
Can I hash a large file?
This hashes text. A whole file would have to be read and held in the page; this is for strings, tokens and checksums.
Why do I get a different hash than another tool?
Almost always encoding: a trailing newline, or the same characters encoded as something other than UTF-8.
More text and code
- Word counterWords, characters, sentences and reading time, counted as you type.
- Case converterTitle Case, sentence case, camelCase, snake_case and the rest, at once.
- JSON formatterValidates JSON and prints it indented, with the parser’s own error.
- Base64Encode text to base64 and decode it back, UTF-8 safe.
- URL encoderPercent-encode text, or read what a %-encoded string says.
- UUID generatorFive version-4 UUIDs from the browser’s random source, ready to copy.
- Timestamp converterEpoch seconds, milliseconds, ISO 8601, UTC and your own time zone.
- Colour converterHEX, RGB and HSL from one value, with WCAG contrast ratios.
- Slug generatorA clean URL slug from any title, accents and punctuation handled.
- CSV to JSONRows to objects, with quoted commas, semicolons and tabs handled.
- Text diffTwo texts, line by line: what was added and what was removed.