Magnetic Stripe Track Data Explained: Track 1 & Track 2 Format Guide

14 min read
ISO 8583 Guides

Swipe a credit card through a reader and in under 200 milliseconds, a thin strip of iron oxide particles has delivered your complete payment credentials — account number, name, expiration date, and a cryptographic verification value — all encoded as magnetic flux reversals on a piece of plastic. That strip has been the backbone of card payments since the 1960s, and understanding its data format is still essential for anyone working in payment processing today.

What is Magnetic Stripe Data?

Magnetic stripe data (commonly called track data) is the information encoded on the magnetic stripe found on the back of payment cards. The stripe contains up to three tracks of data defined by ISO/IEC 7811 and ISO/IEC 7813, each with a specific format, character set, and purpose.

When a card is swiped at a point-of-sale terminal, the reader captures the magnetic flux transitions and converts them into the digital characters that make up Track 1 and Track 2 data. This data flows through the payment network inside ISO 8583 messages, ultimately reaching the card issuer for authorization.

Track data is considered Sensitive Authentication Data (SAD) under PCI DSS — it must never be stored after authorization, making it one of the most protected data elements in the entire payment ecosystem.

Try it yourself: Paste a raw ISO 8583 message containing Fields 35 or 45 into our ISO 8583 Studio to see track data parsed in context.

Also Known As…

Magnetic stripe data goes by many names across different documentation:

NameContext
Track dataUniversal industry shorthand
Magstripe dataCasual abbreviation
Swipe dataMerchant/POS terminology
Stripe dataGeneric usage
Track 1 / Track 2Referring to specific tracks
Full track dataWhen both tracks are captured unaltered
SAD (Sensitive Authentication Data)PCI DSS classification
ISO 7813 dataStandards reference

How the Magnetic Stripe Works

The magnetic stripe on a payment card consists of three separate tracks, each recorded at a different position on the stripe. The encoding uses a technique called F2F (Frequency/double Frequency) encoding, where data is represented as magnetic flux transitions.

Physical Layout

Card Back (magnetic stripe area):
┌──────────────────────────────────────────────────┐
│  Track 1 (IATA) — 210 bpi — 79 chars max        │  ← Top
│  Track 2 (ABA)  — 75 bpi  — 40 chars max        │  ← Middle
│  Track 3 (THRIFT) — 210 bpi — 107 chars max     │  ← Bottom
└──────────────────────────────────────────────────┘
TrackStandardDensityMax CharactersCharacter SetUsed For
Track 1ISO/IEC 7813 (IATA)210 bpi79Alphanumeric (A-Z, 0-9, special)Primary payment data + cardholder name
Track 2ISO/IEC 7813 (ABA)75 bpi40Numeric only (0-9, separators)Primary payment data (no name)
Track 3ISO/IEC 4909 (THRIFT)210 bpi107Numeric onlyRarely used (originally for ATM/debit)

Coercivity: HiCo vs. LoCo

The magnetic stripe itself comes in two strengths:

TypeCoercivityStripe ColorDurabilityUsage
HiCo (High Coercivity)2750-4000 OeDark brown/blackHigh — resists demagnetizationCredit/debit cards, hotel keys
LoCo (Low Coercivity)300 OeLight brownLow — easily overwrittenGift cards, loyalty cards

Payment cards universally use HiCo stripes because they resist accidental demagnetization from proximity to magnets, phones, or other cards.

Track 1 Data Format (IATA)

Track 1 is the most information-rich track. Originally defined by the International Air Transport Association (IATA) for airline ticketing, it was adopted by the banking industry because it includes the cardholder’s name — critical for card-present verification.

Field-by-Field Breakdown

