Hash Generator

Generate MD5, SHA-1, SHA-256, SHA-384, and SHA-512 hashes.

// about

About this Tool

A hash is a digital fingerprint for text or files. No matter how long your message is, a hash turns it into a fixed length code. This tool creates MD5, SHA-1, SHA-256, and SHA-512 hashes.

How to use it

  1. Enter or paste your text in the input box.
  2. Select the hash algorithm you want to use.
  3. Click 'Run' to generate and copy the fingerprint hash code.

Why people use this tool

  • Verifies if two pieces of text or files are 100% identical.
  • Supports popular algorithms like SHA-256 and MD5.
  • Instantly calculates multiple security hashes at once.

Frequently Asked Questions

Can someone turn a hash code back into the original text?

No! Hash functions are one-way streets. You cannot reverse a hash back to original text.

What is SHA-256 commonly used for?

SHA-256 is widely used in cybersecurity, digital certificates, and software downloads to verify files.

Is MD5 secure for passwords?

MD5 is great for fast file checks, but SHA-256 is recommended for security purposes.

Guides · Security · 7 min read

Hash Functions Made Simple: MD5 vs SHA-1 vs SHA-256 and How to Use Them

Download checksums, Git commit IDs and blockchain addresses are all hash values. This guide explains how hashing differs from encryption and which algorithm to choose for each job.

A hash function takes input of any length and produces a short value of fixed length, called a hash or digest. Whether you hash one word or a multi-gigabyte video, SHA-256 always outputs 256 bits, or 64 hexadecimal characters.

SHA-256("hello")  = 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
SHA-256("hello!") = ce06092fb948d9ffac7d1a376e404b26b7575bcc11ee05a4615fef4fec3a308b
MD5("hello")      = 5d41402abc4b2a76b9719d911017c592
The three properties of a good hash, why MD5 and SHA-1 are retired for security, and how to use hashes for file integrity and password storage.
Read guide →
Build it with AI

Build this tool yourself with AI

Want your own version of this tool? Copy the work-order prompt into an AI chat, or save the skill file for an AI coding agent. Both describe the features, edge cases and test cases we used when building it.

AI work-order prompt

Paste it as-is into an AI chat such as Claude, ChatGPT or Gemini.

You are an experienced full-stack web developer. Build a web tool called "Hash Generator" that meets the requirements below.

## Goal

Build a tool that computes MD5, SHA-1, SHA-256 and SHA-512 hashes of text in one go.

## Core features

- Show several algorithms at once
- Output as lower/upper-case hex or Base64
- HMAC mode with a secret key
- Compare two hash values
- Copy button for each result

## Inputs

- Text to hash
- Output format and optional HMAC key

## Outputs

- Hash per algorithm
- Comparison result (match/mismatch)

## Edge cases and handling rules

- Hash the empty string correctly
- Explain that CRLF versus LF line endings change the hash
- Keep the UI responsive for large inputs
- Warn that MD5 and SHA-1 are unsuitable for security

## Implementation requirements

- Build it as a single page (HTML, CSS, JavaScript) that runs entirely in the browser, and never send the user's input to a server.
- Make the UI responsive and easy to use on mobile; label every input and keep everything keyboard accessible.
- Add a Copy button for results and show clear, friendly error messages for invalid input.
- Keep the core logic in functions separate from the UI so it can be unit-tested.

## Definition of done (test cases)

- SHA-256('hello') = 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
- MD5('hello') = 5d41402abc4b2a76b9719d911017c592
- 'Hello' and 'hello' produce different hashes

First outline your implementation plan in at most five lines, then write the complete code, and finally explain how to check the test cases above.

Skill (SKILL.md)

Save it as .claude/skills/build-hash-generator/SKILL.md for AI coding agents such as Claude Code to reuse whenever you build or change this tool.

---
name: build-hash-generator
description: Use when building or changing a Hash Generator tool. Build a tool that computes MD5, SHA-1, SHA-256 and SHA-512 hashes of text in one go.
---

# Build: Hash Generator

## Goal

Build a tool that computes MD5, SHA-1, SHA-256 and SHA-512 hashes of text in one go.

## Workflow

1. Review the required features, inputs and outputs below and ask about anything missing first.
2. Implement the core logic as pure functions separate from the UI.
3. Check the logic against the test cases in the verification list.
4. Build a responsive UI with an input form, a result area and a Copy button.
5. Reproduce each edge case listed under Rules and refine the error messages.

## Core features

- Show several algorithms at once
- Output as lower/upper-case hex or Base64
- HMAC mode with a secret key
- Compare two hash values
- Copy button for each result

## Inputs

- Text to hash
- Output format and optional HMAC key

## Outputs

- Hash per algorithm
- Comparison result (match/mismatch)

## Rules

- Hash the empty string correctly
- Explain that CRLF versus LF line endings change the hash
- Keep the UI responsive for large inputs
- Warn that MD5 and SHA-1 are unsuitable for security
- Build it as a single page (HTML, CSS, JavaScript) that runs entirely in the browser, and never send the user's input to a server.

## Verification

- [ ] SHA-256('hello') = 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
- [ ] MD5('hello') = 5d41402abc4b2a76b9719d911017c592
- [ ] 'Hello' and 'hello' produce different hashes

Tips for working with AI

  • Tell the AI your stack (for example React, Vue or plain HTML) on the first line so the code matches your project.
  • Ask it to run the listed test cases and show the results before you accept the code.
  • Never paste real secrets, customer data or API keys into the prompt; use sample values instead.