# Hash generator

Compute an MD5, SHA-1, SHA-256, SHA-384, SHA-512, SHA3-256 or BLAKE2b hash of text or bytes.

- Endpoint: `POST https://setget.net/v1/tools/hash` with JSON `{"input": {...}}`
- MCP: `run_tool` with `slug` = `hash`
- Page: https://setget.net/tools/hash

## Inputs

- `text` (required, string): The input to hash.
- `algorithm` (optional, string, one of `md5`, `sha1`, `sha256`, `sha384`, `sha512`, `sha3-256`, `blake2b`, default `"sha256"`): The hash function to use.
- `input_encoding` (optional, string, one of `text`, `hex`, `base64`, default `"text"`): How the input is written: plain text (read as UTF-8), hex digits or base64.
- `output` (optional, string, one of `hex`, `base64`, default `"hex"`): How to write the result.

## Example 1

```json
{"input":{"text":"hello"}}
```

Result:

```json
{"text":"2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824","algorithm":"sha256","bits":256,"bytes":5}
```

## Example 2: MD5

```json
{"input":{"text":"abc","algorithm":"md5"}}
```

Result:

```json
{"text":"900150983cd24fb0d6963f7d28e17f72","algorithm":"md5","bits":128,"bytes":3}
```

## Example 3: Hex input, base64 output

```json
{"input":{"text":"616263","input_encoding":"hex","algorithm":"sha1","output":"base64"}}
```

Result:

```json
{"text":"qZk+NkcGgWq6PiVxeFDCbJzQ2J0=","algorithm":"sha1","bits":160,"bytes":3}
```

**Are MD5 and SHA-1 safe to use?** Not for security. Both are broken for signatures and certificates, and no plain hash, however strong, is suitable for storing passwords: use a password hashing function such as Argon2, scrypt or bcrypt. MD5 and SHA-1 are still fine for spotting accidental file corruption.

**Why is my hash different from another tool?** Usually because of an invisible difference in the input: a trailing line break, a different line ending or a different text encoding. Text is hashed here as UTF-8 exactly as sent.

**Can a hash be reversed?** No. A hash is one-way. Short or common inputs can still be guessed by trying candidates, which is why plain hashes must not be used for passwords.
