The UpTools CNH generator creates valid registration numbers for the Carteira Nacional de Habilitação (CNH), the Brazilian driver’s license, for software testing. Choose how many you want, from 1 to 20, and copy them one by one or all at once. Each number has 11 digits, with the check digits calculated correctly.
The tool generates only the number. It does not create a name, photo, license category, expiry date or document image, and the numbers are fictitious, intended exclusively for development, testing and learning.
What is the CNH registration number?
The CNH is the document that authorizes a person to drive in Brazil. Each driver has an 11-digit registration number, shown in the “Nº registro” field of the license. This is the number that systems used by car rental companies, insurers, driving schools, ride-hailing apps and fleet operators usually ask for during sign-up.
How the check digits are calculated
The first 9 digits form the base, and the last 2 are check digits calculated from it, based on the remainder of a division by 11:
- First digit: multiply the 9 base digits by the weights 9, 8, 7, 6, 5, 4, 3, 2 and 1, add up the results and divide by 11. The remainder is the check digit; if the remainder is 10, 0 is used.
- Second digit: multiply the same 9 digits by the weights 1, 2, 3, 4, 5, 6, 7, 8 and 9, add them up and divide by 11. Again, the remainder is the digit, and 10 becomes 0.
Example with the base 615983274: the first sum is 6×9 + 1×8 + 5×7 + 9×6 + 8×5 + 3×4 + 2×3 + 7×2 + 4×1 = 227, and the remainder of 227 ÷ 11 is 7. The second sum is 6×1 + 1×2 + 5×3 + 9×4 + 8×5 + 3×6 + 2×7 + 7×8 + 4×9 = 223, with a remainder of 3. The complete number is 61598327473.
The generator also discards bases where all digits are the same, such as 111111111, which validators usually reject.
How to use the CNH generator
- Enter the Quantity of numbers, from 1 to 20.
- Click Generate CNH.
- Copy a single number with the button next to it, or use Copy all to take the whole list.
What it is for
- Testing forms and validation rules for CNH fields;
- Simulating sign-ups in systems for car rental companies, insurers, driving schools and fleet management;
- Creating test data sets for automated tests and APIs;
- Teaching document validation in programming courses.
To complete a test record, pair the number with a CPF (Brazil’s individual taxpayer number) from the CPF generator. If the system also serves companies, use the CNPJ generator, and for payment flows, the credit card generator.
Is it legal to use a CNH generator?
Yes, when the goal is to test software or to study. The numbers are fictitious, were not issued by any Detran (the state traffic departments that issue licenses in Brazil) and do not authorize anyone to drive. Using a generated number to pose as a licensed driver, forge documents or deceive companies or authorities is a crime.
Some good practices:
- use the numbers only in development and staging environments;
- never submit the generated data to official or production systems;
- label the test data as fictitious so that no one on the team mistakes it for real data.
Frequently asked questions
Is the generated CNH real?
No. The number is valid only in format, because it passes the check-digit verification, but it was not issued to any person. Because it is drawn at random, it may match an existing registration by chance, which is why it should be used only for testing.
Does the generator create an image of the driver’s license?
No. The tool generates only the registration number. It does not generate a document, photo or any other personal data.
Does the CNH number have punctuation?
No. The registration number is usually entered as 11 consecutive digits, without dots or dashes, and that is how the generator delivers it.
How can I tell whether a CNH really exists?
The check-digit calculation only confirms the structure of the number. Whether a license exists and its status can only be verified in the official traffic systems.