DataMask

Personal data masking for AIAI understands the text. It recognises no one.

Before a document reaches an AI model, Data Mask replaces people, companies, addresses, ID and bank numbers, and health data with placeholders. When the answer comes back, it puts every real value back exactly where it belongs.

dilekce.pdfreal dataMasked

Davacı Ayşe Yılmaz (T.C. 10000000146), davalı Örnek Yapı İnşaat A.Ş. bünyesinde çalışırken lomber disk hernisi tanısı almıştır. Kıdem tazminatının TR33 0006 1005 1978 6457 8413 26 numaralı hesaba ödenmesi talep edilmiştir. Ayşe Yılmaz’ın tebligat adresi: Atatürk Cad. 12/4, Çankaya.

Hover a tag: the real value never leaves your side.

98.4%
of sensitive data masked across 320 real legal documents
No GPU
Runs on your own servers
2 lines
Added around your existing model call

01 The problem

Every day your people paste contracts, court filings and patient reports into AI tools. With every paste, a national ID number, an IBAN, a patient’s name leaves your organisation.

Data Mask cuts the leak off at the source.

You keep the power of tools like ChatGPT. The real identities stay inside your organisation.

02 How it works

The document leaves. The identities stay.

Your organisation
AI model
dilekce.pdfreal data

Davacı Ayşe Yılmaz (T.C. 10000000146), davalı Örnek Yapı İnşaat A.Ş. bünyesinde çalışırken lomber disk hernisi tanısı almıştır. Kıdem tazminatının TR33 0006 1005 1978 6457 8413 26 numaralı hesaba ödenmesi talep edilmiştir. Ayşe Yılmaz’ın tebligat adresi: Atatürk Cad. 12/4, Çankaya.

Model answerreal data

Summary: Ayşe Yılmaz is claiming severance pay from her former employer, Örnek Yapı İnşaat A.Ş.

  1. 01

    Finds

    Before the document reaches the AI, Data Mask finds people, companies, addresses, ID and bank numbers, and health data.

  2. 02

    Masks

    Each one is replaced with a placeholder such as <PERSON_0> or <TR_NATIONAL_ID_0>. The AI understands the text but recognises no one.

  3. 03

    Restores

    When the answer arrives, the placeholders are swapped back for the real values, one to one. Real identities stay with you.

03 The difference

Built for Turkish free text, not database columns.

Most masking tools on the market were designed for databases: they recognise columns, replace what they find with asterisks, and cannot bring it back. Turkish free text, such as a surname carrying a suffix, a company named without its legal form, or an address squeezed between two lines, is not where they are strong.

Conventional masking

Davacı **** ******, davalı ***** **** ****** A.Ş.’den alacağının **** ****** adına açılan hesaba ödenmesini istiyor.

  • Recognises columns
  • Replaces with asterisks
  • Cannot restore

No way to tell who is who. The answer cannot be restored.

Data Mask

Davacı <PERSON_0>, davalı <ORGANIZATION_0> A.Ş.’den alacağının <PERSON_0> adına açılan hesaba ödenmesini istiyor.

  • Reads Turkish free text
  • Uses meaningful placeholders
  • Restores one to one

Who is who stays clear. The answer is restored with the real values.

98.4%

Across 320 real legal documents, 98.4% of the data that had to be masked was masked completely.
  • A

    A model trained on Turkish legal text

    Our own AI model, trained on Turkish legal documents, catches the surname with a suffix, the company without its legal form, the address between two lines.

  • B

    Check-digit validation

    Rules that verify the check digits of ID and bank numbers add a second safeguard next to the model.

  • C

    Same person, same placeholder

    A person keeps the same placeholder throughout the document, so the AI never confuses who is who and the output stays usable.

  • D

    On your servers, no GPU

    It installs on your own servers and needs no GPU. If the model goes down, it rejects the request instead of returning half-masked text.

04 Developers

Add AI to your own product without handing over the data.

You want an assistant on your customer service screen, a summariser in your contract management system, a report helper on the patient record. Your legal and compliance teams rightly ask: will this data go to the model provider?

Data Mask is a security layer that sits between your application and the AI model. It replaces personal data with placeholders before the text reaches the model, and swaps the placeholders in the model’s answer back for the real values. Your product gains the AI feature; your customer’s identity is never shown to the model.

Two lines of code, no architecture change.

Integration is one line before your existing model call and one line after it.

Lines you add
pip install bb-mask
import os, bb_mask

bb_mask.init(api_key=os.environ["BB_ANONYM_TOKEN"])