%B4111111111111111^DOE/JOHN Q^26012011000000000000?
│ │                │          │                    │
│ │                │          │                    └── End Sentinel: ?
│ │                │          └── Discretionary Data + Check (LRC)
│ │                └── Field Separator: ^
│ └── PAN (Primary Account Number)
└── Start Sentinel + Format Code: %B
FieldCharactersDescriptionExample
Start Sentinel%Marks beginning of data%
Format CodeBFinancial card formatB
PANUp to 19 digitsPrimary Account Number4111111111111111
Field Separator^Delimits fields^
Cardholder Name2-26 charsLast/First Middle (slash-separated)DOE/JOHN Q
Field Separator^Delimits fields^
Expiration Date4 digits (YYMM)Card expiry2601 (Jan 2026)
Service Code3 digitsInterchange and authorization rules201
Discretionary DataVariableIssuer-defined (contains CVV, PVV, etc.)1000000000000
End Sentinel?Marks end of data?
LRC1 charLongitudinal Redundancy Check(calculated)

Worked Example

Let’s parse this complete Track 1 string character by character:

%B4111111111111111^DOE/JOHN Q^26012011000000000000?
Extracted FieldValueInterpretation
Format CodeBFinancial/banking card
PAN4111111111111111Visa test card (starts with 4, passes Luhn)
Cardholder NameDOE/JOHN QLast name: DOE, First: JOHN, Middle initial: Q
Expiration Date2601January 2026
Service Code201International, normal auth, normal services
Discretionary Data1000000000000Issuer-specific (CVV embedded here)

Validate the PAN: Paste 4111111111111111 into our Luhn Validator to confirm it passes the Luhn check.

Name Encoding Rules

The cardholder name follows specific formatting conventions:

ComponentSeparatorExample
Last name/ before first nameDOE/JOHN
First nameAfter /JOHN
Middle initialSpace after first nameQ
Title/suffixSpace or periodDOE/JOHN Q MR
Multiple surnamesSpace-separatedVAN DER BERG/ANNA

The name field is padded with spaces to fill its allocated space (up to 26 characters). Characters are limited to uppercase A-Z, spaces, periods, and a few special characters.

Track 2 Data Format (ABA)

Track 2 is the workhorse of payment processing. Defined by the American Bankers Association (ABA), it carries the same critical payment data as Track 1 but in a more compact, numeric-only format. Most modern payment systems rely on Track 2 as the primary data source.

Field-by-Field Breakdown

;4111111111111111=26012011000000000000?
│                │                    │
│                │                    └── End Sentinel: ?
│                │
│                └── Separator: =
└── Start Sentinel + PAN: ;4111111111111111
FieldCharactersDescriptionExample
Start Sentinel;Marks beginning of data;
PANUp to 19 digitsPrimary Account Number4111111111111111
Field Separator=Delimits fields=
Expiration Date4 digits (YYMM)Card expiry2601 (Jan 2026)
Service Code3 digitsInterchange and authorization rules201
Discretionary DataVariableIssuer-defined (contains CVV, PVV, PIN offset)1000000000000
End Sentinel?Marks end of data?
LRC1 digitLongitudinal Redundancy Check(calculated)

Worked Example

Parse this Track 2 string:

;4111111111111111=26012011000000000000?
Extracted FieldValueInterpretation
PAN4111111111111111Visa test card
Expiration Date2601January 2026
Service Code201International, normal auth, normal services
Discretionary Data1000000000000Issuer-specific data

Key difference from Track 1: Track 2 has no cardholder name. This is why some legacy systems that require name verification must read Track 1.

Track 3 Data Format

Track 3 was originally designed by the Thrift Industry for ATM and debit transactions. It supports read/write operations, allowing the stripe to be updated after each transaction — a concept that was eventually replaced by online authorization.

FeatureTrack 3 Detail
StandardISO/IEC 4909
Density210 bpi
Max Characters107 numeric
Read/WriteYes (unlike Tracks 1 and 2)
Current UsageVirtually unused in modern payment processing
Why abandonedOnline authorization made offline balance tracking unnecessary

Track 3 is not included in ISO 8583 messaging. If you encounter it, you’re likely dealing with a legacy closed-loop system.

Track 1 vs Track 2: Side-by-Side Comparison

