Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Sean Maxwell’s jet-id is a JavaScript and TypeScript library for generating 28-character Crockford Base32 IDs, with an option to include a timestamp. Maxwell reports that jetId() ran about 60% faster than nanoid() in a benchmark on his MacBook M4 Pro using Node 24. That is a result from one author-run setup, not evidence that jet-id is generally faster on other machines or runtimes.

What jet-id does

jet-id generates random IDs and optional timestamped IDs. Maxwell describes the package as having no runtime dependencies and provides validation and timestamp-parsing APIs. Its ordinary ID is 28 characters: 25 random Crockford Base32 characters plus three separators, for 125 random bits. The article reports a packed package size of 6.4 kB; that is the author’s package-size claim, not a current registry measurement. Read Maxwell’s article.

To install it, run:

npm install jet-id

The benchmark comparison is not only about speed: the ordinary jet-id format is longer than nanoid’s stated default of 21 characters and uses a different alphabet and segmented format.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What the benchmark measured

Maxwell reports 83,503,288 operations per second for jetId() and 52,415,897 for nanoid(). He says he ran the test on a MacBook M4 Pro with Node 24, using the median of seven samples, each at least 500 milliseconds long, after a 500-millisecond warmup. He characterizes the result as “roughly 60% faster than nanoid’s defaults,” despite jet-id producing longer IDs.

Those figures describe that particular machine, runtime, test method, and comparison. No independent replication across machines or runtimes is established, so treat them as a useful benchmark result to investigate—not a general performance guarantee or proof that jet-id is the fastest option.

Why the author says jet-id is fast

Maxwell attributes the measured throughput to batching work instead of constructing each ID independently:

  • It builds batches of 256 IDs into a shared string.
  • It uses one crypto.getRandomValues call to acquire enough random data for 1,024 IDs.
  • A 1,024-entry lookup table maps 10 random bits to two Crockford characters.
  • It writes each 28-character ID as seven 32-bit words, including the separators.
  • It converts the generated chunk to a string once, then slices individual IDs from that string.

These are the author’s implementation explanations for the benchmark outcome; the measurements alone do not show how the same techniques would perform in another workload.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Timestamped IDs: sortable, but not strictly ordered

Timestamped jet-id values encode time in their first nine characters. According to Maxwell, this leaves 80 random bits, compared with 125 random bits in an ordinary ID. The timestamp supports sorting at millisecond granularity, but it does not define an order for IDs generated within the same millisecond. If your application needs a strict total order, use a separate sequence or ordering mechanism rather than assuming timestamped IDs provide one.

Consider memory behavior if you retain IDs

Maxwell says that keeping a sliced ID can keep its shared generated chunk alive, which he describes as about 7 KB for jet-id compared with 32 KB for nanoid. This is his account of the implementation’s retention behavior; an independent memory profile is not established. It is worth considering if your workload stores many generated strings for long periods, rather than generating and quickly discarding them.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

When to consider jet-id instead of nanoid

jet-id may be worth evaluating if you specifically want Crockford Base32 characters, dash-separated 28-character output, optional millisecond timestamps, or the validation and parsing APIs described by its author. nanoid’s stated default is shorter at 21 characters and has a different output format. The reported throughput comparison should not be treated as a like-for-like verdict for every use: Maxwell also discusses a separate nanoid comparison configured for Crockford characters and segmented output, and notes nanoid is not designed for dash-separated formatting.

Before adopting either library, check that its format and random-bit budget fit your use case, and benchmark the exact versions, runtime, hardware, and ID-retention pattern that matter to your application. The available account does not establish independent adoption or production suitability for jet-id.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.