By · Last updated 2026-06-01

返回博客GDPR 与合规

欧盟国家税号:你的 PII 工具在遗漏什么

德国纳税人识别号、法国税务参考号、意大利财政代码、西班牙 NIF/NIE——以美国市场为中心的 PII 工具能识别社会安全号,却对大多数欧盟税号视而不见。

June 1, 20267 分钟阅读
EU national identifiersSteueridentifikationsnummerCodice FiscaleNIFmultinational GDPRtax ID detection

欧盟国家税号:你的 PII 工具在遗漏什么

税务识别号极为敏感。它们出现在工资单、纳税申报表和银行开户申请上。一旦泄露,便可用于欺诈和身份盗窃。

GDPR 将其定义为个人数据,其现实风险极高。欧盟每个成员国都有各自的国家识别号格式。大多数 PII 工具以美国或英国市场为开发基准,能轻松识别 SSN 和 NINO,却往往遗漏欧洲团队日常处理的 Steueridentifikationsnummer(德国纳税人识别号)、Codice Fiscale(意大利财政代码)和 BSN(荷兰公民服务号)。

欧盟税务识别号概览

每个欧盟成员国都有其独特格式,以下是最常见的几种。

德国 — Steueridentifikationsnummer(纳税人识别号)

Steuer-ID 共 11 位数字,出生时分配。首位为 1 至 9(不为 0),且不会连续出现三个相同数字。示例:12345678901。此外还使用 Steuernummer(税号):10 至 11 位数字,格式因州而异。

法国 — Numéro fiscal de référence(税务参考号)

SPI 共 13 位数字,由法国税务总局(DGFiP)签发。在税务文件中以「Identifiant fiscal」标注。

意大利 — Codice Fiscale(财政代码)

Codice Fiscale 为 16 位字母数字混合字符,编码了姓氏、名字、出生年、出生月、出生日和出生城市等信息。示例:RSSMRA85M01H501Z。该格式可通过校验和验证。

西班牙 — NIF 与 NIE

西班牙公民使用 DNI 号码加校验字母:8 位数字 + 字母,例如 12345678A。外国居民使用 NIE:X/Y/Z 前缀 + 7 位数字 + 校验字母,例如 X1234567A。法人实体使用 CIF:字母 + 8 位数字,例如 B12345678。

荷兰 — BSN(公民服务号)

BSN(Burgerservicenummer)共 9 位数字,采用 11 proef 校验位算法,在工资和福利文件中极为常见。

波兰 — PESEL

PESEL 共 11 位数字,前 6 位编码出生日期,后几位编码性别和序列号。

比利时 — Numéro de registre national(国家登记号)

RN 共 11 位数字,编码了出生日期、序列号和校验位。

葡萄牙 — NIF

葡萄牙 NIF(Número de Identificação Fiscal)共 9 位数字,含一位校验位。该缩写与西班牙 NIF 相同,但格式不同。

瑞典 — Personnummer(个人编号)

Personnummer 为 10 或 12 位数字,编码出生日期和序列号。格式:YYYYMMDD-XXXX 或 YYMMDD-XXXX。

芬兰 — Henkilötunnus(个人编号)

HETU 共 11 个字符,编码日期、分隔符、序列号和校验字符。格式:DDMMYY-XXXC。

标准工具遗漏了什么

美国和英国工具默认包含以下格式:

  • 美国社会安全号(SSN:XXX-XX-XXXX)
  • 英国国民保险号(NINO:XX 99 99 99 X)
  • 美国护照号
  • 美国驾照格式
  • 主流信用卡号

欧盟国家识别号往往缺席。基于 Presidio 默认识别器集构建的工具会遗漏这些格式。若不加入欧盟专属扩展,便无法覆盖欧盟范围。

现实中的合规漏洞

一家德国薪资处理公司为 500 家客户企业提供服务。其工作流程会删除姓名、电子邮件、IBAN 和电话号码,却遗漏了德国 Steueridentifikationsnummer。这种格式从未纳入标准配置。

数据保护局审计发现,工资单 PDF 中存在未脱敏的 Steuer-ID。该公司面临对历史文件的整改成本,面临 GDPR 第 83 条下的数据保护局执法,以及对客户的合同责任。

这一漏洞不是公司自己发现的,而是监管机构先找到的。

参阅我们的 GDPR 合规指南,自行开展覆盖范围检查。

欧盟覆盖优先级排序

如果你的业务横跨多个欧盟成员国,建议按以下顺序添加识别号格式。

第一级 — 最高处理量:

  1. 德国:Steueridentifikationsnummer
  2. 法国:Numéro fiscal
  3. 意大利:Codice Fiscale
  4. 西班牙:NIF/NIE
  5. 荷兰:BSN