FeatureTrack 1 (IATA)Track 2 (ABA)
StandardISO/IEC 7813ISO/IEC 7813
Recording Density210 bpi75 bpi
Max Characters7940
Character SetAlphanumeric + specialNumeric only
Start Sentinel%;
Field Separator^=
End Sentinel??
Cardholder NameYesNo
PANYesYes
Expiration DateYesYes
Service CodeYesYes
CVV/CVCYes (in discretionary data)Yes (in discretionary data)
ISO 8583 FieldField 45Field 35
Primary UseAirline + banking (name needed)Banking (most POS transactions)

Both tracks contain the same financial data. The primary difference is that Track 1 includes the cardholder name and uses an alphanumeric character set, while Track 2 is purely numeric and therefore more compact and reliable to read.

Service Codes Explained

The 3-digit service code appears in both Track 1 and Track 2. Each digit controls a different aspect of how the card should be processed:

Service Code: [D1][D2][D3]
               │    │    │
               │    │    └── Digit 3: Allowed Services & PIN
               │    └── Digit 2: Authorization Processing
               └── Digit 1: Interchange & Technology

Digit 1 — Interchange and Technology

ValueMeaning
1International interchange OK
2International interchange OK, use IC (chip) where feasible
5National interchange only, except under bilateral agreement
6National interchange only, except under bilateral agreement, use IC where feasible
7No interchange except under bilateral agreement (private)
9Test card

Digit 2 — Authorization Processing

ValueMeaning
0Normal authorization — no restrictions
2Contact issuer via online means (positive authorization required)
4Contact issuer via online means (positive authorization, unless explicit bilateral agreement applies)

Digit 3 — Allowed Services and PIN

ValueMeaning
0No restrictions, PIN required
1No restrictions
2Goods and services only (no cash)
3ATM only, PIN required
5Goods and services only, PIN required
6No restrictions, require PIN when feasible
7Goods and services only, require PIN when feasible

Common Service Code Combinations

CodeMeaningTypical Card Type
101International, normal auth, no restrictionsStandard credit card
201International, chip preferred, no restrictionsEMV credit card
221International, chip preferred, online auth required, no restrictionsEMV debit card
120International, normal auth, PIN requiredPIN-preferring debit
501National only, normal auth, no restrictionsDomestic-only card
601National only, chip preferred, no restrictionsDomestic EMV card
900Test card, no restrictions, PIN requiredTest/development card

Look up any code: Our Reference Database has a complete, searchable service code reference with deep-linking.

CVV, CVC, and CID in Track Data

The Card Verification Value (CVV) — or CVC (Mastercard), CID (Amex/Discover) — is a cryptographic value embedded in the discretionary data portion of both tracks. Critically, the track data CVV is different from the 3-digit number printed on the back of the card.

Verification ValueLocationPurpose
CVV1 / CVC1Encoded in Track 1 and Track 2 discretionary dataProves the magnetic stripe was physically read
CVV2 / CVC2Printed on the card back (3 digits)Proves the cardholder has the physical card (CNP transactions)
iCVV / Dynamic CVVGenerated by EMV chip per transactionProves the chip was present and active

How CVV1 Works

CVV1 is calculated using:

  1. The PAN (Primary Account Number)
  2. The expiration date
  3. The service code
  4. A pair of DES keys known only to the issuer

The resulting 3-digit value is embedded in the discretionary data of both tracks. When the issuer receives the track data in an authorization request, it recalculates the CVV and compares it. If the values don’t match, the card is likely counterfeit.

Learn about cryptographic operations: Our HSM Basics for Developers guide explains how HSMs verify CVV values during authorization.

CVV1 vs iCVV: The Fraud Detection Trick

EMV chip cards deliberately use a different CVV value (iCVV) when generating magnetic stripe equivalent data. This allows issuers to detect a specific type of fraud:

ScenarioCVV in DataIssuer Action
Genuine magnetic stripe swipeCVV1 (from track)Verify CVV1 → approve
Genuine chip transactioniCVV (from chip)Verify iCVV → approve
Cloned mag stripe from chip dataiCVV (wrong for mag stripe)CVV mismatch → decline
Cloned chip data to mag stripeCVV1 (wrong for chip)CVV mismatch → decline

