Hash Generator avatar

Hash Generator

Pricing

Pay per event

Go to Apify Store
Hash Generator

Hash Generator

This actor generates cryptographic hashes for input strings using MD5, SHA-1, SHA-256, and SHA-512 algorithms. Useful for data integrity checks, password hash generation, content fingerprinting, and deduplication.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Categories

Share

Generate MD5, SHA-1, SHA-256, and SHA-512 hashes for strings.

What does Hash Generator do?

This actor generates cryptographic hashes for input strings using MD5, SHA-1, SHA-256, and SHA-512 algorithms. It processes multiple strings in a single run and returns all four hash variants plus the string length for each input.

Whether you need checksums for data integrity verification, content fingerprints for deduplication, or hash values for comparison against known databases, Hash Generator handles it all in a single API call with clean, structured JSON output ready for downstream use.

Use cases

  • Data engineer generating checksums for content verification before and after ETL transformations
  • Security analyst creating hash fingerprints to compare against known malware or leaked credential databases
  • QA engineer verifying that API responses or file contents have not changed between test runs
  • Backend developer generating consistent content identifiers for cache keys or deduplication logic
  • DevOps engineer producing file integrity hashes for deployment verification and audit trails

Why use Hash Generator?

  • Four algorithms at once -- every input string returns MD5, SHA-1, SHA-256, and SHA-512 hashes in a single call
  • Batch processing -- hash hundreds or thousands of strings in one run instead of scripting it yourself
  • Structured JSON output -- clean, consistent output ready for downstream processing or storage
  • Deterministic results -- identical inputs always produce identical hashes, making results reproducible
  • API and integration ready -- call via the Apify API, schedule runs, or connect to Make, Zapier, and other platforms
  • Pay-per-event pricing -- only $0.0005 per string hashed, plus a one-time start fee

Input parameters

ParameterTypeRequiredDefaultDescription
stringsstring[]Yes--List of strings to generate hashes for
{
"strings": ["hello world", "apify", "test@example.com"]
}

Output example

Each input string produces a result object with the following fields:

FieldTypeDescription
inputstringThe original input string
md5stringMD5 hash (32 hex characters)
sha1stringSHA-1 hash (40 hex characters)
sha256stringSHA-256 hash (64 hex characters)
sha512stringSHA-512 hash (128 hex characters)
lengthnumberCharacter length of the input string
{
"input": "hello world",
"md5": "5eb63bbbe01eeed093cb22bb8f5acdc3",
"sha1": "2aae6c35c94fcfb415dbe95f408b9ce91ee846ed",
"sha256": "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9",
"sha512": "309ecc489c12d6eb4cc40f50c902f2b4d0ed77ee511a7c7a9bcd3ca86d4cd86f989dd35bc5ff499670da34255b45b0cfd830e81f605dcf7dc5542e93ae9cd76f",
"length": 11
}

How much does it cost?

EventPriceDescription
Start$0.035One-time per run
String hashed$0.0005Per string hashed

Example costs:

  • 10 strings = $0.035 + (10 x $0.0005) = $0.04
  • 100 strings = $0.035 + (100 x $0.0005) = $0.085
  • 1,000 strings = $0.035 + (1,000 x $0.0005) = $0.535

Using the Apify API

You can start Hash Generator programmatically from your own applications using the Apify API. Below are examples in Node.js and Python.

Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('automation-lab/hash-generator').call({
strings: ['hello world', 'apify'],
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Python

from apify_client import ApifyClient
client = ApifyClient('YOUR_TOKEN')
run = client.actor('automation-lab/hash-generator').call(run_input={
'strings': ['hello world', 'apify'],
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)

Integrations

Hash Generator works with the full Apify integration ecosystem. You can connect it to a wide range of automation platforms and data destinations:

  • Make (formerly Integromat) -- trigger hash generation as a step in a multi-tool scenario
  • Zapier -- connect to thousands of apps and automatically hash data flowing through your zaps
  • n8n -- use the Apify node in n8n workflows for self-hosted automation pipelines
  • Slack -- send hash results to a Slack channel for team notifications
  • Google Sheets -- export hash results directly to a spreadsheet for review or comparison
  • Amazon S3 -- store output datasets in S3 buckets for archival or downstream processing
  • Webhooks -- send results to any HTTP endpoint for real-time integrity checks

You can also schedule recurring runs on the Apify platform to hash new data on a timer.

Tips and best practices

  • Use SHA-256 for general-purpose integrity checks -- it offers a strong balance of security and performance. MD5 and SHA-1 are faster but are considered cryptographically weak.
  • Do not use this for password storage -- these are raw hash functions without salting. For password storage, use bcrypt or Argon2 in your application code instead.
  • Combine with other actors -- chain Hash Generator with web scrapers to fingerprint page content and detect changes over time.
  • Compare hashes programmatically -- store previous hashes in a dataset and compare them in subsequent runs to detect content drift or data corruption.
  • Process in batches -- for very large lists, split into batches of a few thousand strings per run for easier error recovery.
  • Use the length field for validation -- the output includes the character length of each input, which can help you verify that strings were not truncated or corrupted before hashing.

FAQ

Which hash algorithm should I use? For most use cases, SHA-256 is recommended. It is widely supported, fast, and cryptographically strong. Use MD5 only for non-security purposes like quick checksums or legacy system compatibility.

Can I hash file contents instead of plain strings? The actor accepts text strings as input. To hash file contents, read the file into a string first and pass it in the strings array. Binary files should be Base64-encoded first.

Are the hashes salted? No. The actor produces raw cryptographic hashes. If you need salted hashes for password storage, use a dedicated library like bcrypt in your own application.

What format are the hashes returned in? All hashes are returned as lowercase hexadecimal strings. MD5 produces 32 characters, SHA-1 produces 40 characters, SHA-256 produces 64 characters, and SHA-512 produces 128 characters.

Can I select only specific algorithms? The actor always returns all four hash algorithms for every input string. If you only need one algorithm (e.g., SHA-256), simply use the sha256 field from the output and ignore the others.

Does the actor handle empty strings? Yes. An empty string is a valid input and will produce a valid hash for each algorithm. For example, the MD5 hash of an empty string is d41d8cd98f00b204e9800998ecf8427e. The length field will be 0.

Can I use Hash Generator on a schedule? Yes. You can schedule the actor on the Apify platform to run at regular intervals. This is useful for periodic data integrity checks -- for example, hashing a set of configuration files daily to detect unauthorized changes.