Hash Generator – Generate Text Hashes Instantly
The Hash Generator tool lets you instantly convert any text string into a numeric hash value using well-known non-cryptographic hashing algorithms. Hash functions are widely used in computer science for data structures, checksums, and fast lookups. Simply enter your text, choose an algorithm, and get your hash in hex, decimal, or binary format.
Type or paste any text you want to hash.
Select the hashing algorithm to apply.
Choose how the hash value is displayed.
Convert hex output to uppercase letters.
Your results will appear here
How to Use This Calculator
1. Type or paste the text you want to hash into the 'Input Text' field. 2. Select a hashing algorithm from the dropdown – DJB2 is a popular default choice. 3. Choose your preferred output format: Hexadecimal, Decimal, or Binary. 4. Optionally toggle 'Uppercase Output' to display hex values in capital letters. 5. Results appear instantly below as you type or change settings.
What Is a Hash Function?
A hash function takes an input (or 'message') and returns a fixed-size numeric value called a hash, digest, or checksum. Hash functions are deterministic – the same input always produces the same output – and are designed to be fast to compute.
Supported Algorithms
DJB2
Created by Daniel J. Bernstein, DJB2 is one of the most popular non-cryptographic hash functions. It uses the formula hash = hash * 33 + char, initialized at 5381. It produces excellent distribution and is widely used in hash tables.
FNV-1a (Fowler–Noll–Vo)
FNV-1a XORs each byte with the hash before multiplying by a prime (16777619), initialized at 2166136261. It has great avalanche properties and is used in many real-world systems.
SDBM
SDBM uses the formula hash = char + (hash << 6) + (hash << 16) - hash. It was developed for the SDBM database library and performs well on short strings.
Simple Checksum
A basic checksum sums the ASCII/Unicode character codes of all input characters. While not collision-resistant, it is extremely fast and useful for basic integrity checks.
Lose Lose
The 'Lose Lose' algorithm (named for its poor distribution) simply sums all character values. It is historically notable as an example of a bad hash function from K&R C.
Output Formats
- Hexadecimal: Base-16 representation, commonly used in computing and color codes.
- Decimal: Standard base-10 integer representation.
- Binary: Base-2 representation, showing individual bits.
Cryptographic vs Non-Cryptographic Hashing
The algorithms here are non-cryptographic – they are fast and suitable for hash tables and checksums, but should NOT be used for passwords, digital signatures, or security-sensitive applications. For cryptographic purposes, use SHA-256, SHA-3, or bcrypt.