This is why POS Entry Mode code 95 exists — it tells the issuer that the chip was read but the CVV/iCVV data may be unreliable. See our POS Entry Mode Guide for the full code breakdown.

Track Data in ISO 8583

Track data is carried in two specific ISO 8583 fields:

ISO 8583 FieldContainsMax LengthFormat
Field 35Track 2 data37Numeric + = separator
Field 45Track 1 data76Alphanumeric + ^ separators

How It Appears in a Message

In a typical ISO 8583 authorization request (MTI 0100), the track data sits alongside other familiar fields:

MTI:  0100 (Authorization Request)

Field 2  (PAN):          4111111111111111
Field 3  (Processing):   000000
Field 4  (Amount):       000000001000
Field 22 (Entry Mode):   901        ← Full mag stripe read, PIN capable
Field 35 (Track 2):      4111111111111111=26012011000000000000
Field 45 (Track 1):      B4111111111111111^DOE/JOHN Q^26012011000000000000

Note that Field 22 value 90 means “Magnetic stripe — full track data, unaltered.” The presence of Fields 35/45 should be consistent with this entry mode.

Parse a full message: Paste raw hex data into the ISO 8583 Studio to see Fields 35 and 45 decoded alongside the bitmap and all other data elements.

Which Track Does the Network Use?

NetworkPrimary TrackNotes
VisaTrack 2 (Field 35)Track 1 optional but recommended
MastercardTrack 2 (Field 35)Track 1 required for some products
American ExpressTrack 1 (Field 45)Requires cardholder name for verification
DiscoverTrack 2 (Field 35)Track 1 optional

Security and PCI DSS Requirements

Track data is classified as Sensitive Authentication Data (SAD) under PCI DSS. The rules are absolute:

PCI DSS RuleRequirement
Requirement 3.3.1Full track data must never be stored after authorization
Requirement 3.3.1.1Track data must not be stored even if encrypted
Requirement 3.4If track data traverses your systems, it must be protected during transit

What Happens If You Store Track Data

Storing full track data post-authorization is the most serious PCI violation a merchant or processor can commit:

ConsequenceImpact
Fines$5,000 – $500,000 per violation
Forensic investigation$20,000 – $500,000 for PFI engagement
Account terminationLoss of ability to accept card payments
Breach liabilityFinancial responsibility for all resulting fraud
Brand damagePublic disclosure of the breach

Clean your logs: Use the PCI Sanitizer to detect and mask any track data that may have leaked into log files, support tickets, or debug output.

Why Track Data Encryption Matters

When track data is captured by a terminal, it should be encrypted immediately at the point of interaction before traversing any network. This is where DUKPT comes in — the standard key management scheme for encrypting track data at POS terminals.

Card Swipe → POS Terminal → DUKPT Encrypt → Encrypted Track Data → Network → HSM Decrypt
                                                                                   ↓
                                                                           Clear Track Data
                                                                           (HSM memory only)

Deep dive: Learn how DUKPT generates a unique encryption key for every swipe in our DUKPT Key Management Guide.

JavaScript Track Data Parser

Here’s a parser for both Track 1 and Track 2 data:

function parseTrack1(raw) {
    // Track 1 format: %BPAN^NAME^YYMMSSSDDDDDDDDDDDDDD?
    const match = raw.match(
        /^%([A-Z])(\d{1,19})\^([^^]{2,26})\^(\d{4})(\d{3})(.+)\?$/
    );
    if (!match) return { error: 'Invalid Track 1 format' };

    return {
        formatCode: match[1],
        pan: match[2],
        name: match[3].trim(),
        expiration: match[4],         // YYMM
        serviceCode: match[5],
        discretionaryData: match[6]
    };
}

