Developers and AI

How to anonymize data for AI before you paste it into a chat

Mask emails, phone numbers, card numbers, keys and the names you list before you paste text into an AI chat, then put the real values back in the answer.

DealMahal team · Published 6 December 2026 · 8 min read

To anonymize data for AI chats, swap private details for neutral tags before the text leaves your computer, and keep a key so you can put the real values back into the answer. Our free tool to redact private data before pasting into AI does this in your browser: email addresses, phone numbers, card numbers, IBANs, IP addresses, keys and passwords, plus the names you list, become tags such as [EMAIL_1]. It finds patterns, not everything, so you still read the result before you send it.

Masking is not the same as anonymous

A redaction tool replaces values that match a pattern. It cannot understand the meaning of your text. A sentence can still point to one person through details that match no pattern, such as a job title, a small team and a date. So treat the tool as a careful first pass, then read the masked text yourself.

If your workplace has rules about what may be shared with AI tools, those rules come first. This tool helps you follow them; it does not replace them.

What the tool finds

The tool uses rules and checksums only, no AI model. These are the kinds of data it looks for, with the label of each option on the page:

Option on the pageWhat it catchesTag
Email addressesAnything shaped like an email address, such as jane@example.com[EMAIL_1]
Phone numbersNumbers that start with + (8 to 15 digits); grouped numbers with 9 to 13 digits, skipping ones that look like dates or amounts; numbers after words such as phone, tel, mobile, call or fax[PHONE_1]
Card numbers (checked with the Luhn rule)13 to 19 digits, with spaces or hyphens allowed, that pass the Luhn check digit test[CARD_1]
IBANs (checked with the bank checksum)A country code, the right length for that country, and valid check digits[IBAN_1]
IP addressesIPv4 and IPv6 addresses[IP_1]
Secret parts of web addresses (tokens, keys, passwords in links)A user name and password inside a link, link values named token, key, password, code or signature, and long random parts of a link[SECRET_1]
API keys, tokens and passwords written as key = valueText such as "password: ..." or "api_key = ...", Bearer tokens, private key blocks, web tokens, and keys with well known starts such as sk- or ghp_[SECRET_1]
Other long random-looking strings (32+ characters)Mixed letters and digits that look random[SECRET_1]
Mask whole web addresses (off by default)Every link, in full[URL_1]
Names and other words from your listExactly the words you type, in any case, as whole words[NAME_1]

When two matches overlap, the more specific one wins. A key inside a link is tagged as a secret, not as part of an address.

What it does not find

The warning on the page says it plainly: "It can miss things (for example names that are not in your list, home addresses, ID numbers in unusual formats, or private details written in words) and it can mask harmless numbers." In practice:

  • Names you did not list. There is no automatic name finder. Type every person, client and project name you want hidden.
  • Home and postal addresses. There is no address rule. Delete them, or add the street names to your list.
  • ID numbers. Passport, membership or staff numbers have no rule of their own. Some may be caught by the phone or card rules by chance; many will not.
  • Dates, including dates of birth. No date rule exists, and the phone rule deliberately skips values that look like dates.
  • Details written in words. "The only engineer in our Leeds office" names a person without any pattern to match.
  • Files it cannot read. Excel workbooks, PDFs and images are not accepted. Convert them to text first (see the end of this guide).

It can also over mask. An order number that happens to pass the Luhn check becomes [CARD_1], and a long product code can look like a phone number. That costs you nothing private, but read the result so the AI gets the context it needs.

Step by step

  1. Open Redact private data for AI.
  2. Paste your text into the box, or choose or drop a file. TXT, CSV, TSV, Markdown and JSON files work, plus log, XML, HTML and YAML files, up to 20 MB.
  3. Under What to mask, keep the defaults or untick what you do not need.
  4. In Names and other words to mask (one per line), type the names, company names and code words to hide. The list takes up to 1,000 entries of up to 100 characters each. Case does not matter, and a double space still matches a single one.
  5. Click Find and mask private data. A small table shows what was found and how many times, and the status line says, for example, "Masked 6 item(s) (4 different values). Review the result before you send it."
  6. Read the masked text from top to bottom. Then click Copy masked text, or download it with the Download masked button, which keeps your file type.
  7. If you will want the real values back later, save the key with Save key file (.json) or Save key as CSV.

