Referral Rock

Random code generator

One generator for every kind of code: gift card codes, coupon codes, promo codes, referral codes, and serial numbers. Start from a preset or set your own count, length, prefix, and pattern, then copy or download the results.

Quick start

Settings

# becomes a random character. All other characters are literal. Example: ####-#### gives 8-character codes with a dash in the middle.

Results

Click "Generate codes" to create your first batch.

How the random code generator works

1

Choose a preset

Pick a template for the type of code you need, or set the count, length, prefix, postfix, and pattern yourself to match your exact requirements.

2

Generate the codes

Click Generate. The codes are created in the browser and checked against each other, so every code in the batch is unique.

3

Copy or download

Copy the full list to the clipboard, or download a CSV to open in Excel or import into another tool.

Choosing the right code format

Longer codes with larger character sets produce far more possible combinations, which matters when the code guards real value. A 16-character alphanumeric gift card code formatted as ####-####-####-#### gives you billions of unique values, making guessing practically impossible. For codes like those, length and character variety are the main levers.

Short branded codes work the opposite way. A four-character numeric code with a recognizable prefix is easier to type from memory and easier to read aloud, which suits promos and seasonal campaigns where people copy codes from ads or word of mouth. The pattern setting, where # stands for a random character, lets you add grouping dashes like ####-####-#### so even longer codes stay easy to read and transcribe.

Frequently asked questions

A tool that creates batches of unique random codes for any purpose: gift cards, coupons, promos, referrals, serial numbers. You control the count, length, character set, prefix, and pattern.
Up to 1,000 codes per batch. If you need more total codes, run separate batches and give each one a different prefix so the sets cannot overlap.
Yes, within a batch. Every code is checked against the others before it is added to the list, so a batch never contains duplicates. Uniqueness across separate batches is not guaranteed, so if you need one large unique set, generate it in a single batch.
Codes are built with the browser's cryptographically secure random number generator, the same one used for security-sensitive work. That makes them practically impossible to guess or predict.
No. The generator is completely free and there is no signup required. Use the codes however you want, commercially or otherwise.
No. Codes are generated in the browser and never sent to a server, so nobody but you ever sees them. Copy or download the list before closing the tab, because the codes are gone once you leave the page.

Issue and track codes automatically in a real program

Referral Rock generates a unique code for each member, records every signup against it, and handles rewards, so there is nothing to manage in a spreadsheet.