function parseTrack2(raw) {
    // Track 2 format: ;PAN=YYMMSSSDDDDDDDDDDDDDD?
    const match = raw.match(
        /^;(\d{1,19})=(\d{4})(\d{3})(.+)\?$/
    );
    if (!match) return { error: 'Invalid Track 2 format' };

    return {
        pan: match[1],
        expiration: match[2],         // YYMM
        serviceCode: match[3],
        discretionaryData: match[4]
    };
}

// Test with standard test card data
const t1 = parseTrack1('%B4111111111111111^DOE/JOHN Q^26012011000000000000?');
console.log(t1);
// { formatCode: 'B', pan: '4111111111111111',
//   name: 'DOE/JOHN Q', expiration: '2601',
//   serviceCode: '201', discretionaryData: '1000000000000' }

const t2 = parseTrack2(';4111111111111111=26012011000000000000?');
console.log(t2);
// { pan: '4111111111111111', expiration: '2601',
//   serviceCode: '201', discretionaryData: '1000000000000' }

100% client-side: Like all our tools, this runs entirely in your browser. No data is ever sent to a server.

Quick Reference: Track Data Fields

FieldTrack 1Track 2Purpose
Start Sentinel%;Beginning of data
Format CodeBCard type identifier
PANUp to 19 alphanumericUp to 19 numericAccount number
Separator^=Field delimiter
Cardholder NameUp to 26 charsNot presentIdentity verification
ExpirationYYMM (4 digits)YYMM (4 digits)Card validity
Service Code3 digits3 digitsProcessing rules
Discretionary DataVariableVariableCVV, PVV, issuer data
End Sentinel??End of data
LRC1 character1 digitError detection

The Magnetic Stripe Phase-Out

The industry is actively moving away from magnetic stripes in favor of EMV chip and contactless technology:

YearMilestone
2015EMV liability shift takes effect in the US
2021Mastercard begins removing stripe requirement for new cards
2024Mastercard stops requiring stripes on new cards in Europe
2027US banks no longer required to issue Mastercard with stripes
2029No new Mastercard credit/debit cards issued with a stripe
2033Mastercard expects all cards globally to be stripe-free

Despite the phase-out, magnetic stripe data formats remain foundational knowledge. EMV chip transactions still generate magnetic stripe equivalent data for backward compatibility, and the track data format is embedded in ISO 8583 field definitions that are unlikely to change.

Next Steps

Now that you understand magnetic stripe track data:

  1. Parse raw messages with the ISO 8583 Studio to see Fields 35 and 45 decoded in real messages
  2. Look up service codes in the Reference Database for quick interchange rule lookups
  3. Understand POS entry modes in our POS Entry Mode Guide — entry modes 02 and 90 indicate magnetic stripe reads
  4. Learn how track data is encrypted in our DUKPT Key Management Guide — unique key per swipe
  5. Protect track data with the PCI Sanitizer — mask sensitive data before sharing logs
  6. Validate the PAN with the Luhn Validator — confirm the account number from track data passes checksum

This post is part of the ISO 8583 Mastery series. Follow along as we explore payment messaging in depth.

Related Posts

ISO 8583 vs ISO 20022: Financial Messaging Compared
Feb 19, 2026 7 min
POS Entry Mode Codes Explained: ISO 8583 Field 22 Guide
Feb 18, 2026 13 min
Debugging Payment Declines: Understanding ISO 8583 Response Codes
Jan 31, 2026 7 min

💬 Discussion

Have a question or feedback? Leave a comment below — powered by GitHub Discussions.

Frequently Asked Questions

What information is stored on Track 1 vs Track 2?

Track 1 contains alphanumeric data including the PAN, cardholder name, expiration date, and service code. Track 2 contains only numeric data: the PAN, expiration date, service code, and discretionary data (like CVV1).

What is a Service Code in track data?

The service code is a 3-digit number that tells the terminal how the card should be processed. For example, a service code starting with ‘2’ indicates the card has an EMV chip and must be inserted, not swiped.

Is magnetic stripe data encrypted?

No, raw magnetic stripe data is stored in plaintext. This is why skimming is so prevalent. Modern security relies on Point-to-Point Encryption (P2PE) where the terminal encrypts the track data immediately upon reading it.

\n