Converter tool

Redact Personal Data Before Pasting into AI

Replace emails, phone numbers, card numbers, IBANs, IP addresses and the names you list with placeholders like [EMAIL_1] before you paste text into an AI chat, then put the originals back into the reply. Pattern matching runs in this tab.

Pasted text0 B / 5 MB

Find by pattern

Matched as whole words in any letter case. 0 listed.

Detection is pattern-based. People's names, street addresses, dates of birth and anything else without a fixed shape are found only when you list them above. Read the redacted text before you paste it anywhere.

Preview

Output Preview

Paste text or press Use sample to see what would be replaced.

Redact Personal Data Before Pasting into AI

Operator: Abdulla Al Fahad. How tools are built and checked

Asking an AI assistant to summarise a complaint, tidy a spreadsheet or draft a reply usually means pasting text that was never written for a third party: a customer's email address, a mobile number in a signature, a card number quoted in a dispute, the IBAN for a refund. This page swaps those values for placeholders such as [EMAIL_1], [PHONE_2] and [IBAN_1] before the text leaves your hands, so the assistant still sees the shape of the problem without the data itself.

The second half of the job is the way back. When the reply comes back saying "Dear [NAME_1], we have refunded [IBAN_1]", the Restore step puts the real name and account number back in, using the placeholder map from the first step. You get a usable draft, and the values the detectors and your list caught never reach the chat. Anything they missed does, which is why the preview is there for a final read.

Key features

  • Emails, phone numbers, payment card numbers, IBANs and IPv4 and IPv6 addresses found by pattern, each with its own switch
  • URLs (http, https and www. links) on a switch that starts off, since links are often what you want the assistant to read
  • US Social Security numbers and UK National Insurance numbers, each on its own switch
  • A custom list of names, company names, street addresses or code words, matched as whole words in any letter case
  • Numbered placeholders per type, with the same value always given the same placeholder
  • Two preview views: the redacted text with placeholders coloured by type, and the original with every match marked
  • Restore step that puts originals back into an AI reply from the map in memory or a saved .json or .csv map
  • Placeholder numbers already present in your text are skipped, so an old [EMAIL_1] is never confused with a new one

What the redacted text and the map hold

Input is plain text: paste it, or load a .txt, .md or .csv file of up to 5 MB. A file saved by Notepad as Unicode (UTF-16) is decoded as such, and a CSV whose accented letters are not stored as UTF-8, as in many older Excel exports, falls back to the Windows-1252 code page, so a listed name such as Zoë Müller still matches instead of arriving as garbled characters. Word documents, workbooks and PDFs are refused with a note to save them as text first, because their bytes are compressed or encoded and the patterns would never match.

The output is the same text with each detected value replaced. Nothing else moves: line breaks, spacing and punctuation stay where they were. Placeholders contain only capital letters, digits, an underscore and square brackets, so a redacted CSV still has the same columns and opens like the original.

The placeholder map can be saved two ways. The .json map has a warning field and a list of placeholder, type and original value. The .csv map has the columns placeholder, type and original, starts with a UTF-8 byte-order mark so accented names survive a spreadsheet, and puts an apostrophe in front of any value that begins with +, -, = or @, so a phone number such as +44 20 7946 0958 is not read as a formula. Loading that CSV for the Restore step removes the apostrophe again.

How it works

Each switched-on detector scans the whole text and proposes spans. Emails need a name, an @, a domain and a top-level domain of two or more letters. Card numbers must be laid out the way cards print them, as one unbroken run of 13 to 19 digits, in groups of four, or in the 4-6-5 and 4-6-4 groupings of 15- and 14-digit cards, with the same single space or dash between every group, and must pass the Luhn checksum. A grouped number that runs straight on into more digit groups is skipped, so a row of scores such as 12 45 78 33 91 is never read as a card, and a run of one repeated digit such as 0000 0000 0000 0000 passes Luhn but is skipped too. IBANs must have the length registered for their country code (22 characters for GB and DE, 27 for FR) and pass the mod-97 check, so a mistyped IBAN is left alone rather than half-matched.

