# ULID generator and decoder

Generate ULIDs, sortable 26-character IDs, or decode one to read its creation time.

- Endpoint: `POST https://setget.net/v1/tools/ulid` with JSON `{"input": {...}}`
- MCP: `run_tool` with `slug` = `ulid`
- Page: https://setget.net/tools/ulid

## Inputs

- `action` (optional, string, one of `generate`, `decode`, default `"generate"`): Generate new ULIDs, or decode an existing one.
- `count` (optional, integer, default `1`, range 1..100): How many to generate.
- `text` (optional, string): The ULID to decode.
- `lowercase` (optional, boolean, default `false`): Write generated ULIDs in lower case.

## Example 1: Three new ULIDs

```json
{"input":{"count":3}}
```

## Example 2: Reading the time inside a ULID

```json
{"input":{"action":"decode","text":"01ARYZ6S41TSV4RRFFQ69G5FAV"}}
```

Result:

```json
{"ulid":"01ARYZ6S41TSV4RRFFQ69G5FAV","timestamp":"2016-07-30T22:36:16.385Z","unix_ms":1469918176385,"randomness":"d6764c61efb99302bd5b"}
```

**What is inside a ULID?** A 48-bit timestamp in milliseconds followed by 80 random bits, written as 26 Crockford Base32 characters. ULIDs sort by creation time as plain text.

**Does a ULID reveal anything?** Yes, its creation time to the millisecond. Anyone can read it, as the decode action shows.

**Why are I, L, O and U missing?** Crockford Base32 leaves them out to avoid confusion. When decoding, I and L are read as 1 and O as 0.
