ID & Hash Generator API
The ID & Hash Generator API is a lightweight, high-performance REST API that provides developers with everything needed to generate secure identifiers and cryptographic hashes.
Instead of maintaining multiple libraries for hashing and ID generation, developers can use one simple API to create UUIDs, NanoIDs, and secure hashes using industry-standard algorithms.
This API is suitable for authentication systems, distributed services, databases, API keys, invitation codes, URL shorteners, IoT platforms, event processing, blockchain applications, logging systems, and countless other use cases.
All generated IDs use cryptographically secure random sources where applicable, making them suitable for production environments.
Features
- Generate UUID v4
- Generate NanoIDs
- Generate MD5 hashes
- Generate SHA-1 hashes
- Generate SHA-256 hashes
- Generate SHA-512 hashes
- Generate multiple IDs in one request
- Configurable NanoID length
- Cryptographically secure random generation
- REST API
- API Key authentication
- Fast responses
- Production-ready
- Lightweight
- Easy integration
Supported Hash Algorithms
| Algorithm | Description |
|---|
| MD5 | Fast hashing for non-security use cases |
| SHA-1 | Legacy hashing algorithm |
| SHA-256 | Industry-standard secure hashing |
| SHA-512 | High-security cryptographic hashing |
API Endpoints
Hash Text
GET
/hash
Generate a hexadecimal hash using the selected algorithm.
Parameters
| Name | Type | Required | Description |
|---|
| text | string | Yes | Text to hash |
| algorithm | string | No | md5, sha1, sha256, sha512 |
Generate NanoIDs
GET
/nanoid
Generate secure URL-safe NanoIDs.
Parameters
| Name | Type | Required | Description |
|---|
| count | integer | No | Number of IDs |
| size | integer | No | Length of each NanoID |
Generate UUID v4
GET
/uuid
Generate one or more Version 4 UUIDs.
Parameters
| Name | Type | Required | Description |
|---|
| count | integer | No | Number of UUIDs |
Parameters
text
The string to hash.
Example
hello world
algorithm
Supported values
md5
sha1
sha256
sha512
Default recommendation:
sha256
count
Number of identifiers to generate.
Example
10
size
NanoID length.
Example
21
Longer IDs provide greater uniqueness.
Example Requests
Generate SHA-256 hash
GET /hash?text=HelloWorld&algorithm=sha256
Generate NanoIDs
GET /nanoid?count=5&size=21
Generate UUIDs
GET /uuid?count=10
Example Responses
Hash
{
"algorithm": "sha256",
"hash": "872e4e50ce9990d8..."
}
NanoIDs
{
"ids": [
"V1StGXR8_Z5jdHi6B-myT",
"2fR8L8O6Lm9KD7kQp0fE3"
]
}
UUIDs
{
"uuids": [
"550e8400-e29b-41d4-a716-446655440000",
"dbd8d0db-cd63-46e2-bd48-f96b2b5a9f91"
]
}
Common Use Cases
Perfect for:
- Authentication systems
- API key generation
- Session IDs
- User identifiers
- Database primary keys
- Distributed systems
- URL shorteners
- Invitation codes
- Password hashing workflows
- Digital signatures
- Blockchain applications
- IoT devices
- Event IDs
- Transaction IDs
- Microservices
- Logging systems
- Audit trails
- Payment systems
Performance
- Extremely fast
- Stateless architecture
- Low latency
- Cryptographically secure
- High throughput
- Horizontally scalable
- Production-ready
Best Practices
- Use SHA-256 or SHA-512 for new applications.
- Avoid MD5 and SHA-1 for security-sensitive data.
- Use UUID v4 for globally unique identifiers.
- Use NanoIDs for short, URL-friendly public IDs.
- Increase NanoID size when generating very large numbers of identifiers.
SDK Compatibility
Compatible with every HTTP client including:
- JavaScript
- TypeScript
- Python
- Go
- Java
- C#
- PHP
- Ruby
- Rust
- Swift
- Kotlin
- Dart
- cURL