nl_bsnIntlIDs

Mock Jutsu HOW-TO | EN

The nl_bsn function within the mock-jutsu library is a specialized tool designed for developers and QA engineers who need to generate realistic Dutch Burgerservicenummer (BSN) values. As a critical component of the IntlIDs category, this function ensures that the generated test data adheres strictly to official Dutch identification standards. In the Netherlands, the BSN is a unique identification number used for taxes, healthcare, and social security. By using mock-jutsu, development teams can produce valid, synthetic identifiers that bypass the significant privacy risks and legal complexities associated with using real citizen data in non-production environments.

Technically, the nl_bsn function produces a nine-digit string that satisfies the "elfproef," which is the Dutch implementation of the MOD-11 weighted check algorithm. This specific validation method uses a descending weight system—starting from 9 down to 2 for the first eight digits, with the final digit weighted at -1—to ensure the integrity of the number. Because this algorithm is built directly into the mock-jutsu engine, every generated nl_bsn is structurally sound. This means the mock data will successfully pass through front-end validation logic or back-end database constraints that require authentic BSN formats, making it indispensable for testing financial systems, government portals, or insurance platforms.

Integrating this function into a modern development workflow is seamless across various environments. For Python developers, a simple call to jutsu.generate('nl_bsn') provides immediate access to high-quality test data within scripts or automated test suites. Command-line users can quickly verify system behavior or generate bulk files using mockjutsu generate nl_bsn, while performance testers can leverage the JMeter syntax ${__mockjutsu(nl_bsn,)} to simulate high-traffic scenarios. This multi-platform support ensures that whether you are writing unit tests, seeding a staging database, or performing stress tests, your data remains consistent and reliable.

Beyond simple generation, the nl_bsn function offers significant benefits regarding data privacy and compliance with international regulations like the GDPR. By utilizing synthetic mock data, organizations can maintain the highest security standards without compromising the quality of their software testing cycles. Developers no longer need to manually create or anonymize sensitive datasets; instead, they can programmatically generate thousands of unique, valid BSNs on demand. This efficiency accelerates the development lifecycle, allowing teams to focus on building robust features rather than managing complex data requirements.

CLI Usage
mockjutsu generate nl_bsnmockjutsu bulk nl_bsn --count 10mockjutsu export nl_bsn --count 10 --format jsonmockjutsu export nl_bsn --count 10 --format csvmockjutsu export nl_bsn --count 10 --format sql# --mask: regulation-compliant output (PCI DSS / GDPR / KVKK)mockjutsu generate nl_bsn --maskmockjutsu bulk nl_bsn --count 5 --mask
Python API
from mockjutsu import jutsujutsu.generate('nl_bsn')jutsu.bulk('nl_bsn', count=10)jutsu.template(['nl_bsn'], count=5)# mask=True: regulation-compliant outputjutsu.generate('nl_bsn', mask=True)jutsu.bulk('nl_bsn', count=5, mask=True)
JMeter
${__mockjutsu_intl_ids(nl_bsn)}# JMeter Function: __mockjutsu_intl_ids# Parameter 1: nl_bsn# Parameter 2: (not required for this function)# Add 'mask' keyword to get a regulation-compliant masked value${__mockjutsu_intl_ids(nl_bsn,mask)}
REST API
GET /generate/nl_bsn# → {"type":"nl_bsn","result":"...","status":"ok"}GET /bulk/nl_bsn?count=10POST /template {"types":["nl_bsn"],"count":1}# mask=true: regulation-compliant outputGET /generate/nl_bsn?mask=trueGET /bulk/nl_bsn?count=5&mask=true

Parameters

Parameter Values Description
--mask true | false Return a regulation-compliant masked value (PCI DSS, GDPR, KVKK…)

Other Languages