Remove personal data from a text before you pass it to an AI
Paste a text or drop a PDF or DOCX file. Anonimiza detects names, DNI, IBAN, phone numbers or addresses and replaces them with markers such as [PERSON_1]. When the AI replies,
you paste its answer and each piece of data goes back into its place. Everything happens in your browser: the text is not sent to any server.
Hi, I’m Lucía Herrero, from Talleres Norte. My DNI is 30246633T and the refund goes to ES21 3943 1486 0866 6169 7230. Call me on 655 908 112 or drop by Calle de Colón 24, Valencia.
How it works
Three steps, with no account and nothing to install. The first time, an AI model is downloaded and kept in the browser.
-
Detect
Data with a fixed format (DNI, NIE, CIF, IBAN, cards, phone numbers, emails, IP addresses, Spanish social security numbers) is found with rules, and its check digit is verified. Names, organisations and addresses are found by the GLiNER model, which runs on your device with WebGPU or WebAssembly.
-
Review and replace
You see the text with each item highlighted. You can switch off anything that is not personal data and select anything that is missing. Each value gets a stable marker: if “Lucía Herrero” appears five times, all five are
[PERSON_1]. -
Restore
You copy or download the anonymised text and use it with the AI of your choice. When you paste its reply into “Restore”, the markers become the original data again. The replacement table exists only in the tab’s memory.
What it detects and how
The rules are deterministic and discard numbers whose check digit does not match. The model is probabilistic: it is often right, but not always.
| Data | Method | Marker |
|---|---|---|
| Names of people | GLiNER model, plus repeated mentions and short forms (“Mr Molina”) | [PERSON_n] |
| Companies and organisations | GLiNER model | [ORGANIZATION_n] |
| Postal addresses | GLiNER model | [ADDRESS_n] |
| DNI and NIE | Rule + check letter | [DNI_n] [NIE_n] |
| CIF | Rule + check digit | [CIF_n] |
| Social security number | Rule + mod 97 check | [SSN_n] |
| IBAN (Spain and the rest of SEPA) | Rule + length for the country + mod 97 check | [IBAN_n] |
| Cards | Rule + Luhn algorithm | [CARD_n] |
| Phone numbers | Rule (Spanish numbers in their usual groupings; foreign numbers with a + prefix) | [PHONE_n] |
| Emails and IP addresses | Rule (IPv4 and IPv6) | [EMAIL_n] [IP_n] |
| Any other fragment | You select it | [OTHER_n] |
Measured figures
Measured with the same code the site uses, on 29 test documents written in Spanish for this project (contracts, payslips, medical reports, emails, chats, court rulings…), with 230 items of personal data annotated by hand. They are published as they came out; the dataset and the script are in the repository.
| Type | Annotated | Marked | Recall | Exact recall | Precision | Exact precision |
|---|---|---|---|---|---|---|
| People | 84 | 85 | 100.0 % | 89.3 % | 98.8 % | 88.2 % |
| Organisations | 29 | 32 | 100.0 % | 100.0 % | 90.6 % | 90.6 % |
| Addresses | 24 | 25 | 95.8 % | 95.8 % | 92.0 % | 92.0 % |
| DNI | 14 | 14 | 100.0 % | 100.0 % | 100.0 % | 100.0 % |
| NIE | 4 | 4 | 100.0 % | 100.0 % | 100.0 % | 100.0 % |
| CIF | 8 | 8 | 100.0 % | 100.0 % | 100.0 % | 100.0 % |
| Social security no. | 3 | 3 | 100.0 % | 100.0 % | 100.0 % | 100.0 % |
| IBAN | 9 | 9 | 100.0 % | 100.0 % | 100.0 % | 100.0 % |
| Cards | 3 | 3 | 100.0 % | 100.0 % | 100.0 % | 100.0 % |
| Phones | 30 | 30 | 100.0 % | 100.0 % | 100.0 % | 100.0 % |
| Emails | 18 | 19 | 100.0 % | 100.0 % | 94.7 % | 94.7 % |
| IP addresses | 4 | 4 | 100.0 % | 100.0 % | 100.0 % | 100.0 % |
| Total (WebAssembly, int8w) | 230 | 236 | 99.6 % | 95.7 % | 97.0 % | 93.2 % |
| Total (WebGPU, fp16) | 230 | 236 | 99.6 % | 95.2 % | 97.0 % | 92.8 % |
"Recall" and "precision" count a hit when the marked text overlaps an annotated item of the same type; the "exact" columns require the same boundaries. Model threshold 0.3 ("High" sensitivity). 29 documents, 230 items. These figures are optimistic: the documents were written by the author, they are clean, and the choices (model labels, threshold, phone formats, searching for short forms of names) were made looking at the errors on this same set. The model alone, without those repetition searches, found 94 % of the names. Expect more misses on real documents.
Model variants
Agreement of each ONNX export with the original GLiNER in Python (PyTorch) on the same 28 test inputs: entities with the same boundaries and type, and largest score difference. The int8 file published on Hugging Face quantizes the activations of every matrix multiplication, which the output projection of the feed-forward layers does not survive; so the WebAssembly variant is quantized here on the weights only (8-bit blocks), with fp32 activations.
| File | Size | Same entities | Max score diff. | Used for |
|---|---|---|---|---|
model.onnx (fp32) | 1,157 MB | 127 / 127 | < 0.0001 | — |
model_fp16.onnx | 580 MB | 127 / 127 | 0.061 | WebGPU |
model_q4f16.onnx | 472 MB | 117 / 128 | 0.61 | discarded |
model_int8.onnx | 349 MB | 12 / 127 | 0.68 | discarded |
model_uint8.onnx | 349 MB | 23 / 127 | 0.70 | discarded |
gliner-pii-int8w.onnx | 357 MB | 126 / 127 | 0.047 | WebAssembly |
Speed, as a rough guide: a 187-word document takes about 5–6 s with WebAssembly and 4 threads on the ARM server (4 shared cores) where it was measured; a graphics card should be much faster, but WebGPU speed has not been measured because that server has no GPU.
Limits
Anonimiza reduces the risk, it does not remove it. It does not guarantee complete anonymisation, and you must review the result before sharing it.
- The model makes mistakes. In the tests, the model on its own let one name in twenty slip through (mostly single or shortened repeated names), and sometimes it marked things that are not personal data, such as a court or a town council. On real documents it will fail more often than in the tests.
- Context can also identify someone. A job title (“the head teacher of a school in Teruel”), a date, a rare illness or a detail of the story can be enough to know who is being talked about. Those details are not searched for.
- Text only. From PDF and DOCX files only the text is extracted: formatting, tables and images are lost. Scanned PDFs have no text and are not OCR’d.
- Designed for Spanish. The model is multilingual and the rules work for other SEPA countries, but the figures have only been measured in Spanish. DNI, NIE, CIF and social security numbers are Spanish identifiers.
- The table lives in the tab. If you reload or close the page, the markers can no longer be restored. Nothing is saved anywhere, on purpose.
- Modest devices, more waiting. The first time, the model has to be downloaded (about 370 MB with WebAssembly or 600 MB with WebGPU), and analysing a long document can take a while on devices without a graphics card.
Privacy you can check
The text does not leave your device
Reading files, the rules, the model and the restoring all run in your browser. There is no server that receives your documents.
Enforced by the browser
The page is served with a content security policy (CSP) whose connect-src only allows connections to this site and to the models domain. Even if the code tried to send something elsewhere, the browser would block it.
No analytics or cookies
There is no Google Analytics or anything similar. The browser only stores your preferences and the downloaded model, and you can delete them from the app.
Open source
All the code is on GitHub under the MIT licence. You can check the requests in the “Network” tab of your developer tools while you use the app.
Questions
Why markers and not invented data?
A marker such as [PERSON_1] makes clear what has been removed, the AI almost always respects it, and it can be undone without any ambiguity. A made-up name could be mistaken for a real one, or slip into the reply without you noticing.
What happens if the AI changes a marker?
Restoring accepts the usual changes: upper or lower case, a space instead of the underscore, or missing square brackets. If a marker appears that is not in the table, the app flags it and leaves it as it is.
Do I need a graphics card?
No. If the browser offers WebGPU with fp16 support, the graphics card is used; if not, the model runs on the processor with WebAssembly and several threads. It is slower, but gives practically the same result.
Does it work on a phone?
Yes, although the model needs quite a lot of memory (over 1 GB while running). On modest phones it can be slow, or the browser may close the tab. The rules always work, even without downloading the model.
Can I use it to comply with the GDPR?
It can help you minimise the data you share, but it is not a certified anonymisation tool and it does not replace a human or legal review. A text with markers is generally still pseudonymised data.
Try it with an example text
The app includes a fictitious document so you can see how it works before using one of your own.
Open the app