A worked example

Here is a short example note, using a placeholder name, a reserved example.com address and an IP address from the range set aside for documentation (RFC 5737). The names list holds one line: Jane Example.

Hi team, Jane Example (jane@example.com) asked about the server at 192.0.2.10.
Please reply to JANE@example.com before Friday. Jane  Example is out on 2026-12-07.
password: example-only-123

After masking:

Hi team, [NAME_1] ([EMAIL_1]) asked about the server at [IP_1].
Please reply to [EMAIL_1] before Friday. [NAME_1] is out on 2026-12-07.
password: [SECRET_1]

Notice three things. The email in capitals got the same tag as the one in lower case. The name with a double space still matched. And the date was left alone, which is right for a meeting day but would be wrong for a date of birth.

Same value, same tag

Each different value gets its own numbered tag, and the same value always gets the same tag. Emails, names and IP addresses are compared without regard to case. Phone and card numbers are compared by their digits only, so the same number written with or without spaces gets one tag. This is what keeps the masked text useful: the AI can still see that [NAME_1] wrote to [NAME_2] twice about [CARD_1].

If your text already contains tags like [EMAIL_1], the tool skips those numbers so the restore step cannot mix them up.

Putting the real values back

When the AI answers, open Got the AI's answer? Put the real values back, paste the answer, and click Put the real values back. The tool says how many tags it replaced. It accepts tags in any case, so [email_1] works too. A tag the AI rewrote, such as [EMAIL 1] with a space instead of the underscore, is not recognised, so add a line to your prompt asking the AI to keep every tag exactly as written.

The key holds your real data. It stays in the browser tab until you close it, and Forget the key removes it at once. If you save it, keep the file somewhere safe, and never paste the key into an AI chat. A saved .json key file can be loaded later with Or use a saved key file.

CSV files and lists of names

For CSV and TSV files the download stays a CSV. Protect the CSV against spreadsheet formulas is ticked by default: cells that start with =, +, - or @ and are not plain numbers get an apostrophe in front, so they cannot run as formulas when someone opens the file in a spreadsheet.

The names list is where CSV work gets faster. If the file has a column of customer or staff names, copy that column from your spreadsheet and paste it into the names box. Each line becomes one entry, so every name in the column is masked wherever it appears.

Large texts

Texts over 100,000 characters are scanned in a background worker, so the page stays responsive. The scan stops after 90 seconds with "This took more than 90 seconds and was stopped. Please try a smaller file." The limit is 20,000,000 characters; split anything longer.

Nothing leaves your browser

The masking runs on your device, and the page makes no request that carries your text. If you want to see this for yourself, open your browser's developer tools on the Network tab while you mask something.

Getting other files ready

Frequently asked questions

Does this make my data anonymous?

No tool can promise that. This one masks common patterns and the names you list. It can miss private details written in other ways, such as addresses or names you did not list, so read the masked text yourself before you share it.

Are names found automatically?

No. Names are masked only when you type them in the list, because finding names in free text needs an AI model and this tool uses rules only. Emails, phone numbers, card numbers, IBANs, IP addresses and keys are found automatically.

Is my text uploaded?

No. Everything runs in your browser and nothing is sent to DealMahal or anyone else. The key with your real values stays in the tab until you close it, unless you save it as a file.

How do I put the real values back?

Open the section called "Got the AI's answer? Put the real values back", paste the answer that contains tags like [EMAIL_1], and click Put the real values back. It uses the key from the page, or a key file you saved earlier.

Can I use it on Excel files?

Not directly. The tool reads pasted text and text files such as TXT, CSV, TSV, Markdown and JSON, up to 20 MB. Save the sheet as CSV first, for example with our Excel to CSV converter, then mask the CSV.

Will the AI still understand the masked text?

The tags keep the text readable. Each different value gets its own tag, so the AI can still tell two people or two accounts apart. Ask it to keep the tags unchanged in its answer so you can restore them.

Spotted an error? Write to dealmahal.official@gmail.com.

Questions or corrections: dealmahal.official@gmail.com.

Keep reading

All posts