# SIN number scanner: find Social Insurance Numbers in files

> How a scanner finds Social Insurance Numbers: nine digits, a checksum and nearby keywords. Where SINs hide in email and files, and what PIPEDA says about them.

Page: https://vellumsoft.net/detect/sin  
Updated: 2026-10-28  
Publisher: VellumSoft (Titan Grand Ventures LLC)

A SIN scanner finds Social Insurance Numbers by shape and check digit. Microsoft's definition uses nine digits with optional hyphens or spaces, a passing checksum and, for high confidence, a SIN keyword or a word such as "date of birth" nearby [4]. VellumSoft's Canadian identifiers include the SIN, validated with the Luhn check. Private businesses generally need a SIN only for income reporting [1], so a copy outside payroll and tax records needs a reason to be kept.

## What a SIN looks like to a scanner

A SIN has a structure that tools can test. Microsoft's data loss prevention catalogue describes it as "nine digits with optional hyphens or spaces" and lists a checksum as part of the definition [4]. Its high-confidence rule needs the number, a passing checksum and, within 300 characters, either a SIN keyword or a supporting word such as "date of birth" [4].

Plenty of nine-digit strings sit in ordinary files (invoice numbers, phone numbers without punctuation, account references), and a check digit test is one way a tool tells them apart from a SIN. VellumSoft validates SINs with the Luhn check, meaning a number has to pass that check digit test before it counts as a SIN.