Phone numbers are the hardest pattern, because digits with separators are everywhere. A candidate needs 7 to 15 digits. One that starts with + or has an area code in brackets skips the shape checks that follow. Every other candidate, including one written with a 00 international prefix such as 0044 20 7946 0958, must pass them: dates such as 2024-03-05 or 05.03.2024, lists of years, US ZIP+4 codes such as 90210-1234, the 3-2-4 shape of a Social Security number, amounts written with thousands separators such as 1 234 567, and lists of one- and two-digit numbers are all rejected. In every case no more than one group may be a single digit, not counting a country code after the +. An unbroken digit run counts when it has a + and 8 to 15 digits, 10 or 11 digits starting with 0, or 10 digits starting with 2 to 9.

IPv4 addresses need four parts from 0 to 255, so 256.1.1.1 and the version string 1.2.3.4.5 are ignored. IPv6 addresses are checked group by group, including the compressed :: form and an IPv4 tail such as ::ffff:192.0.2.1. Clock times like 10:30:45 and MAC addresses do not have the eight groups an uncompressed address needs, and :: or ::1 on their own are skipped as too short to identify anyone.

When two proposals overlap, the one that starts first wins, and at the same start the longer one wins. That is why a listed name inside an email address does not split it: ann.lee@example.com becomes [EMAIL_1], not [NAME_1].lee@example.com. Placeholders are then numbered per type in order of first appearance, keyed on a normalised value: emails ignore letter case, phone numbers ignore spacing and punctuation, IBANs ignore spaces, and listed names ignore case and extra spaces.

Common use cases

  • Asking an assistant to draft a reply to a customer complaint that quotes the customer's phone number and refund details
  • Getting help restructuring a CSV export of sign-ups without handing over the email column
  • Summarising a server log excerpt where the client IP addresses should stay internal
  • Having an HR letter reworded when it names the employee and their National Insurance number
  • Sharing a support ticket thread with an assistant to find the root cause, with names of staff and customers listed for removal

How to use this tool

  1. Paste the text you plan to send, or load a .txt, .md or .csv file. Use sample shows a complaint with six kinds of data in it.
  2. Check the switches. Turn URLs on if links could identify someone, such as a profile link, and turn off a detector that keeps catching something you need the assistant to see.
  3. List names, company names and street addresses in the names box, one per line or separated by commas. Add first names and nicknames on their own as well as full names.
  4. Read the redacted preview from top to bottom, then switch to the marked original to check what each placeholder stands for.
  5. Press Copy redacted text, or download it, and paste it into the chat. Download the .json or .csv map too if you might close the tab before the reply arrives.
  6. Open 2. Restore reply, paste the assistant's answer and copy the version with the real values back in.

Example

Complaint pasted with Maria Okafor and Tom Reyes in the names list

From: Maria Okafor <maria.okafor@example.com>
Phone: +44 20 7946 0958 (mobile 07700 900123)
Order 55120 was charged twice to card 4111 1111 1111 1111 on 2024-03-05.
Refund to IBAN GB82 WEST 1234 5698 7654 32, not to the card ending 1112.
Our log shows the second request came from 203.0.113.42.
Maria says her neighbour Tom Reyes saw the courier leave the parcel outside.

Redacted text, eight placeholders

From: [NAME_1] <[EMAIL_1]>
Phone: [PHONE_1] (mobile [PHONE_2])
Order 55120 was charged twice to card [CARD_1] on 2024-03-05.
Refund to IBAN [IBAN_1], not to the card ending 1112.
Our log shows the second request came from [IP_1].
Maria says her neighbour [NAME_2] saw the courier leave the parcel outside.

Tips for best results

  • List every form of a name that appears: "Maria Okafor" does not cover a later "Maria" on her own, as the example shows.
  • Ask the assistant in your prompt to keep placeholders exactly as written. Restore copes with [EMAIL 1] and lower case, but not with a placeholder the model rewrote as "the customer's email".
  • Download the map before you close or reload the tab. It lives only in the page's memory.
  • If you edit the text after copying it, the Restore step still uses the map taken at the moment of copying, which matches what you sent.
  • Leave the order numbers and dates you need the assistant to reason about. The detectors skip ISO dates and short reference numbers on purpose.

Common pitfalls

Names, street addresses, dates of birth, employer names and job titles have no fixed pattern and are only removed when listed. A paragraph can identify a person through details alone, such as "the only Welsh-speaking nurse on ward 9"; no pattern can catch that, so the final read is yours.

