Random generator

Make secure random integers, decimals, bytes and dice rolls, or pick from and shuffle a list.

Input

What to make: integer, float, bytes (as hex), dice rolls, a pick from a list, or a shuffled list.
Lowest value, included. Defaults to 1 for integers and 0 for floats.
Highest value. Included for integers. Defaults to 100 for integers and 1 for floats.
How many values, rolls or picks to make.
For bytes: how many bytes in each value.
For dice: what to roll, such as "d20", "2d6" or "3d6+2".
For pick and shuffle: the list to choose from or reorder.
For pick: never choose the same item twice.

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

NameTypeRequiredWhat 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

Input
{
  "kind": "integer",
  "minimum": 1,
  "maximum": 6,
  "count": 5
}
Result

Different every time. Press the example button above to see one.

Three six-sided dice plus two

Input
{
  "kind": "dice",
  "notation": "3d6+2"
}
Result

Different every time. Press the example button above to see one.

Two different items from a list

Input
{
  "kind": "pick",
  "items": [
    "red",
    "green",
    "blue"
  ],
  "count": 2
}
Result

Different every time. Press the example button above to see one.

A list in random order

Input
{
  "kind": "shuffle",
  "items": [
    1,
    2,
    3,
    4,
    5
  ]
}
Result

Different every time. Press the example button above to see one.

A 256-bit random key as hex

Input
{
  "kind": "bytes",
  "size": 32
}
Result

Different every time. Press the example button above to see one.

Three decimals between 0 and 1

Input
{
  "kind": "float",
  "count": 3
}
Result

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.