it_codicefiscaleIntlIDs

Mock Jutsu HOW-TO | EN

The it_codicefiscale function is a specialized utility within the mock-jutsu library designed to generate realistic Italian tax codes, known as Codice Fiscale. For developers building applications that cater to the Italian market, having high-quality test data is essential for verifying user registration flows, financial systems, and government-related integrations. This function generates a 16-character alphanumeric string that mimics the exact structure of an authentic Italian identifier, ensuring that your test environment remains robust and representative of real-world scenarios without the need for sensitive personal information.

Accuracy is paramount when generating mock data for international identifiers. The it_codicefiscale generator strictly adheres to the official Italian standards, incorporating the complex logic required for the 16-character format. This includes the specific sequence of letters and numbers representing a person's surname, name, birth date, gender, and place of birth. Most importantly, the function implements the official MOD-26 check digit algorithm for the final character. This ensures that any generated code passes through standard validation scripts and checksum filters, allowing QA engineers to test data integrity without triggering false positives during automated testing cycles.

Integrating it_codicefiscale into your workflow is seamless regardless of your tech stack. Developers can leverage the Python API with the command jutsu.generate('it_codicefiscale') for unit tests, while DevOps engineers can utilize the CLI command mockjutsu generate it_codicefiscale for quick data seeding in shell scripts. For performance testers, mock-jutsu provides a dedicated JMeter function, ${__mockjutsu(it_codicefiscale,)}, making it easy to populate load tests with valid identifiers. This versatility ensures that the same high-quality test data is available across the entire software development lifecycle, from initial coding to final stress testing.

Beyond simple data generation, using mock-jutsu for Italian tax codes offers significant benefits in terms of privacy and compliance. By using synthetically generated test data rather than real user information, organizations can maintain strict GDPR compliance during the development process. Testing scenarios such as database indexing, UI field masking, and backend validation logic become much more efficient when using the it_codicefiscale function. Whether you are building a localized web application or a large-scale enterprise system, this tool provides the precision and reliability needed to ensure your software handles Italian identity data flawlessly.

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

Parameters

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

Other Languages