Random Invoice Number Generator

Create random, non-sequential invoice-style IDs, one at a time or up to 100, right in your browser. Before you put one on a VAT or GST invoice, read what the rules say: the EU, UK and Indian texts ask for a sequential number.

4 to 16 characters.
Up to 8 letters, shown in capitals.
1 to 100.
Compared in this page only (not case-sensitive); the list is not sent or saved.

Duplicates are removed within the batch you generate. Numbers you issued before are not checked, except any you paste into the box above.

Random or sequential: which can go on an invoice?

For VAT and GST invoices, the EU, UK and Indian texts below ask for a sequential (or consecutive) number, so a random ID on its own does not match their wording. HMRC’s internal manual allows letters and numbers, but only “as long as it forms part of a unique and sequential series”. The general GOV.UK list for all UK invoices asks for “a unique identification number”. For the US, the IRS publication below lists invoices among the records to keep and sets no invoice-number format.

WhereWhat the text says (verbatim)SourceLast verified
EU (VAT) a sequential number, based on one or more series, which uniquely identifies the invoice Council Directive 2006/112/EC, Art. 226(2) EU law; EUR-Lex consolidated text of 14 April 2025
UK (VAT) a sequential number based on one or more series which uniquely identifies the document HMRC VAT Notice 700/21, section 4.1 HMRC notice; the same words are in VAT Regulations 1995, reg. 14(1)(a)
UK (VAT) The ‘invoice number’ can be numerical, or it can be a combination of numbers and letters, as long as it forms part of a unique and sequential series. HMRC internal manual VATREC5010 HMRC internal guidance
UK (all invoices) a unique identification number GOV.UK, Invoices: what they must include Official guidance
India (GST) a consecutive serial number not exceeding sixteen characters, in one or multiple series, containing alphabets or numerals or special characters- hyphen or dash and slash symbolised as "-'' and "/" respectively, and any combination thereof, unique for a financial year; CGST Rules 2017, Rule 46(b) Law; CBIC tax information portal
US (federal) Supporting documents include sales slips, paid bills, invoices, receipts, deposit slips, and canceled checks. IRS Publication 583 (Rev. December 2024) IRS publication; it sets no invoice-number format

Numbering lines only, not a full list of invoice requirements. Other countries have their own rules; check your tax authority. Full table: invoice numbering rules by country. General information, not legal or tax advice.

When a random ID fits and when to use a sequential series

A random ID fits sample or test invoices, internal order or booking references, and documents where no sequential-number rule applies.

For VAT or GST invoices, use a sequential series. HMRC’s VATREC5010 answers the questions people usually have when they want a number that looks less like a count:

  • Starting above 1 so the business does not look new (the question in HMRC’s manual uses Invoice no 1135):Yes, as long as the invoice series runs consecutively from that point.
  • A customer reference plus a consecutive number: Yes, this would have the affect of creating a unique and sequential series. [sic, as published]
  • Several series at the same time, for example per customer or per division: Yes, it is acceptable to operate more than one sequence at the same time.

Source: HMRC internal manual VATREC5010 (internal guidance, UK VAT), last verified 2026-09-25.

To build the next number in a series (for example INV-2026-001), use the Invoice Number Generator. For how UK rules treat letters, gaps and credit notes, see how to number invoices in the UK.

How many different IDs your settings allow

The number of possible IDs is the number of characters in the set raised to the length of the random part. A prefix and a date do not add any variety, because they are the same for every ID you make that day.

With your current settings: — possible IDs (—).

Calculated chance that 1 random draw contains a repeat:—. The tool removes such repeats, so every ID in a batch is different.

If you keep issuing IDs with these settings, the calculated chance of at least one repeat is — among 1,000 IDs and — among 10,000 IDs. That is why numbers you issued earlier need to be checked, for example by pasting them into the exclude box.

SettingsPossible IDsRepeat chance, 100 IDs1,000 IDs10,000 IDs
6 digits1,000,000 (106)0.49%39.33%more than 99.9999%
8 digits100,000,000 (108)0.0049%0.5%39.34%
8 hexadecimal characters4,294,967,296 (168)0.00012%0.012%1.16%
8 letters and digits2,821,109,907,456 (368)less than 0.0001%less than 0.0001%0.0018%
10 letters and digits, no look-alikes819,628,286,980,801 (3110)less than 0.0001%less than 0.0001%less than 0.0001%
12 letters and digits4,738,381,338,321,616,896 (3612)less than 0.0001%less than 0.0001%less than 0.0001%

