The result of the mod-97 algorithm (same as IBAN) applied to the full number without the DD. Two digits ensure integrity.
Validate and decode Brazilian court case numbers (CNJ Resolution 65/2008), with mod-97 check-digit verification.
CNJ Resolution 65/2008 established unique numbering for judicial cases in Brazil, in the format NNNNNNN-DD.YYYY.J.TR.OOOO. Each segment has a function: NNNNNNN is the case sequential number at the origin unit, DD is the check digit, YYYY is the filing year, J indicates the justice branch, TR the court, and OOOO the origin unit (courtroom, small claims court, or district). The check digit is calculated with the mod-97 algorithm (ISO 7064 standard, the same used in IBAN), which detects typing errors. This tool re-runs that calculation to validate the DD and decodes each segment, justice branch, court, and origin, for a single number or for many at once in batch mode. It is worth remembering that formal validity is purely mathematical: it does not guarantee that the case exists or is active; for that, consult the court's system or the DataJud API.
Before 2008, each court numbered its cases in its own way, which made it hard to locate and cross-reference data. CNJ Resolution 65/2008 created unique numbering, in the format NNNNNNN-DD.YYYY.J.TR.OOOO, adopted by the entire Brazilian judiciary. Each block has a meaning: 7 sequential digits, 2 check digits, 4 for the filing year, 1 for the justice branch, 2 for the court, and 4 for the origin unit.
The check digit (DD) is what guarantees the number's integrity. It is calculated with mod-97 (ISO 7064 standard, the same used in the banking IBAN): the tool re-runs that calculation on the other fields and confirms whether the provided DD matches. A single swapped digit usually breaks the validation.
The J field identifies the branch of the judiciary: 1 = STF, 2 = CNJ, 3 = STJ, 4 = Federal Justice, 5 = Labor Justice, 6 = Electoral Justice, 7 = Military Justice of the Union, 8 = State and Federal District Justice, 9 = State Military Justice. So a number whose J block is '8' comes from State Justice; with '5', from Labor Justice.
As for the check digit, the calculation is exact: DD = 98 − ((NNNNNNN YYYY J TR OOOO × 100) mod 97). The tool uses this formula to say whether a number is formally valid and, in batch mode, applies the check to many numbers at once, showing the status and court of each.
Validation is purely mathematical: it confirms that the number follows the format and that the check digit matches. That does not mean the case exists, is active, or is being processed at that court. A number can be formally valid and never have been used.
To confirm the existence and status of a case, you must consult the competent court's system or the CNJ's public DataJud API. Old-format numbers (pre-2008) do not follow mod-97 and are therefore flagged as invalid by this tool.
Paste the code into your HTML and the tool shows up on your page, without J-Kit's navigation and ads. It still runs in the browser of whoever visits your site.
<iframe
src="https://jkit.tools/embed/en-US/cnj-case-number-validator"
width="100%"
height="600"
style="border:0"
loading="lazy"
title="CNJ Case Number Validator (Brazil)"
></iframe>These references help contextualize formulas, standards, APIs and limitations used on this page. They do not replace professional validation when a result has legal, financial, medical or operational impact.
The result of the mod-97 algorithm (same as IBAN) applied to the full number without the DD. Two digits ensure integrity.
Informational tool. A formally valid number does not guarantee that the case exists or is active.