Anonimiza

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.

Original

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.

  1. 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.

  2. 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].

  3. 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.

DataMethodMarker
Names of peopleGLiNER model, plus repeated mentions and short forms (“Mr Molina”)[PERSON_n]
Companies and organisationsGLiNER model[ORGANIZATION_n]
Postal addressesGLiNER model[ADDRESS_n]
DNI and NIERule + check letter[DNI_n] [NIE_n]
CIFRule + check digit[CIF_n]
Social security numberRule + mod 97 check[SSN_n]
IBAN (Spain and the rest of SEPA)Rule + length for the country + mod 97 check[IBAN_n]
CardsRule + Luhn algorithm[CARD_n]
Phone numbersRule (Spanish numbers in their usual groupings; foreign numbers with a + prefix)[PHONE_n]
Emails and IP addressesRule (IPv4 and IPv6)[EMAIL_n] [IP_n]
Any other fragmentYou 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.

99.6 %of the annotated personal data were replaced, at least in part (229 of 230)
99.0 %of the sensitive characters were covered
97.0 %of what the tool marked really was personal data (229 of 236)
TypeAnnotatedMarkedRecallExact recallPrecisionExact precision
People8485100.0 %89.3 %98.8 %88.2 %
Organisations2932100.0 %100.0 %90.6 %90.6 %
Addresses242595.8 %95.8 %92.0 %92.0 %
DNI1414100.0 %100.0 %100.0 %100.0 %
NIE44100.0 %100.0 %100.0 %100.0 %
CIF88100.0 %100.0 %100.0 %100.0 %
Social security no.33100.0 %100.0 %100.0 %100.0 %
IBAN99100.0 %100.0 %100.0 %100.0 %
Cards33100.0 %100.0 %100.0 %100.0 %
Phones3030100.0 %100.0 %100.0 %100.0 %
Emails1819100.0 %100.0 %94.7 %94.7 %
IP addresses44100.0 %100.0 %100.0 %100.0 %
Total (WebAssembly, int8w)23023699.6 %95.7 %97.0 %93.2 %
Total (WebGPU, fp16)23023699.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.

FileSizeSame entitiesMax score diff.Used for
model.onnx (fp32)1,157 MB127 / 127< 0.0001—
model_fp16.onnx580 MB127 / 1270.061WebGPU
model_q4f16.onnx472 MB117 / 1280.61discarded
model_int8.onnx349 MB12 / 1270.68discarded
model_uint8.onnx349 MB23 / 1270.70discarded
gliner-pii-int8w.onnx357 MB126 / 1270.047WebAssembly

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