Random generator
Make secure random integers, decimals, bytes and dice rolls, or pick from and shuffle a list.
Input
Result
Fill in the input and press Run.
Your input is processed in memory and then discarded. It is not stored or logged. Even so, don't paste live passwords or keys into any online tool.
Use it from code or an agent
curl -s https://setget.net/v1/tools/random \
-H 'Content-Type: application/json' \
-d '{"input":{"kind":"integer","minimum":1,"maximum":6,"count":5}}'
import json, urllib.request
body = {'input': {'kind': 'integer', 'minimum': 1, 'maximum': 6, 'count': 5}}
request = urllib.request.Request("https://setget.net/v1/tools/random", json.dumps(body).encode(),
{"Content-Type": "application/json"})
print(json.load(urllib.request.urlopen(request))["result"])
const response = await fetch("https://setget.net/v1/tools/random", {
method: "POST",
headers: {"Content-Type": "application/json"},
body: JSON.stringify({"input":{"kind":"integer","minimum":1,"maximum":6,"count":5}}),
});
console.log((await response.json()).result);
Tool: run_tool
Arguments:
{
"slug": "random",
"input": {
"kind": "integer",
"minimum": 1,
"maximum": 6,
"count": 5
}
}
{
"input": {
"kind": "integer",
"minimum": 1,
"maximum": 6,
"count": 5
}
}
Endpoint: POST /v1/tools/random. Over MCP: run_tool with slug: "random".
Machine-readable: input schema, Markdown. Connect an agent.
Inputs
| Name | Type | Required | What it does |
|---|---|---|---|
kind |
string | no | What to make: integer, float, bytes (as hex), dice rolls, a pick from a list, or a shuffled list. One of: integer, float, bytes, dice, pick, shuffle. Default: "integer". |
minimum |
number | no | Lowest value, included. Defaults to 1 for integers and 0 for floats. |
maximum |
number | no | Highest value. Included for integers. Defaults to 100 for integers and 1 for floats. |
count |
integer | no | How many values, rolls or picks to make. Default: 1. From 1 to 1000. |
size |
integer | no | For bytes: how many bytes in each value. Default: 16. From 1 to 1024. |
notation |
string | no | For dice: what to roll, such as "d20", "2d6" or "3d6+2". Default: "1d6". |
items |
array | no | For pick and shuffle: the list to choose from or reorder. |
unique |
boolean | no | For pick: never choose the same item twice. Default: true. |
Examples
Five numbers from 1 to 6
{
"kind": "integer",
"minimum": 1,
"maximum": 6,
"count": 5
}Different every time. Press the example button above to see one.
Three six-sided dice plus two
{
"kind": "dice",
"notation": "3d6+2"
}Different every time. Press the example button above to see one.
Two different items from a list
{
"kind": "pick",
"items": [
"red",
"green",
"blue"
],
"count": 2
}Different every time. Press the example button above to see one.
A list in random order
{
"kind": "shuffle",
"items": [
1,
2,
3,
4,
5
]
}Different every time. Press the example button above to see one.
A 256-bit random key as hex
{
"kind": "bytes",
"size": 32
}Different every time. Press the example button above to see one.
Three decimals between 0 and 1
{
"kind": "float",
"count": 3
}Different every time. Press the example button above to see one.
Questions
- How random is it?
- Values come from the operating system's cryptographic random source, and are drawn without modulo bias. They are suitable for draws, keys and tokens.
- How do I flip a coin?
- Use kind "pick" with the items "heads" and "tails", or an integer from 0 to 1.
- What dice notation is understood?
- NdS with an optional modifier: "2d6" rolls two six-sided dice, "d20" rolls one, and "3d6+2" adds 2 to the total. Up to 100 dice with up to 1,000 sides.
Related tools
- UUID generatorGenerate UUIDs: random (v4), time-ordered (v7), name-based (v5) or the nil UUID.
uuid - Password generatorGenerate strong random passwords with the character types you choose, and see their entropy.
password-generate - Nano ID generatorGenerate short, URL-safe random IDs of any length, optionally from your own alphabet.
nanoid - Passphrase generatorGenerate memorable passphrases from random common English words, and see their entropy.
passphrase-generate - All hashes at onceCompute every supported hash of one input at once: MD5, SHA-1, SHA-2, SHA3-256 and BLAKE2b.
hash-all - Base32 encoder and decoderEncode text to Base32 (RFC 4648) or decode it back, with or without padding.
base32