Quick answer
Data redaction is removing or hiding sensitive values in a record, such as a card number in a chat message, while leaving the rest readable. The value is blacked out, deleted or replaced with a placeholder or partial value, ideally before the record is stored.
What is data redaction?
Data redaction is removing or hiding sensitive values in a record, such as a card number in a chat message, while leaving the rest of the record readable and useful. The sensitive part is blacked out, deleted or replaced with a placeholder like [REDACTED] or a partial value like the last four digits. The rest of the message, log line or document stays intact, so you can still search it, read it and count it.
Redaction is a control that limits exposure. It does not prevent a breach and it does not make data anonymous by itself. A redacted transcript can still identify a person through the parts you left in, such as an email address or a unique complaint. That is why the useful question is not "did we redact?" but "which values did we redact, when, and can they be recovered?"
Redaction vs masking, tokenization and anonymization
These words are used loosely, and vendors do not all draw the lines in the same place, so check what a product means by each. A common way to separate them is below.
| Technique | What happens to the value | Reversible? | Typical use |
|---|---|---|---|
| Redaction | Removed or blacked out, often replaced by a label or partial value | Not if done before storage | Chat logs, documents, support tickets |
| Masking | Replaced by a substitute that keeps the format, such as **** **** **** 4242 | Depends on method | Screens, test data, replays |
| Tokenization | Replaced by a random token; the real value lives in a separate vault | Yes, with vault access | Payments, identifiers used across systems |
| Pseudonymization | Direct identifiers replaced by a code; a key exists | Yes, with the key | Research, analytics, internal sharing |
| Anonymization | Data altered so people can no longer be identified by any reasonable means | No | Public release, long-term statistics |
Redaction is also either static or dynamic. Static redaction rewrites the stored data, so the original is gone. Dynamic redaction hides values only when someone views them, based on role or context, and the original remains in storage. Dynamic is flexible and reversible; static is safer if the data is later leaked, because there is nothing left to leak.
What counts as sensitive: two standards with numbers
Which values to redact comes from law, standards and your own risk, not from a universal list. Two specific references show how concrete the rules can be.
HIPAA Safe Harbor (US health data). The US de-identification rule, 45 CFR 164.514(b)(2), lists 18 kinds of identifiers that must be removed, including names, telephone and fax numbers, email addresses, Social Security and medical record numbers, account numbers, device identifiers, web URLs, IP addresses, biometric identifiers and full-face photographs. For geography it keeps only the first three digits of a ZIP code, and only if the area sharing those three digits has more than 20,000 people; otherwise they must be changed to 000. Note that email addresses are on the list, which matters below.
PCI DSS (payment card data). The PCI Security Standards Council states in its FAQ that, under requirement 3.4.1, no more than the BIN and the last four digits of the card number may be displayed on screens and reports, unless there is a documented business justification, management approval and the justification is available to an assessor.
The two rules ask for different things. HIPAA Safe Harbor is about removing identifiers so data counts as de-identified; PCI is about limiting what is displayed. Meeting one does not meet the other.
Worked example: a chat transcript redacted before storage
Sample data: a six-message support chat, with a rule set that masks card numbers that pass the Luhn checksum and phone numbers with an international prefix, keeping the last four digits, and leaves email addresses alone.
| # | Speaker | Original message | Stored message |
|---|---|---|---|
| 1 | Visitor | Hi, my order 88123 never arrived and I was charged twice. | Unchanged |
| 2 | Agent | Sorry about that. Which card was charged? | Unchanged |
| 3 | Visitor | Card 4242 4242 4242 4242. My email is jane.doe@example.com. | Card ** ** 4242. My email is jane.doe@example.com. |
| 4 | Agent | Found both charges. Is +44 7700 900123 still the right number? | Is a number ending 0123 still the right number? (last four kept) |
| 5 | Visitor | Yes. The tracking code on the parcel is 1234 5678 9012 3456. | Unchanged |
| 6 | Agent | Thanks. I have started the refund. | Unchanged |
The masked display format in the table is illustrative; only the last four digits are kept. Four values look sensitive at a glance, and the rule handles them differently:
- The card number passes the checksum (the sample uses a published test card number), so it is masked down to the last four digits.
- The phone number has an international prefix, so it is masked to its last four digits.
- The email address is left as written. The rule leaves it on purpose, because the team may need it to follow up.
- The tracking code is also 16 digits, but it fails the checksum, so it is not treated as a card. This is the point of checking the checksum: without it, tracking and order numbers would be mangled and agents could not find them.
Two of six messages (33%) changed; four of four values were considered; three of the four were sensitive and two were masked. If 10,000 transcripts a month were stored and 3.2% of them (320) contained a card number in plain text, redaction before storage takes that number of stored card numbers from 320 to 0, with no change to how agents read the conversation.
The limits are plain. Because the email stays, this transcript is not de-identified under HIPAA Safe Harbor, which lists email addresses. And a rule that looks only for card and phone patterns will miss a card number typed as "four two four two" in words. Redaction rules need testing on real wording.
How to design a redaction policy
- List what the data can contain. For chat: names, emails, phones, card numbers, ID numbers, addresses, order references, free-text health or account details.
- Decide for each value: keep, mask, remove. Keep what the work needs (order numbers), mask what you must reference but not store (cards), remove what you never need.
- Redact as early as possible. The best moment is before the value is stored. A value that was never saved cannot leak from a backup.
- Prefer validation to pattern-only matching. A checksum for card numbers, a length and prefix rule for phone numbers. This reduces false positives.
- Test with realistic samples. Include numbers with spaces and dashes, numbers inside longer text, and look-alikes that must not be touched.
- Make it visible. Mark redacted items in the interface so a reader knows a value existed and was removed, not that the customer never said it.
Common mistakes with data redaction
- Treating display masking as storage redaction. If a screen shows asterisks but the database holds the full value, the data is still exposed to anyone with database access.
- Redacting the screen but not the exports. A masked inbox with an unmasked CSV export defeats the point.
- Assuming one pattern fits every country. Card numbers are global; national ID formats and phone formats are not.
- Forgetting free text. People type sensitive details in sentences no pattern recognizes. Redaction reduces risk; it does not remove the need for retention limits and access control.
- Calling redacted data anonymous. Leftover details can still identify someone, and the standards above treat redaction as one control among several.
Data redaction in TapCub
TapCub applies redaction in three places that match the example. It does not turn redaction into a legal guarantee: which values you must remove is for you and your counsel to decide.
- Live chat messages. Turn on Mask sensitive data under Live chat › Chat settings › Privacy. Before storage, text from both sides is rewritten: card numbers that pass a checksum, Chinese national ID numbers, Chinese mobile numbers, and numbers with an international prefix keep only the last 4 digits. Email is left as it is, because offline messages need it, and the inbox marks a masked message. This is the behavior shown in the example.
- Heatmaps and session replay. Session replay is off by default. When it is on, Mask input values is on by default and records input values as asterisks; Mask all text is off by default and can be turned on for back-office pages. TapCub's own guidance is to keep input masking on and to put payment, ID and medical form pages on the exclude list.
- Form and address data. Form submits are recorded only if you turn on
data-forms="true", and then only the form id, name and action are stored, never the values typed. The visitor's IP address is used for geography and then discarded, not written to the event.
If your data falls under rules like HIPAA, the chat mask is a useful safeguard but not a de-identification method, since email addresses stay.
Sources
- eCFR, 45 CFR 164.514, Other requirements relating to uses and disclosures of protected health information (18 identifiers; ZIP rule with 20,000 people), checked 20 November 2026.
- PCI Security Standards Council, FAQ: How can an entity meet PCI DSS requirements for PAN masking and truncation if it has migrated to 8-digit BINs? (requirement 3.4.1: no more than the BIN and last four digits displayed), checked 20 November 2026.
Was this explanation clear?
We use your answers to fix and expand this page.
Couldn’t send. Please try again in a minute.
Thanks for the feedback. We’ll use it to improve this page.You’ve already sent feedback on this page. Thanks.

Data Analyst
Explores traffic sources, conversion funnels, and retention, using clear metric definitions and concrete examples to explain what the numbers mean.