tagged = bb_mask.anonymize(text)                 # before the model
reply  = my_llm(tagged.text)                     # your own model call
result = bb_mask.restore(tagged.doc_id, reply)   # after the model
npm install bb-mask
import { init, anonymize, restore } from "bb-mask";

init(process.env.BB_ANONYM_TOKEN);

const tagged = await anonymize(text);
const result = await restore(tagged.docId, await myLlm(tagged.text));
  • Official SDK, one command

    Published on PyPI for Python and on npm for Node.js. TypeScript types and async calls come ready.

  • REST API for every language

    Using another language? The same functions are available over a standard REST API.

  • The model stays yours

    The SDK never calls the model for you. ChatGPT, Claude, Gemini or an open-source model on your own server: keep working with whichever one you use.

  • Open-source client

    The client code is open source; your security team can review it line by line.

PyPInpmGitHubMIT

05 Documents

Not just text. Documents.

Send PDF, Word and plain-text files directly. Up to three related documents, such as a petition, its response and an annex, are processed in a single call, and the same person gets the same placeholder in all of them. The model keeps the relationship between documents; summaries and analysis stay consistent.

  1. dilekce.pdfPDF

    Davacı Ayşe Yılmaz işbu dilekçeyle…

  2. cevap.docxDOCX

    …Ayşe Yılmaz tarafından ileri sürülen…

  3. ek.txtTXT

    Ek-1: Ayşe Yılmaz imzalı tutanak

Three documents, one call, one identity.

06 Control

You decide where the data lives.

For enterprise teams the real question is not how easy the integration is. It is control.

  1. In the service

    Mapping in the service, lifetime in your hands

    Keep the placeholder mapping in the service and delete it when you are done.

    persist=True
  2. On your side

    Mapping entirely on your side

    With a single parameter you keep the mapping yourself; in that case the service stores nothing.

    persist=False
  3. In your data centre

    Everything in your own data centre

    For stricter requirements, the whole of Data Mask installs in your own data centre and runs without a GPU.

A loud error, never a silent leak.

If the detection model goes down for any reason, the system does not return half-masked text. It rejects the request.

07 Who it’s for

For organisations that want to stop data leaks without banning AI.

  • 01

    Ministries and public bodies

    Correspondence and petitions carrying citizen data are processed with AI while identities stay inside the institution.

  • 02

    Hospitals

    Patient reports are summarised and assessed with patient names, diagnoses and other health data masked.

  • 03

    Law firms

    Contracts and court filings are reviewed and summarised without ever showing the client’s identity to the model.

What product teams are adding

  • An assistant on the customer service screen
  • A summariser in the contract management system
  • A report helper on the patient record

08 References

Trusted by

  • Public sectorRepublic of Türkiye Ministry of Interior
  • Legal technologyhukuksal.co

09 FAQ

Frequently asked questions

What is Data Mask?

Data Mask is a security layer that sits between your application and an AI model. It replaces personal data with placeholders before text reaches the model, and swaps the placeholders in the model’s answer back for the real values.

Which personal data does it mask?

It finds names of people and companies, addresses, ID numbers such as the Turkish national ID, bank numbers such as IBANs, and health data such as diagnoses, and replaces each with a placeholder like <PERSON_0> or <TR_NATIONAL_ID_0>.

Can masked data be restored?

Yes. Data is not replaced with asterisks; it is replaced with a meaningful placeholder. When the AI’s answer arrives, Data Mask puts the real values back one to one.

Which AI models does it work with?

The SDK never calls the model for you. ChatGPT, Claude, Gemini or an open-source model on your own server: you keep working with whichever one you already use.

How well does the masking perform?

Across 320 real legal documents, it completely masked 98.4% of the data that had to be masked. Data Mask relies on its own AI model trained on Turkish legal text and on rules that verify the check digits of numbers.

Can we install it on our own servers? Does it need a GPU?

Yes. The whole of Data Mask installs in your own data centre and runs without a GPU.

Where is the placeholder mapping stored?

You decide. You can keep the mapping in the service and delete it when you are done, or keep it entirely on your side with a single parameter; in that case the service stores nothing.

What happens if the detection model goes down?

The system does not return half-masked text. It rejects the request: a loud error instead of a silent leak.

Which file types are supported?

You send PDF, Word and plain-text files directly. Up to three related documents are processed in one call, and the same person gets the same placeholder in all of them.

How do we integrate it into an existing application?

You add one line before your existing model call and one line after it. The official SDK is published on PyPI for Python and on npm for Node.js; for other languages the same functions are available over a standard REST API.

Don’t ban AI. Mask it.

Developed in Türkiye for ministries, hospitals and law firms. Get a key in the console and mask your first document.