第二级 — 规模较大但较小的市场:

  1. 波兰:PESEL
  2. 比利时:RN
  3. 瑞典:Personnummer
  4. 葡萄牙:NIF
  5. 奥地利:Sozialversicherungsnummer(社会保险号)

第三级 — 特定使用场景:

其余 17 个欧盟成员国,根据团队实际处理数据的地区按需添加。

添加 Steueridentifikationsnummer

德国 Steuer-ID 是最值得优先添加的格式,其规则清晰,有据可查。

Steuer-ID 共 11 位数字,首位为 1 至 9,其余 10 位可包含 0。校验位通过专用算法验证。

用于模式生成的自然语言描述:「德国税号:11 位数字,首位为 1 至 9,其余 10 位可包含 0。」

生成模式后,需对照德国工资单和纳税证明进行测试,检查检出率和误报率,验证通过后方可正式部署。

将该模式加入你的德语预设。对于多语言混合文件,与语言检测功能配合使用,确保正确的模式应用于正确的文件。

单一预设还是多个预设?

方案一 — 按国家区分预设:

为每个国家创建一个预设,按来源路由文件。误报率较低,但需要更多路由逻辑。

方案二 — 欧盟统一预设:

创建一个包含所有欧盟识别号格式的统一预设,运行更简单,但在普通文本上误报风险较高。适用于整批文件中均可能出现各类识别号的场景。

薪资文件建议使用方案一,按来源国路由;混合文件集建议使用方案二,并配合阈值调优。

参阅安全与合规概览,了解预设配置如何融入完整的合规工作流。

在审计之前补上漏洞

GDPR 在每个欧盟成员国的效力完全相同,美国构建的工具却往往并非如此。Codice Fiscale、BSN 和 Steuer-ID 与 SSN 承担着同等级别的风险,在共享文件中出现的频率也不相上下。

自定义实体模式能在数小时内补上检测漏洞。添加一个 Steuer-ID 模式,对照德语工资单样本进行测试,部署到所有工作流中。无需等待工具供应商更新,也无需等数据保护局审计来发现漏洞。


anonym.legal 支持通过预设配置界面添加自定义实体类型,模式在部署前会针对你的样本文件进行验证。

参考资料

准备好保护您的数据了吗?

开始使用 285 种实体类型在 48 种语言中匿名化 PII。

About this page

We update this page when our platform or the law changes.

Read our founder note for how we work.

Each change shows up in the timestamp at the top.

Related reading

We follow these rules

  • GDPR (EU 2016/679).
  • ISO/IEC 27001:2022.
  • NIS2 (EU 2022/2555).
  • HIPAA safe harbor under 45 CFR § 164.514(b)(2).

Our promise

We do not sell your data.

We do not train models on your text.

We store your files in Germany.

You can delete your account at any time.

You own your work.

Where we run

Our servers live in Falkenstein, Germany.

We use Hetzner. They hold ISO 27001 certification.

All data stays in the EU.

Backups run every day.

Need help?

Email support@anonym.legal.

We reply within one business day.

How we test

We run a full check suite on every release.

Each surface gets its own sweep script and report.

Human reviewers spot-check the output each week.

We track recall and precision on a labelled set.

Bad runs block the deploy.

What we never do

  • We never sell your information to third parties.
  • We never train models on what you upload.
  • We never keep your work after you delete it.
  • We never share keys with any outside firm.
  • We never run ads inside the product.

Plans in plain words

We sell credits, not seats.

One credit covers one short job.

Long jobs use a few credits each.

You can top up at any time.

Unused credits roll over each month.

Read the plans page for current rates.

Who built this

A small team of engineers and lawyers built this.

We ship from Europe and work in the open.

Our founder note spells out why we started.

Where to start

How the parts fit

A browser add-on cleans text inside Chrome.

A Word plug-in handles drafts in Office.

A small desktop tool works on whole folders.

An agent protocol link feeds large models safely.

All four share one core engine and one rule set.

Words from our team

We started this work after a lunch about cookies.

One friend kept getting odd ads on her phone.

We asked why a court file leaked through a draft.

We sketched the first build on a napkin that week.

By month three we had a tiny demo for a friend.

She used it on her first case the next day.

Common questions we hear

Can the tool read scanned PDFs? Yes, with OCR.

Does it work on long files? Yes, in small chunks.

Can I roll my own rule set? Yes, save it as a preset.

Does it run offline? The desktop build runs offline.

Do you keep my files? No, the cloud build wipes after each run.

Will it learn from my work? No, we never train on inputs.

A short tour of the workflow

Upload a file or paste a snippet of prose.

Pick the entities you want gone from the draft.

Choose a method: replace, mask, hash, encrypt, or redact.

Press run and watch the side panel show each hit.

Skim the result and tweak any rule that misfired.

Save the cleaned file or send it to a teammate.