Pattern matching produces false positives. A 10-digit reference that starts with 2 to 9 looks exactly like a North American phone number, and about one in ten random 16-digit numbers passes the Luhn check, so a long invoice ID can come out as [CARD_1]. Restore puts it back either way, but the assistant will not see it.

Formats outside the rules are missed: phone numbers written with letters (0800-FLOWERS), extensions glued to the number, IBANs in lower case or split with dashes, card numbers grouped with dots, mixed separators or uneven groups, a grouped card number with another number right after it and only a space between, and National Insurance numbers starting with QQ, which is never issued. Sample numbers like that in training material will stay visible.

The map file contains every original value in plain text. Anyone who gets the map and the redacted text can rebuild the original, so store it as carefully as the source document and never paste it into the chat.

Restore replaces placeholders by their exact number. If the reply invents [EMAIL_3] when your map only has [EMAIL_1] and [EMAIL_2], it is listed as not in the map and left in place for you to deal with.

Common errors and how to fix them

"…is a ZIP archive or an Office document such as .docx or .xlsx."
The file starts with the PK signature of a zipped Office file, so its text is compressed and cannot be scanned. Save the document or sheet as .txt or .csv from Word or Excel and load that, or copy the text and paste it into the box.
"This text is larger than the 5 MB the redactor scans in one go."
Split the export into parts, such as one month of tickets at a time, and redact each. Placeholders restart at 1 in each part, so save each part's map next to it and restore each reply with the matching map.
"No placeholders such as [EMAIL_1] were found in this file."
The loaded file is not a map from this page, or its placeholder column was renamed. Load the .json or .csv map exactly as it was downloaded.
A placeholder in the reply is shown as not in the map.
The map in use belongs to a different text. Pick the matching map file, or redact the same text again with the same settings, which produces the same numbering.

Best practices

  • Keep a short standing list of your own names to hide (staff, company, office address) and paste it into the names box each time.
  • Redact the smallest excerpt that answers your question rather than a whole mailbox export.
  • Check the counts above the preview: no phone numbers in a text you know has a signature block means the format was missed.
  • Delete downloaded maps once the reply has been restored and checked.

Why the same value keeps the same placeholder

Consistency is what keeps the assistant's answer useful. If a customer's address appears in the To line, the signature and a quoted reply, all three become [EMAIL_1], so the assistant can tell that one person wrote three times. A different address becomes [EMAIL_2]. Restoring the reply then puts each address back where its placeholder appears.

Matching ignores case for emails and names, so Ann@Example.com and ann@example.com share a placeholder. Restore writes back the spelling of the first occurrence, which matters only when the source mixed capitalisations.

What happens on this page and what does not

While the tab is open, the tool holds these in memory: the text you pasted, your names list and switch settings, the redacted text with its placeholder map, a copy of that map taken when you copy or download the redacted text, the reply pasted into the Restore step, and the placeholders and values read from any map file you load. Matching is done by regular expressions and checksums in the page's own script. The tool has no code that uploads any of this or saves it to browser storage, so reloading or closing the tab discards all of it, and a map you did not download cannot be recovered.

None of this decides what an AI service does with the redacted text you paste into it. Read the provider's own terms for that.

Frequently asked questions

Does it find people's names on its own?

No. Only names you type into the list are replaced. A name has no reliable pattern, and guessing at capitalised words would also hide product names and place names you need.

Why was a card number left in my text?

Either it failed the Luhn checksum, so it is not a valid card number as written, or its digits were not laid out as cards print them. 4111 1111 1111 1112, one digit off a common test number, is left alone for the first reason. A typo in a real number has the same effect, so read the preview.

Can I redact a CSV and keep it importable?

Yes. Placeholders never contain commas or quotes, so each field keeps its place. A column of emails becomes a column of [EMAIL_1], [EMAIL_2] and so on, one per distinct address.

What if the AI rewrites [EMAIL_1] as EMAIL_1 without brackets?

That form is not restored, because a bare word is too easy to confuse with ordinary text. Restore does accept [EMAIL 1], any letter case, and the backslash-escaped \[EMAIL\_1\] that some Markdown copies produce.