Try It Out
Click any generator below to see it in action!
📊 Random Number
Generate random integers or decimals
GET /api/number
📝 Random String
Create random strings
GET /api/string
🆔 Random UUID
Generate UUID v4
GET /api/uuid
🎨 Random Color
Get random colors
GET /api/color
✉️ Random Email
Generate emails
GET /api/email
👤 Random Name
Create person names
GET /api/name
✅ Random Boolean
True or false
GET /api/boolean
📅 Random Date
Generate dates
GET /api/date
Click a generator above to see the result here...
API Documentation
🔗 Base URL
https://randomjs.com/api/
📊 GET /api/number
Generate random numbers
• min (default: 0) - Minimum value
• max (default: 100) - Maximum value
• count (default: 1) - Number of values to generate
• decimal (default: false) - Return decimals
📝 GET /api/string
Generate random strings
• length (default: 10) - String length
• count (default: 1) - Number of strings
• charset - Options: alpha, numeric, alphanumeric, hex
🎨 GET /api/color
Generate random colors
• format - Options: hex, rgb, rgba, hsl
• count (default: 1) - Number of colors
📅 GET /api/date
Generate random dates
• start - Start date (ISO format)
• end - End date (ISO format)
• format - Options: iso, unix, date, locale
🚀 POST /api/batch
Generate multiple types at once
{
"generators": [
{ "type": "number", "params": { "min": 1, "max": 10 } },
{ "type": "uuid" },
{ "type": "email" }
]
}
⚡ Rate Limits: 1000 requests per minute (Free tier)
Code Examples
JavaScript/Node.js
// Generate a random number
fetch('https://randomjs.com/api/number?min=1&max=100')
.then(res => res.json())
.then(data => console.log(data.data));
// Generate multiple UUIDs
fetch('https://randomjs.com/api/string?count=5&length=8')
.then(res => res.json())
.then(data => console.log(data.data));
Python
import requests
# Generate a random color
response = requests.get('https://randomjs.com/api/color?format=hex')
color = response.json()['data']
print(color)
cURL
# Generate a random email
curl https://randomjs.com/api/email
# Batch generation
curl -X POST https://randomjs.com/api/batch \
-H "Content-Type: application/json" \
-d '{"generators":[{"type":"uuid"},{"type":"name"}]}'