Pure arithmetic from the settings: possible IDs = characterslength; chance of at least one repeat among n draws = 1 − ∏(1 − i/N) for i = 0 … n−1, where N is the number of possible IDs. A chance above zero is never shown as 0%; very small values show as “less than 0.0001%”.

How the IDs are generated

The page uses the Web Crypto method crypto.getRandomValues(), which, in MDN’s words, “lets you get cryptographically strong random values”. Each character is picked with rejection sampling: random values that would favour some characters over others (modulo bias) are thrown away and drawn again, so every character in the set is equally likely.

Everything runs in your browser and the IDs are not sent to our server. The exclude list is compared in this page only and is not saved. Google Analytics receives the page view and an event saying the tool was used; that event carries no ID, no setting and nothing from the exclude list. In the EEA, the UK and Switzerland, analytics cookies are set only if you accept them, and while consent is denied Google’s tag can still send cookieless measurement pings; elsewhere they are on by default and you can turn them off in Cookie Settings (see our Privacy Policy). If you click “Use this number in a free invoice”, the first ID travels in that page’s web address (?number=…), so it reaches our server and Google Analytics as part of that page address.

Random invoice number FAQ

Can an invoice number be random?

Not if you follow the wording of the EU, UK and Indian VAT/GST texts: they ask for “a sequential number, based on one or more series, which uniquely identifies the invoice” (EU VAT Directive, Art. 226(2)), “a sequential number based on one or more series which uniquely identifies the document” (HMRC VAT Notice 700/21, section 4.1) and “a consecutive serial number” (India, CGST Rules 2017, Rule 46(b)). HMRC’s internal manual VATREC5010 accepts letters and numbers “as long as it forms part of a unique and sequential series”, so use a random ID for tests and internal references and a sequential series for VAT or GST invoices.

Are the generated IDs unique?

Only within one generated batch. The tool removes repeats inside the batch and skips any ID you paste into the “Exclude numbers I already used” box. It keeps no record of the numbers you issued before, so it cannot check them for you. For a series that stays unique, use the sequential Invoice Number Generator and continue from your last number.

How long should a random invoice ID be?

Long enough that a repeat is unlikely for the number of IDs you will create; the tool shows the possible IDs and the calculated chance of a repeat for your settings. For example, 8 digits allow 100,000,000 different IDs, and the calculated chance of at least one repeat among 1,000 such IDs is 0.5%. India’s CGST Rule 46(b) sets a limit of “sixteen characters” for a GST tax invoice number, which must also be consecutive. The Invoice # field in our invoice generator takes up to 50 characters; the longest ID this tool builds (8-letter prefix, date and 16 random characters) is 34.

Can I add a prefix or a date?

Yes. Type up to 8 letters as a prefix (such as INV or TEST) and tick “Add today’s date” to put the date as YYYYMMDD, taken from your device, before the random part. The parts are joined with hyphens: PREFIX-YYYYMMDD-random part. HMRC’s VATREC5010 says an invoice number “can be a combination of numbers and letters”, but only within a unique and sequential series.

Is this a VAT number or tax ID generator?

No. It creates invoice-style reference IDs only. It does not create VAT registration numbers, tax identification numbers or any other official identifier.

Is the generated ID sent anywhere?

No. The IDs are built by this page’s script in your browser with crypto.getRandomValues and are not sent to our server; the list you paste into the exclude box is only compared in this page and is not saved. Google Analytics receives the page view and an event saying the tool was used, without the ID or your settings. The exception is the “Use this number in a free invoice” link: it carries the first ID in the web address (?number=…) of our invoice generator page, so if you click it, the ID reaches our server and Google Analytics as part of that page address.

Sources (retrieved September 25, 2026): Council Directive 2006/112/EC, Art. 226 (EUR-Lex consolidated text, 14 April 2025); HMRC VAT Notice 700/21, section 4.1; VAT Regulations 1995, regulation 14; HMRC internal manual VATREC5010; GOV.UK, Invoices: what they must include; CBIC, CGST Rules 2017, Rule 46; IRS Publication 583; MDN Web Docs, Crypto.getRandomValues(). General information, not legal or tax advice.

Using an ID in our free invoice generator: the Invoice # field is free text up to 50 characters, a pasted ID is used as typed, and nothing auto-increments.