Skip to content

Participant ID Generator

Generate unique participant codes for a study — random or sequential, with a prefix you choose and an optional Luhn or Damm check character that catches typing mistakes — then copy the list or download a CSV key file with blank columns for group and date. Random codes come from your browser's cryptographic generator and contain nothing about the person. Runs in your browser; nothing is uploaded. Free, no sign-up.

Kind of code

Each code is drawn at random from your browser's cryptographic random generator, so it says nothing about who enrolled first.

Up to 5,000.

1 to 16 symbols.

Symbols

The letter option uses Crockford's Base32 alphabet — no I, L, O or U — so a typed ID is never confused with 1, 0 or V.

Check character

Luhn catches every single-symbol typing error and most swaps of neighbouring symbols — but not 09 ↔ 90 in digits. It works over either symbol set. A check character catches typing mistakes. It is not a secret and does not protect anything: anyone can compute it.

Use a study code, never initials or anything about a person.

The key file is where you later record group and date. Keep anything that could identify a person in a separate, protected file.

Participant IDs

Choose your options and press Generate IDs.

Check an ID

Checks it against the prefix, symbols and check character set above. It cannot tell you whether the ID was ever issued.

Keep the codes non-identifying

A participant ID should say nothing about the person: no initials, birth date, phone number, student number or email. Store the file linking IDs to identities separately, with restricted access, and delete it when your ethics approval says to. These codes are not seeded and cannot be recreated, so save the list when you generate it.

How to Use the Participant ID Generator

  1. 1. Choose random or sequential. Random codes reveal nothing about order or sample size; sequential ones are tidier but guessable. Random is the safer default.
  2. 2. Set the length and symbols. Six digits give a million possible codes. The letter-and-digit option drops I, L, O and U so no code can be misread.
  3. 3. Pick a check character. Luhn or Damm adds one final symbol that lets you test whether a typed ID has a mistake. Leave it off if you prefer shorter codes.
  4. 4. Generate, then save. Copy the list or download the CSV. The codes are not seeded and cannot be recreated, so keep the file. Use the checker below the results to test an ID you have typed.

What Makes a Participant ID Non-Identifying

A good participant ID is an arbitrary label. It is not built from initials, birth dates, phone numbers, student numbers, postcodes or the time of enrollment, because anything derived from a person can be reversed by someone who knows the person. Random codes avoid this by construction, and the tool draws every symbol from the browser's cryptographic generator with no modulo bias, rejecting any duplicate so each ID in the list is different.

The same principle appears in the rules for de-identified research data. In the United States, 45 CFR 164.514(c) lets a covered entity assign a code for re-identification only if the code is not derived from or related to information about the individual and the mechanism is not disclosed. In the European Union, the General Data Protection Regulation describes pseudonymisation as processing in which the extra information needed to identify a person is kept separately and protected. Your ethics board decides what applies to your study; the practical rule is the same either way: keep the file that links codes to identities apart from the data, restrict access, and destroy it on the schedule your approval sets.

RandomSequential
Reveals enrollment orderNoYes
Reveals how many participatedNoYes — the highest number
Easy to guess another valid IDNoYes
Easy to file and sortLessMore
Needs a unique-checkYes — the tool rejects repeatsNo

How Check Digits Work

A check character is computed from the rest of the code and added to the end. When you type an ID back in, the same arithmetic runs; if the result differs, a symbol is wrong. It is a typing safeguard — useful when IDs are copied by hand between paper forms, spreadsheets and statistics software — and not a security feature, because anyone can compute it.

SchemeHow it worksCatchesMisses
LuhnFrom the right, double every second symbol, add the digits of each product, and choose the symbol that brings the total to a multiple of the alphabet size. Used for payment-card numbers.Every single-symbol error and most swaps of neighbouring symbolsThe swap 09 ↔ 90 in decimal codes, and some other errors
DammRuns the digits through a fixed 10 × 10 table, designed by H. Michael Damm in 2004, so that the final value is zero for a valid code.Every single-digit error and every swap of neighbouring digitsSome errors that alter more than one digit. Digits only.

Take the body 483921. Its Luhn check digit is 3, and its Damm check digit is 9. With the prefix P, a hyphen, and the code split every three symbols, the tool writes them as P-483-921-3 and P-483-921-9. If someone types P-483-912-3 — the last two digits swapped — the checker reports it as not valid. The published test values behave as they should: Luhn gives 3 for 7992739871, and Damm gives 4 for 572.

How Long Should the Code Be?

A code must be long enough that the whole list fits without running out of unique codes, and long enough that a mistyped or invented code is unlikely to match a real one. Six digits allow 1,000,000 codes; 50 participants then use 0.005% of them. Eight symbols from the 32-symbol alphabet allow about 1.1 trillion. A longer code is harder to read aloud and to type, so choose the shortest that leaves wide margin, and group it with hyphens for legibility.

Reproducible allocation is a different job

These IDs are not seeded, so the same settings give a different list each time. If you need a randomization list that can be reproduced and audited — who goes in which group — use the Random Assignment Generator, which records its seed.

Frequently Asked Questions

How do I create anonymous participant IDs for a study?
Use arbitrary codes that are not derived from any information about the person, and keep the file linking codes to identities separate from the data with restricted access. Random codes from this tool qualify; initials, birth dates and student numbers do not.
Should participant IDs be random or sequential?
Random is usually safer because it hides enrollment order and sample size and cannot be guessed. Sequential IDs are easier to file and are fine for internal use where those things are not sensitive, though even then a random prefix or a check digit helps.
What is a Luhn check digit?
A final digit calculated from the rest of the number so that errors can be detected. It catches every single-digit error and most swaps of neighbouring digits, and it is the scheme used on payment cards. It is a typo detector, not an encryption or a security feature.
What is the difference between Luhn and Damm?
Both add one check symbol. Damm's algorithm catches every single-digit error and every swap of two neighbouring digits; Luhn catches most swaps but misses 09 ↔ 90. Luhn also works on letters and digits, while Damm works on digits only.
Are the generated IDs truly random?
Each symbol comes from your browser's cryptographically secure random generator through crypto.getRandomValues, and symbols are chosen without modulo bias, so every symbol in the alphabet is equally likely. Repeats within a list are rejected.
Can I regenerate the same list later?
No. The codes are not seeded, so the same settings produce a different list each time. Save the list or the CSV when you generate it.
Is it safe to include a study code as the prefix?
Yes, a prefix like P or STUDY1 is fine because it names the study, not the person. Avoid prefixes that encode a site, a clinic or a cohort if those would help identify participants in a small sample.

Related Tools

More in Research & Publishing

See all Research & Publishing