![VellumSoft detector catalog listing enabled and disabled detectors](https://vellumsoft.net/assets/screens/detector-catalog.webp)

The VellumSoft detector catalog in 2.0.2 has 54 detectors enabled and 12 disabled, and disabled detectors stay visible with their reason. Health card numbers are detected alongside the SIN, as set out on the page about [health card numbers by province](https://vellumsoft.net/detect/health-card-numbers). Planned detector pages cover US Social Security numbers ([Social Security numbers](https://vellumsoft.net/detect/ssn)), Ontario OHIP numbers ([Ontario OHIP](https://vellumsoft.net/detect/health-card-numbers/ontario-ohip)) and Quebec RAMQ numbers ([Quebec RAMQ](https://vellumsoft.net/detect/health-card-numbers/quebec-ramq)), under the detector index ([detector list](https://vellumsoft.net/detect/)).

## Finding Social Insurance Numbers in email

SINs rarely sit only in the payroll system. They turn up in emails from new hires who sent a photo of their SIN letter, in scanned direct deposit and tax forms, in exports from old HR software, and in mailbox archives kept after an employee leaves. These copies sit outside the payroll system's access controls, so they are easy to forget.

VellumSoft reads Outlook PST, OST and MSG files with their attachments, scans each attachment as its own file type, and labels each email finding with its folder and sender, its date and subject, and the attachment name. Version 2.0.2 does not read Word (DOCX), Excel (XLSX), ZIP or 7z files, so a SIN inside one of those, even as an email attachment, is not found. A photo of a SIN letter depends on OCR, which is less reliable on low-resolution or skewed images.

Scanning an old mailbox export before it moves is covered in the page on [PST files before a Microsoft 365 import](https://vellumsoft.net/use-cases/pst-migration-microsoft-365).

## Who is required to collect a SIN

The Office of the Privacy Commissioner of Canada (OPC) lists the legal reasons. Employers are authorized to collect SINs from employees for records of employment and T-4 slips for income tax and Canada Pension Plan purposes [1]. Banks, credit unions, brokers and trust companies must ask for customers' SINs under the Income Tax Act for tax reporting, for example on interest-earning accounts and RRSPs [1].

Outside those purposes, the OPC is direct: "No private-sector organization is legally authorized to request customers' SINs for purposes other than income reporting" [1]. Even a bank has no legal requirement to collect a SIN for an account that does not earn interest, such as a credit account [1]. Provincial law can add cases; the OPC notes that Hydro Québec is required by provincial law to collect a SIN for opening new accounts [2]. Service Canada, the federal department that administers the SIN, publishes a list of its most common uses [2].

## Asking for a SIN as identification

Asking is not illegal. The OPC says "there is no law prohibiting an organization from asking for a customer's SIN" for purposes other than income reporting, and that a customer may choose to supply it, as long as PIPEDA's principles are followed [1].

The conditions are strict. Identification alone is not a legitimate basis for requiring a SIN, so a business asking for it as ID "must not in any way suggest" that it is required to get a product or service [1]. PIPEDA's clause 4.3.3 says an organization "shall not, as a condition of the supply of a product or service, require an individual to consent" to collection beyond what the stated purpose needs [1]. A lender running a credit check may ask for a SIN as one identification option among several, but should not make it a condition of credit [1].

The OPC's advice to individuals reads the same way from the other side: "You can't be denied a product or service for refusing to provide your SIN when it's not legally required" [2]. It also says "Your SIN is not a piece of identification" [2].

## What PIPEDA requires when a SIN is collected

A SIN is the personal information of the person it is assigned to, so wherever PIPEDA applies, all its relevant provisions cover the SIN [1]. The map of [Canadian privacy laws](https://vellumsoft.net/canada/) shows where a provincial act applies instead. The OPC's best practices turn two principles into specific steps [1]:

- Say why. An organization must tell the person why it wants the SIN, and the OPC says it should do so at the time of collection, stating whether it is for income reporting (and that the law requires it) or for identification (and that giving it is optional).
- Ask again for a new use. A SIN collected only for income reporting cannot later be used to identify someone without first specifying that purpose and getting express consent.
- Allow withdrawal. Where a SIN is used for identification, there must be a convenient way to withdraw consent, and the OPC recommends a toll-free telephone number [1].

## Keeping and disposing of SINs

PIPEDA's retention and safeguard clauses apply to SINs like any other personal information. Personal information that is no longer required for its purposes "should be destroyed, erased, or made anonymous", and an organization may be subject to legal retention periods that come first [3]. Clause 4.7.5 adds that care must be used in disposal "to prevent unauthorized parties from gaining access to the information" [3].

The OPC's tips for individuals show the risk: store documents containing a SIN in a safe place, and shred them rather than recycle them [2]. A business holding years of onboarding packets, payroll exports and scanned forms has the same problem at a larger scale.

## Why a leaked SIN matters

The OPC describes the SIN as able to "open the door to your personal information" and to put people "at risk of fraud and identity theft" [2]. Combined with other personal information, someone may use a SIN to rent vehicles, equipment or accommodation in another person's name [2].

For a business, that is what makes SINs part of the sensitivity assessment after a breach. The guide to [PIPEDA breach reporting](https://vellumsoft.net/canada/pipeda/breach-reporting) explains the real risk of significant harm test, where the sensitivity of the information is one of the named factors.

## A short checklist for a business

- List every form and process that asks for a SIN, and the reason for each. In most cases only income reporting makes it mandatory [1].
- Where a SIN is requested as identification, label it optional on the form and offer other identification [1].
- Do not use a SIN as a customer or employee number; using it for a purpose not identified at collection needs express consent [1].
- Find the copies kept outside the systems that need them, and destroy those no longer required, subject to any legal retention period [3].
- Treat a SIN in an exposed file as sensitive when assessing a breach [2].

## Limits of any SIN scan

A scan is not a guarantee that every instance in a data set will be found. A SIN typed with unusual separators, split across two lines or written by hand on a scanned form can be missed, and a nine-digit number that passes the checksum by chance can be flagged.

A SIN that was collected only because a form asked for it, and kept only because nobody deleted it, is the easiest one to remove.

This page explains the law in general terms and is not legal advice.

## Questions

### Can an employer ask for an employee's SIN?

Yes. The federal privacy regulator says employers are authorized to collect SINs from employees to provide records of employment and T-4 slips for income tax and Canada Pension Plan purposes.

### Can a landlord or a store ask for my SIN?

No law stops them asking, but there is no obligation to give it when it is not legally required. The regulator says a person cannot be denied a product or service for refusing to provide a SIN that is not legally required, unless the business can show that no other identifier would do, and recommends offering other identification instead.

### Can a bank use a SIN collected for tax reporting to identify me?

Only with consent to that extra purpose. The OPC's best practices say an organization that collected a SIN for income reporting should clearly specify any identification purpose and say that use is optional. If it did not say so at collection, it must ask for express consent before using the SIN to identify you.

### How does software tell a SIN from any other nine-digit number?

Mostly by the check digit and the words around it. Microsoft's data loss prevention definition describes a SIN as nine digits with optional hyphens or spaces, requires a passing checksum, and looks within 300 characters for a SIN keyword or a supporting word such as 'date of birth'.

## Sources

1. [Office of the Privacy Commissioner of Canada, Best Practices for the use of Social Insurance Numbers in the private sector](https://www.priv.gc.ca/en/privacy-topics/sins-and-drivers-licences/social-insurance-numbers/02_05_d_21/)
2. [Office of the Privacy Commissioner of Canada, Protecting your Social Insurance Number](https://www.priv.gc.ca/en/privacy-topics/sins-and-drivers-licences/social-insurance-numbers/protecting-your-social-insurance-number/)
3. [Justice Laws Website, Personal Information Protection and Electronic Documents Act, full text](https://laws-lois.justice.gc.ca/eng/acts/P-8.6/FullText.html)
4. [Microsoft Learn, Canada social insurance number entity definition](https://learn.microsoft.com/en-us/purview/sit-defn-canada-social-insurance-number)
