How to use the document number sequence generator
- Enter a prefix such as INV, an optional year and a separator.
- Set the first number, the step between numbers, how many you need and the number of digits for zero padding.
- Add a suffix if you want one.
- Read the first, last and next number, and download the full list as a CSV.
Formula
number k = first number + k x step
padded = the number written with leading zeros to the digits you set
document number = prefix + separator + year + separator + padded + suffix
If the prefix contains {YYYY}, the year is placed there instead of after the prefix. If a number has more digits than the padding, it simply runs longer.
Invoice numbers for 2027
With the prefix INV, the year 2027, a dash as separator, a first number of 1, 4 digits and a count of 25, the list runs from INV-2027-0001 to INV-2027-0025, and the next number to use is INV-2027-0026.
A purchase order list with prefix PO, first number 1001, 5 digits and suffix -A gives PO-01001-A, PO-01002-A and so on. With a step of 10, the lot numbers 10, 20, 30 become LOT0010, LOT0020, LOT0030. At 4 digits, 9999 is followed by 10000, which has five digits.
Choosing a format
A good number is short, readable and sortable. Zero padding makes numbers sort in the right order as text, and a year in the number makes it easy to see when a document was issued. Keep the format the same over time so that old and new numbers line up in a list.
Rules to check
Some places and customers have rules about how invoices are numbered, such as keeping an unbroken sequence. This page only builds the list. It does not track which numbers you have used, so keep a record. To make the invoices themselves, use the Invoice Generator. To make a list of dates, see the Date Sequence Generator, and for random identifiers, the UUID Generator.
Assumptions and limits
- Numbers are whole and rise by a fixed step.
- Up to 2,000 numbers are produced at once.
- The year must be four digits, and no check digit is added.
- The list is not saved on this page.
Frequently asked questions
How do I put the year inside the prefix?
Write {YYYY} in the prefix, for example {YYYY}/R with the year 2030 and the separator /. The year is placed where the token is.
What happens when numbers get longer than the padding?
They keep all their digits. A number of 10000 with 4 digits of padding is written as 10000, and the page tells you that some numbers have more digits.
Can I start a new series each year?
Yes. Change the year, set the first number back to 1 and generate a new list. The page does not remember earlier lists.
Is there a limit on length?
Padding can be 1 to 12 digits, a prefix up to 20 characters and a suffix up to 10. The list holds up to 2,000 numbers.