Choose your layout
Allocate timestamp, machine, random, entropy, and sequence fields. Defaults use 81 bits, with 4,096 machine values.
See the format
Generate configurable bigint identifiers in Node.js and browsers. Encode them for URLs, inspect their fields, and check their age.
import { HID } from 'hybrid-id-generator';
const generator = new HID({ machineId: 1, useCrypto: true });
const id = generator.nextId();
console.log(id.toBase62());
console.log(generator.info(id));Use a distinct machine ID for each concurrent generator. The format is custom; choose a standard UUID when your storage or integrations require UUID compatibility. IDs identify records; application authorization controls access to them.