Industries

Anonymize test data when only the real file shows the bug

Some bugs only reproduce with the real file: the Word document that breaks the parser, the CSV export with the odd character, the log from the outage. When you need to anonymize test data like that, Diskretio replaces the personal details and keeps the structure that triggers the bug.

anonymize.shresponse.json

# Anonymize a file, report as JSON

$ curl -X POST "$API/v1/files?response=json" \

-H "x-api-key: $ANON_KEY" \

-F "file=@Employment_Contract_Smith.pdf" \

-F 'options={"strategy":"placeholder","language":"en"}'

HTTP/1.1 200 OK · x-pages-charged: 3 · x-pages-remaining: 1757

{

"filename": "anonymized.pdf",

"pages": 3,

"report": {

"counts": {

"PERSON": 6,

"ORG": 2,

"ADDRESS": 3,

"IBAN": 1,

"TAX_ID": 1,

"NATIONAL_ID": 1,

"EMAIL": 1

},

"entities": [{ "id": "PERSON_1", "label": "PERSON", "occurrences": 4 }, …],

"warnings": []

},

"content_base64": "JVBERi0xLjcKJeLjz9MKMSAwIG9iago8PC9UeXBl…"

}

# page 1 of the output

Between [ORG_1] and [PERSON_1], [ADDRESS_1] …

Your formats and the AI tools you work with afterwards

  • Word
  • Excel
  • PowerPoint
  • Outlook (emails)
  • PDF
  • Scans & photos
  • TXT Text & CSV
  • ChatGPT
  • Claude
  • Microsoft Copilot
  • Gemini
  • Mistral
  • DeepL
  • Perplexity

Typical test data taken from production

  • Customer documents (DOCX, XLSX, PPTX, PDF) as fixtures for import or parsers
  • CSV exports for load tests and data migrations
  • Log files with IP addresses, usernames and emails
  • Screenshots from bug reports
  • Support attachments passed on to engineering

How it works

  1. 1

    Send a file or text

    Via web app or REST API, for example as a step in your build or support pipeline.

  2. 2

    Choose a strategy

    Placeholders for traceable fixtures, realistic fake data (Pro and above) when validations expect real formats.

  3. 3

    Commit it

    The format stays: DOCX stays DOCX, CSV stays CSV. Only PDFs and images come back as a rebuilt PDF.

Where Diskretio fits

Diskretio is strong on unstructured and document-based test data: Office files, PDFs, free text, logs and CSV. Office files are edited in place, so their internal XML structure is preserved, which matters when that structure is what triggers the bug.

From a data protection perspective, using production data for testing is a change of purpose that is often hard to justify. Anonymized test data is the usual way to put Art. 25 GDPR (data protection by design) into practice.

Where you need a different tool

Diskretio keeps replacements consistent only within one job and stores no mapping. For relational databases where foreign keys must match across many tables, dedicated test data tools with deterministic masking are a better fit.

JSON and XML files are not supported as formats of their own. Sent as text via the API, values in them are replaced; check whether the result is still valid.

FAQ

Questions. Answered briefly.

Try it with your own document

10 pages per month are free. No subscription, no credit card.