Track Data Builder

For development and QA only. Builds ISO/IEC 7813 Track 1 and Track 2 magnetic stripe records from the fields a terminal would read. Test data only.

How this tool works

This tool assembles a track 2 record from its fields, using the published test values. It exists so that a reader can be tested against a record of known structure without needing a physical card, and so that the structure of a track can be seen directly rather than inferred.

What it produces is a well-formed record. The security code in a real track is never encoded on the stripe, and the discretionary data a real card carries is whatever the issuer decided to put there. A record built here is for testing a reader, and it is not connected to any account.

What a built record contains

FieldExample value
Primary account number4242424242424242
Separator=
Expiry date291210, 29 December 2010
Service code201, interchange 2, authorisation 01
Discretionary dataOptional, and the record ends with ^

The expiry date in a track is four digits in YYMMDD, and 00 is the convention for a record with no expiry.

When to use it

Frequently asked questions

What does this tool produce?

A well-formed track 2 record assembled from the fields you give it, using published test values. It is a test fixture, and it is not connected to any account.

Is the security code on the track?

No. The CVV is never encoded on a magnetic stripe, which is one of the reasons it exists as a separate check.

What is the expiry format on a track?

Four digits in YYMMDD, and 00 is the convention for a record with no expiry.

Can I use a built record to test a live terminal?

Yes, in a test environment. A record with a published test number will be read structurally and then declined by the issuer, which is the behaviour you want to see.

How do I read a record built here?

Split it at the separators. The number runs to the = or ^, then four digits of expiry, then three of service code, and whatever is left is discretionary data.

Related