← Back to Home

Hash Calculator

/hash
Calculate cryptographic hashes of data using SHA-256, SHA-384, or SHA-512 algorithms. Perfect for verifying data integrity and generating checksums.
Try it now

Parameters

data body
Data to hash (required)
algorithm body
Hash algorithm: sha256, sha384, sha512 (default: sha256)

Examples

curl
# SHA-256 hash
curl -X POST https://tcpdata.com/hash \
  -H "Content-Type: application/json" \
  -d '{"data":"Hello World","algorithm":"sha256"}'

# SHA-512 hash
curl -X POST https://tcpdata.com/hash \
  -H "Content-Type: application/json" \
  -d '{"data":"my-secret-data","algorithm":"sha512"}'
JavaScript (fetch)
const response = await fetch('https://tcpdata.com/hash', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    data: 'Hello World',
    algorithm: 'sha256'
  })
});
const result = await response.json();
console.log(result.hash);
Python (requests)
import requests

response = requests.post('https://tcpdata.com/hash', json={
    'data': 'Hello World',
    'algorithm': 'sha256'
})
print(response.json()['hash'])