Skip to content

Free numbering helper

Invoice number generator

An invoice number format usually combines a short prefix, an optional year or month and a counter filled with leading zeros, such as INV-2026-0042, and each new invoice takes the next number in the sequence. Choose the parts below to preview your next numbers and see what a yearly or monthly reset does to them.

The format filled in is an example. This page only previews numbers: it cannot reserve or lock them, and it does not know which numbers you have already issued.

Number format

The values filled in are an example. Replace them with your own format.

Up to 12 letters or digits, such as INV. Leave it empty for numbers only.

Up to 8 letters or digits, such as ACME. It sits after the prefix; the preview still uses one counter.

Goes between each part.

From the month the invoice is issued.

Leading zeros fill the sequence to this width: 4 gives 0042.

The number after your last issued invoice, or 1 for a new sequence.

Reset and preview

When the counter goes back to 1. A reset needs the matching date part, or numbers repeat.

Month of the first invoice in the preview

Every number in the preview is dated this month. The reset preview shows the month after the next change.

From 1 to 100.

Next invoice numbers

The next 10 invoice numbers run from INV-2026-0042 to INV-2026-0051. In January 2027 the counter starts again at 1, so the first number is INV-2027-0001.

Next number
INV-2026-0042
Format
INV-{YYYY}-{####}
Room before the padding runs out
9,958 numbers in 2026, up to 9,999
Longest number shown
13 characters
The next 10 numbers
#Invoice numberIssued in
1INV-2026-0042December 2026
2INV-2026-0043December 2026
3INV-2026-0044December 2026
4INV-2026-0045December 2026
5INV-2026-0046December 2026
6INV-2026-0047December 2026
7INV-2026-0048December 2026
8INV-2026-0049December 2026
9INV-2026-0050December 2026
10INV-2026-0051December 2026

Around the next reset

In January 2027 the counter starts again at 1, so the first number is INV-2027-0001.

Numbers either side of January 2027
Issued inInvoice numberCounter
December 2026INV-2026-005151
January 2027INV-2027-00011 (restarted)
January 2027INV-2027-00022
January 2027INV-2027-00033

The same format in Hanko's invoice settings

Number prefix
INV-2026
Padding
4
Next number
42

Hanko uses these settings for invoices it numbers for you, such as recurring invoices, duplicates and invoices created from a proposal or an agreement. Hanko does not edit the prefix or restart the counter on its own, so in January 2027 change the prefix to INV-2027 and the next number to 1.

In the invoice editor, check the suggested number before you save and change it if it does not follow your format.

A preview only. This page cannot reserve or lock invoice numbers and does not know which numbers you have already used. Nothing you type is saved or sent.

How the invoice numbers are built

Each number is made of up to four parts, in this order: the prefix, the client code, the date part and the sequence. Empty parts are left out, and the separator goes between the parts that remain. With the prefix INV, a hyphen and a four-digit year, the pattern is INV-{YYYY}-{####}, where {####} stands for the sequence.

  • The sequence is the counter written with leading zeros up to the padding width: 0042 for 42 with a padding of 4. Padding only adds zeros and never cuts digits, so 10000 with a padding of 4 stays 10000.
  • The date part comes from the month the invoice is issued. For December 2026, YYYY gives 2026, YY gives 26 and YYYY-MM gives 2026-12.
  • The first number in the preview uses the next number you enter, and each one after it adds 1.
  • With a yearly reset the counter goes back to 1 for the first invoice issued in January, and with a monthly reset for the first invoice of each month. Without a reset it keeps counting, and only the date part changes.

A reset only works when the date part changes at least as often as the counter restarts. A yearly reset without a year in the number, or a monthly reset without the month, would produce the same number twice, so the tool refuses those combinations.

Worked example: INV-2026-0042 with a yearly reset

The tool opens with this example. So far in 2026 the example business has issued invoices up to number 41, and the next one is dated December 2026. The format uses the prefix INV, hyphens, a four-digit year and a 4-digit sequence, and the counter restarts every January.

  1. The next number is 42, padded to 0042.
  2. The date part for December 2026 is 2026, so the first number is INV-2026-0042.
  3. Each later invoice adds 1: INV-2026-0043, and so on to INV-2026-0051, the last of the 10 numbers in the preview.
  4. The first invoice of January 2027 restarts the counter at 1 under the new year: INV-2027-0001, INV-2027-0002, INV-2027-0003.
  5. A padding of 4 holds sequences up to 9,999, which leaves 9,958 numbers in 2026 from 42 on.
Worked example: the next 10 invoice numbers and the first numbers after the reset
Issued inInvoice numberCounter
December 2026INV-2026-004242
December 2026INV-2026-004343
December 2026INV-2026-004444
December 2026INV-2026-004545
December 2026INV-2026-004646
December 2026INV-2026-004747
December 2026INV-2026-004848
December 2026INV-2026-004949
December 2026INV-2026-005050
December 2026INV-2026-005151
January 2027INV-2027-00011 (counter restarts)
January 2027INV-2027-00022
January 2027INV-2027-00033

In Hanko's invoice settings, the same numbers come from a number prefix of INV-2026, a padding of 4 and a next number of 42. Hanko does not edit the prefix or restart the counter on its own, so in January 2027 change the prefix to INV-2027 and the next number to 1.

The same invoice number in other formats

Number 42 issued in December 2026, with one choice changed at a time from the example. The client code ACME is made up.

Number 42 in December 2026 in different formats
Format choicePatternNumber 42
Four-digit year (the example)INV-{YYYY}-{####}INV-2026-0042
Two-digit yearINV-{YY}-{####}INV-26-0042
Year and monthINV-{YYYY-MM}-{####}INV-2026-12-0042
No date partINV-{####}INV-0042
With a client codeINV-ACME-{YYYY}-{####}INV-ACME-2026-0042
Slash separatorINV/{YYYY}/{####}INV/2026/0042
No separatorINV{YYYY}{####}INV20260042

Unique and sequential invoice numbers: what to check locally

Many tax authorities expect each invoice to carry a unique number from a sequence, so that a missing or duplicated invoice is easy to spot. Some expect no gaps at all or ask you to explain one, while others accept several separate series, for example one per year, as long as each number identifies a single invoice. The rules differ between countries and change over time, so check what applies where you are registered, or ask your accountant, before you settle on a format.

Common bookkeeping practice, whatever the format:

  • Issue numbers in order, one per invoice, and do not skip ahead.
  • Never reuse a number, including the number of a cancelled invoice. Void the invoice or issue a credit note, and keep the record.
  • Reset the counter only when the date in the number changes at the same time, so every series stays distinct.
  • When you move to new invoicing software, continue from your last number rather than starting again at 1.

This page does not check whether a format meets any country's rules and is not tax advice.

Choices to make before you start a numbering format

  • Prefix. A short, stable code such as INV. Some businesses use a different prefix for other documents, such as CN for credit notes, so the two series never collide.
  • Client code. Adding one shows the client in the number. Decide whether all clients share one counter or each client has its own. With separate counters the client code is what keeps the numbers distinct, so it must not change for that client. The preview always uses one counter.
  • Date part and reset. A year or month in the number makes it easy to see when an invoice was issued, and it is what allows a reset. Without a reset the date part is information only and the counter keeps rising.
  • Padding. Pick a width that fits your busiest year (or month, with a monthly reset) with room to spare. Numbers longer than the padding still work, but they sort out of order in spreadsheets and file lists that sort text.
  • Separator. A hyphen is the only separator Hanko's invoice settings produce. File names cannot contain a slash, so a PDF saved under an invoice number with slashes will have them replaced.
  • Next number. Continue from your last issued invoice. Starting again at 1 in the same format would repeat numbers you have already used.

Assumptions and limitations

  • This page cannot reserve, lock or check numbers. It does not know which invoices you have issued, and two people using the same format here get the same numbers. Only the system that records your invoices can keep numbers unique.
  • Every number in the preview is dated the month you choose, and the reset preview assumes the next invoices are issued in the first month after the change.
  • A reset restarts the counter at 1. If you restart elsewhere, set the next number yourself when the period begins.
  • The prefix (up to 12 characters) and client code (up to 8) take the letters A to Z and the digits 0 to 9 only, so the numbers survive email subjects, file names, payment references and spreadsheets.
  • Padding runs from 1 to 8 digits, the next number up to 99,999,999, the preview up to 100 numbers and the year from 2000 to 2099.
  • The page reads your device's clock only when you press “Use the current month”. Nothing you type leaves your browser. If analytics are on, the page records that the tool was used or its numbers copied, never the prefix, client code or numbers.

How Hanko assigns invoice numbers

In Hanko an invoice gets its number when it is saved. The invoice editor fills in the invoice number field with a suggestion based on your most recent invoice, and you can change it before you save. When you save, Hanko checks the number against the invoices already in the workspace and refuses one that is in use. Each number can exist only once per workspace.

Invoices that Hanko creates for you, such as recurring invoices, duplicated invoices and invoices created from a proposal or an agreement, take their number from the workspace's invoice settings: a number prefix, a padding and a next number. Hanko writes these as the prefix, a hyphen and the zero-filled number, so the default settings give INV-001. The counter moves forward one step at a time on the server, so two invoices created at the same moment do not get the same number, and a number already used in the workspace is skipped. If an invoice fails to save after taking a number from the counter, that number is not handed back, so automatic numbering can leave a gap.

The settings have no date part and do not reset the counter by themselves. To keep automatic numbers in a yearly format, a workspace owner or admin edits the prefix and the next number at the start of each year, as the tool shows. A number typed into the editor can follow any format, as long as the workspace has not used it before.

Starting from a template, such as the agency invoice, works the same way: the template fills in the line items and design, and the number is assigned when you save.

Create the invoice in Hanko

Sign up or sign in and Hanko opens the Agency Invoice template in its invoice editor (a new account sets up its workspace first). Nothing from this page is carried over. The invoice gets its number when you save it, so check the suggested number in the editor and change it to your format if you need to. Hanko refuses a number the workspace has already used.