compliance · 2025-04-14 · 5 min read
Masking rules: what you may show on screen, in receipts and in logs
PCI allows at most the first six and last four digits to be displayed. Everything else must be hidden — on screens, receipts, emails, support tools and especially logs.

Receipts, dashboards, support consoles and saved-card lists must never render a full PAN. PCI DSS Requirement 3.4 limits display to the first six and last four digits for staff who need them, and in practice consumer-facing screens show just the last four: •••• 4242.
Masking vs. truncation
- Masking hides digits on display while the full value may still exist (encrypted) in a system that is in scope.
- Truncation permanently removes digits before storage, so only
424242••••••4242ever exists. Truncated data is out of scope — which is why most merchants store only what the tokenization provider returns: brand, last four, expiry.
Where full numbers leak by accident
- Application and web-server logs capturing request bodies.
- URLs and query strings (which then land in analytics, referrers and browser history).
- Error-tracking payloads and crash reports.
- Customer-support chat transcripts and screenshots.
- Email receipts that print the number 'for reference'.
Mask on the server where possible. Client-side masking that receives the full number first still puts the full number in the browser's memory and network trace.
Note that the move to 8-digit IINs did not change the rule: six-plus-four remains the maximum. The PCI Security Standards Council FAQ addresses this specifically.

Keywords: PAN masking, first six last four, PCI DSS requirement 3.4, truncation, card number display, receipt masking
Frequently asked questions
How many digits of a credit card can be shown?
At most the first six and the last four. Customer-facing screens usually show only the last four.
Is showing the last four digits PCI compliant?
Yes. The last four alone are not considered sensitive and may be stored and displayed.