Sanitext

Spanish PII Detection and Redaction

Sanitext detects and redacts PII in Spanish text using the same API as English. It finds Spanish names, emails, phone numbers, and addresses without a language flag. English-only tools like AWS Comprehend miss Spanish accents, two-surname names, and +34 phone formats that Sanitext handles natively.

Most PII tools are built for English first. They miss Spanish surnames, trip over accented characters, and do not know what a +34 number looks like. Sanitext treats Spanish as a first-class language. The same /v1/detect and /v1/redact calls work on Spanish text with no special config.

Spanish PII detection: Sanitext vs English-first tools

FeatureSanitextEnglish-first tools (e.g. AWS Comprehend)
Two-surname names (María García Pérez)Detected nativelyOften split or missed
Accented names (José, Begoña)DetectedCan break on accents
Spanish phone format (+34 600 11 22 33)Detected as PHONEOften unmatched
Spanish IBAN and card numbersDetected as ACCOUNTVaries by config
Language flag neededNoOften yes
Data sent to third-party LLMNever (own Cloudflare infra)Depends on vendor
PricingFlat, from $29/moMetered per unit

What PII does Sanitext detect in Spanish?

Sanitext reads Spanish text and tags personal data the way a native reader would. It knows Spanish people often have two surnames, that titles like "Dr." or "Sra." sit before a name, and that addresses use formats like "Calle Mayor 12, 3 izquierda".

Each match comes back with a label, byte offsets, a confidence score, and the matched text. You get the same nine labels in Spanish as in any other language.

  • —FIRSTNAME and LASTNAME: handles two surnames (María García Pérez) and accented letters (José, Begoña, Núñez)
  • —PREFIX: titles like Dr., Sr., Sra., Dña.
  • —EMAIL: addresses on .es and any other domain
  • —PHONE: Spanish formats like +34 600 11 22 33 and 600112233
  • —ADDRESS: street formats with Calle, Avenida, piso, and Spanish postal codes
  • —DATE: written dates like "3 de marzo de 2024"
  • —URL, ACCOUNT (IBAN, card numbers), and SECRET (API keys, tokens)

Spanish redaction example

Here is a Spanish sentence with personal data run through /v1/redact. The input keeps every accent and the two-surname name. The output masks each span with its label.

Input: "Hola, soy María García y mi correo es maria@correo.es. Llámame al +34 600 11 22 33."

Output: "Hola, soy [FIRSTNAME] [LASTNAME] y mi correo es [EMAIL]. Llámame al [PHONE]."

The detect endpoint returns the same spans with byte offsets and scores, so you can mask, hash, or replace them however you need.

How accurate is Sanitext on Spanish text?

Spanish detection is strong but not perfect. Common Spanish first names, surnames, emails, phone numbers, and IBANs are detected reliably. Rare names, foreign names written in Spanish text, and unusual address formats can be missed or mislabeled.

Sanitext is a redaction and data-minimization aid, not an anonymization or compliance guarantee. We return a confidence score on every span so you can set your own threshold. For high-risk data, review the output before you trust it.

We do not retain raw text. We log only counts and timings, so your Spanish customer data never sits on our servers.

Why does the EU angle matter for Spanish text?

Spanish text often carries data about people in Spain and Latin America, which falls under GDPR when it touches the EU. Sanitext helps with data minimization before text reaches an LLM, a log file, or a support tool.

We own the open-weights model (Apache-2.0) and run it on our own Cloudflare infrastructure. Your Spanish text is never sent to a third-party LLM, so there is no extra processor to add to your records. Enterprise plans offer EU data residency and a DPA.

This supports GDPR work but does not replace your legal review. Redaction reduces risk; it does not erase your obligations.

bash

curl -X POST https://api.sanitext.app/v1/redact \
  -H "Authorization: Bearer $SANITEXT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hola, soy María García y mi correo es maria@correo.es. Llámame al +34 600 11 22 33."
  }'

# Response
# {
#   "redacted": "Hola, soy [FIRSTNAME] [LASTNAME] y mi correo es [EMAIL]. Llámame al [PHONE]."
# }

FAQ

Do I need to set a language to detect Spanish PII?+

No. Sanitext auto-handles Spanish with the same /v1/detect and /v1/redact calls used for English. There is no language flag. You can mix Spanish and English in one request and it detects PII in both.

Does Sanitext handle Spanish accents and two surnames?+

Yes. It detects accented names like José, Begoña, and Núñez, and recognizes two-surname patterns like María García Pérez, tagging the full name as FIRSTNAME plus LASTNAME spans with byte offsets.

Can Sanitext detect Spanish phone numbers and IBANs?+

Yes. It detects Spanish phone formats such as +34 600 11 22 33 and 600112233 as PHONE, and Spanish IBANs and card numbers as ACCOUNT. Each match returns a confidence score you can threshold on.

Is Spanish redaction enough for GDPR compliance?+

No. Sanitext is a redaction and data-minimization aid, not an anonymization or compliance guarantee. It reduces exposure of Spanish PII, but you still need your own legal review and data-handling controls for GDPR.

Redact Spanish PII in 60 seconds

Sign up free, get an API key, and run your first Spanish redaction with one curl. 300K characters free, no card. See /pricing for plans.

Get your free API key