Advertisement

Prefix 5018, 5020, 5038, 6304, 6759… · 12–19 digits · 3-digit CVV

Maestro Card Number Generator

Generate Luhn-valid Maestro debit test numbers from the main Maestro prefixes, with a random expiry date and 3-digit security code.

Advertisement
Generated cards

Test data only — these numbers are not issued by any bank and every real payment with them will be declined.

Advertisement

Generated locally with your browser’s crypto API — nothing is sent to a server.

Maestro format

Starts with
5018, 5020, 5038, 6304, 6759…
Length
12–19
Security code
3
Advertisement

Brand ranges at a glance

The prefixes and lengths your checkout must accept. Each brand has its own generator page.

For developers & QA

Test data that stays out of PCI scope

Use generated numbers for everything before the payment request, then switch to your gateway’s official sandbox cards for approvals, declines and 3-D Secure.

  • Test form validation & input masks
  • Seed staging databases and demos
  • Reproduce declines and 3-D Secure in the sandbox
Browse gateway test cards

Official sandbox cards, per gateway

All 18 gateways →

About Maestro card numbers

Maestro is Mastercard’s debit brand, launched in 1991. For years it was the standard debit card in much of Europe, and it is still used in many countries in Latin America, Africa and Asia. Mastercard announced in 2021 that banks in Europe would stop issuing new Maestro cards from July 2023, replacing them with Debit Mastercard. Existing Maestro cards stay valid until they expire, so checkouts still need to accept them.

Maestro is the most irregular format of any major brand. Numbers can be 12 to 19 digits long and start with prefixes such as 5018, 5020, 5038, 5893, 6304, 6759 and 6761–6763. Some Maestro ranges look like Mastercard (5xxx) and others like Discover or UnionPay (6xxx), so brand detection that only looks at the first digit gets them wrong. The generator above creates 16-digit numbers by default; type a longer pattern in the BIN field (for example 6759xxxxxxxxxxxxxxx) to test 19-digit cards.

The 3-digit security code is on the back, but some Maestro cards are issued without one, so a robust form allows the CVV to be empty for Maestro. Online Maestro payments generally require 3D Secure: Adyen, for example, states that 3D Secure is mandatory for online Maestro payments.

For gateway sandboxes, PayPal and Braintree both document 6304 0000 0000 0000, and Adyen lists 6771 7980 2100 0008 (expiry 03/2030, CVC 737). Use the generator for everything that happens before the payment request: length checks, input masks, brand logos and stored test data.

A short Maestro test plan: paste a 16-digit and a 19-digit number and confirm both are accepted and grouped correctly; leave the CVV empty and check that the form does not block the payment; check that the Maestro logo appears (not Mastercard or Discover) for 5018, 6304 and 6759 prefixes; and change one digit to make sure the Luhn check rejects it. Then send the payment to your gateway’s sandbox and complete the 3D Secure step.

Maestro number format

Starts with (IIN)5018, 5020, 5038, 5893, 6304, 6759, 6761–6763
Number length12–19 digits
Typical layout6xxx xxxx xxxx xxxx
Security code3-digit code (optional on some cards)
Check digitLast digit, calculated with the Luhn (mod 10) algorithm
NetworkMastercard
Advertisement

How to test Maestro payments safely

  1. Generate a batch of Maestro numbers above and paste them into your form to confirm brand detection, length and formatting.
  2. Change one digit of a generated number — your form should now reject it, because the Luhn check fails. You can confirm why with the validator.
  3. Switch your payment provider to sandbox / test mode and use its documented test cards for authorization, decline and 3-D Secure scenarios.
  4. Never use real customer card numbers in development or staging environments.
Generated Maestro numbers are for testing only. They are not linked to any Maestro account, hold no balance and will be declined by any live payment system.

Frequently asked questions

How many digits does a Maestro card have?

Between 12 and 19. Most current cards have 16 or 19 digits, so your form should accept the whole range for Maestro prefixes.

Is Maestro being discontinued?

Mastercard stopped new Maestro issuance in Europe from July 2023 and replaced it with Debit Mastercard. Existing cards remain valid until they expire, and Maestro is still issued in some other regions.

What is a Maestro test card number?

PayPal and Braintree document 6304 0000 0000 0000 for their sandboxes.

Are these real Maestro card numbers?

No. They follow the Maestro format but are not linked to any account and cannot be used to pay.

Related tools

Advertisement