Free online tool

CNH Generator and Validator

Generate, validate, and export fictional Brazilian driver license registration numbers for testing.

Generate CNH

Create valid fictional data for software testing.

Generated result

Validate CNH

Check format and check digits without querying official records.

The number is generated locally in your browser and is not checked against official databases.

Prefer Portuguese? Use o gerador de CNH em português.

How to generate and validate a CNH number

Generate 1 to 50 fictional registration numbers, copy the batch, or export JSON and CSV. Enter any eleven-digit test value in the validator to compare its provided and calculated check digits locally.

What is a fictional CNH used for?

Fictional numbers help test forms, validators, APIs, imports, and staging environments without using real personal data.

A structurally valid number does not prove that a driver license exists and must not be used for real registrations or impersonation.

Check-digit example

The registration number has nine base digits and two check digits. Base 802558383 produces 30, resulting in 80255838330, using two weight sequences and the applicable modulo-11 adjustment.

CNH registration number format

The generated CNH contains 11 continuous digits without dots or hyphens. This is suitable for testing fields that expect only the registration number.

Official reference and related test tools

Brazilian rules describe the national registration as nine characters and two check digits. See the government description of CNH production and issuance. Related test tools include the CPF Generator and CNPJ Generator.

Frequently asked questions

Does a generated CNH belong to a real person?

Not necessarily. The tool locally creates a fictional number with valid check digits and does not query official databases.

Can I use a generated CNH for testing?

Yes. It is intended for testing fields, validators, APIs, and staging environments.

Does a CNH registration number use punctuation?

No. The registration number is displayed as a continuous sequence of 11 digits.

Can I generate a CNH test batch?

Yes. Generate up to 50 registration numbers and copy or download the batch as JSON and CSV.

How the tool works

Generate one or up to fifty fictional CNH registration numbers with check digits calculated from each nine-digit base. Copy or export the batch as JSON and CSV, and validate an existing test value by recalculating its two final digits.

Supported input and output

The registration number is represented as eleven continuous digits without dots or hyphens. Its two final positions use weighted modulo-11 rules, including the adjustment required by the first calculation.

Practical example

Base 802558383 produces check digits 30 and the complete test value 80255838330. Use generated values to test required length, numeric-only fields, database constraints, imports, and automated scenarios.

Common use cases

A fictional CNH number is appropriate for development and quality-assurance environments that need structurally plausible data. It also helps demonstrate masks and error handling in forms.

Limits and important checks

A valid check-digit sequence does not prove that a driver license exists or is active. The generator performs no official lookup and must not be used for real registration, identity claims, fraud, or impersonation.

Privacy and local processing

Unless the tool explicitly identifies an external lookup, input and generated output are processed in your browser and are not uploaded to CosmoTools. Avoid placing secrets in any web page and review downloaded results before using them in production.