RENAVAM Validator
Validate Brazilian RENAVAM vehicle registration numbers using the official DENATRAN algorithm. No data sent to servers.
How does RENAVAM validation work?
A RENAVAM has 11 digits. The last one is the check digit, derived from the first 10 with the weights [3,2,9,8,7,6,5,4,3,2] and modulo 11. When the remainder comes out below 2, the digit is 0; otherwise it is 11 minus the remainder.
All of the checking happens right in your browser.
RENAVAM validation: what the check digit really proves
The RENAVAM (Registro Nacional de Veiculos Automotores) is the federal vehicle identifier maintained by SENATRAN (former DENATRAN). Validating a RENAVAM number client-side is a syntactic check: it confirms the code is well-formed and that its last digit matches the modulo 11 check rule. It does not prove the vehicle exists, that the holder owns it, or that the CRLV is current. Those facts require a query to the relevant state DETRAN or the federal SENATRAN integration.
This page focuses on validation: algorithm, regex patterns, form integration, libraries and edge cases. For generating a synthetic RENAVAM for tests, use the companion generator tool.
The modulo 11 check digit algorithm
A current RENAVAM has 11 decimal digits. The first 10 carry the registration sequence, the 11th is the check digit (DV). The algorithm is:
- Take the first 10 digits and multiply them, in order, by weights 3, 2, 9, 8, 7, 6, 5, 4, 3, 2.
- Sum the products.
- Compute
sum mod 11. - Subtract from 11:
dv = 11 - (sum % 11). - If the result is 10 or 11, force
dv = 0.
function validateRENAVAM(raw) {
const digits = String(raw).replace(/\D/g, '').padStart(11, '0');
if (digits.length !== 11 || /^(\d)\1+$/.test(digits)) return false;
const weights = [3, 2, 9, 8, 7, 6, 5, 4, 3, 2];
const sum = weights.reduce((acc, w, i) => acc + Number(digits[i]) * w, 0);
let dv = 11 - (sum % 11);
if (dv >= 10) dv = 0;
return dv === Number(digits[10]);
}
9-digit legacy RENAVAM and zero-padding
Older SENATRAN systems stored RENAVAM in a 9-digit form. Modern integrations expect 11 digits and the standard fix is to left-pad with zeros until it reaches 11 (renavam.padStart(11, '0')). Many CRV/CRLV documents printed before 2010 show 9 digits; databases imported from those years must be migrated before being fed to the validator. Mixing 9-digit and 11-digit storage in the same column is a frequent source of false negatives.
Pre-validation regex and form masks
Use a defensive regex before running the math:
// Accept 9 to 11 digits, strip separators
const RENAVAM_RE = /^\d{9,11}$/;
const clean = input.replace(/\D/g, '');
if (!RENAVAM_RE.test(clean)) return 'malformed';
The on-screen mask is usually a plain numeric field maxlength="11". Avoid grouping separators in the UI — there is no canonical visual mask for RENAVAM, unlike the CPF XXX.XXX.XXX-XX pattern.
JavaScript and Python libraries
- brazilian-values (npm):
isRenavam(value)returns boolean. - brazilian-utils (npm):
renavam.isValid()plus a formatter. - validation-br (npm):
isRENAVAM()andfakeRENAVAM(). - validate-docbr (PyPI):
RENAVAM().validate(num). - brazilnum (R / Python): legacy support.
React Hook Form, Zod and Yup integration
// Zod schema with custom RENAVAM refine
const schema = z.object({
renavam: z.string()
.transform(s => s.replace(/\D/g, '').padStart(11, '0'))
.refine(validateRENAVAM, { message: 'Invalid RENAVAM' })
});
In Yup: yup.string().test('renavam', 'Invalid', validateRENAVAM). In server-side NestJS or Express, run the same function in a class-validator @Validate decorator to keep parity between client and server.
Where RENAVAM appears in real systems
- Ride-hailing and delivery: Uber, 99, iFood Entrega and Loggi require RENAVAM during driver onboarding.
- Auto insurance: Porto Seguro, Bradesco Auto and Azul Seguros expose RENAVAM in their quote APIs.
- Vehicle auctions: portals such as Copart Brasil and VehicleAuction use RENAVAM in lot metadata.
- Fleet rental: Movida, Localiza and Unidas keep RENAVAM in fleet ERP for IPVA and licensing batches.
- NF-e of vehicles: when issuing a fiscal invoice for a vehicle, RENAVAM goes inside
<infAdic>or theveicProdgroup. - Used-car history: services like Hagen and Olho no Carro use RENAVAM as the primary key for fines, recalls and ownership history.
SENATRAN API and DETRAN integrations
A public, free RENAVAM lookup endpoint does not exist. SENATRAN exposes restricted APIs through gov.br only to accredited entities (insurers, banks with auto-loan portfolios, large fleet operators). State DETRANs (SP, RJ, MG, RS, PR) expose limited consumer-facing queries that require captcha and, in some states, a CPF tied to the holder. Building a national lookup product means contracting an authorized data bureau such as Serasa Veiculos, Quod, Boa Vista or Hagen.
Anti-fraud: triple-check with chassis (VIN) and Mercosul plate
A single RENAVAM is easy to forge in a printed PDF. Robust onboarding flows combine three fields:
- RENAVAM validated by modulo 11.
- Chassis (VIN) 17-character ISO 3779 with its own check digit at position 9.
- Mercosul plate
ABC1D23or legacyABC-1234regex.
If two of the three fields fail to cross-reference in the same DETRAN response, the registration is rejected. This pattern is now standard in Uber, 99 and most digital insurance underwriters.
Where to find the RENAVAM on the physical CRV/CRLV
On the old paper CRV, the RENAVAM appears in the green stripe at the top, just under the document title. On the new CRLV-e digital (issued through the gov.br app since 2021), it is the first field after vehicle plate. On the Mercosul plate documents, RENAVAM is also encoded in the QR Code printed on the upper-right corner, so a mobile scanner can read and validate it in one tap.
FAQ
Is RENAVAM 9 or 11 digits? Officially 11 today. The 9-digit form is legacy and must be left-padded with zeros to reach 11 before validation.
Can I look up a RENAVAM for free online? Not officially. State DETRANs offer partial queries behind captcha, and gov.br shows the data only to the registered owner after login.
Is there an official RENAVAM API? Yes, but it is restricted. SENATRAN delegates to accredited bureaus; there is no open public endpoint comparable to ViaCEP for postal codes.
Why does my valid number fail the check? Common causes: pasting with leading spaces or letters, comparing as number (losing leading zeros), or mixing 9-digit legacy values without zero-padding.
Does RENAVAM change when the vehicle is sold? No. RENAVAM is bound to the vehicle for its entire life cycle, just like a VIN. Only ownership records change.
Related Tools
CPF Validator
Validate Brazilian CPF numbers instantly using the official algorithm. Useful for testing document validation in applications. No data sent to servers.
Batch CPF Validator
Validate a list of CPFs (one per line) and see which are valid and which are not. No data sent to servers.
Batch CNPJ Validator
Validate a list of CNPJs (one per line) with a summary of valid, invalid and total. No data sent to servers.
RENAVAM number validator
The RENAVAM carries a check digit calculated by the DENATRAN algorithm. Verifying it keeps a mistyped number from slipping into a vehicle registration. Here the official calculation is rerun, and the result shows up right after, telling you whether the number is valid.
It comes in handy when validating an insurance form, checking a fleet spreadsheet or verifying a registration before you proceed. The check confirms the number's mathematical consistency and catches the most common typos, without relying on any external system.
It all runs in the browser, with no data sent to servers. Free, private and good for checking RENAVAMs safely.