Validate and decode a Brazilian unified lawsuit number — court, segment, year and origin — in your browser.
Since Resolução CNJ 65/2008 every lawsuit in Brazil carries the same number in every court: NNNNNNN-DD.AAAA.J.TR.OOOO. The seven first digits are the sequential number given by the originating unit, DD are two check digits, AAAA is the year the case was filed, J is the branch of the judiciary, TR identifies the court within that branch, and OOOO identifies the unit — a comarca, a federal section, an electoral zone. Twenty digits that say, at a glance, where a case was born and when.
The two check digits use ISO 7064 MOD 97-10, the same scheme behind the IBAN. The number is rearranged with the check digits moved to the end, read as a single 20-digit integer, and divided by 97 — a valid number always leaves remainder 1. Because a 20-digit integer does not fit in a JavaScript number, this tool computes the remainder in chunks, digit by digit, exactly as banking software does. A single mistyped digit or two swapped digits will fail the test, which is what makes the scheme worth having.
Beyond the yes-or-no answer, the tool decodes what the number says. It names the segment (Federal Supreme Court, Superior Court of Justice, federal, labour, electoral, military or state courts), resolves TR into the actual court — TRF4, TRT-2, the State Court of Alagoas — and tells you whether OOOO is a first-instance unit or the court itself. That is useful when you are triaging a spreadsheet of case numbers, cleaning a legacy database, building a court integration, or simply checking a number a client dictated over the phone before you search for it on the tribunal website.
Check digits: take NNNNNNN + AAAA + J + TR + OOOO followed by "00", read it as an integer and compute the remainder of the division by 97. The check digits are 98 minus that remainder, written with two digits. Equivalently, a number is valid when NNNNNNN + AAAA + J + TR + OOOO + DD divided by 97 leaves remainder 1 (ISO 7064 MOD 97-10).
NNNNNNN is the sequential number of the case in its originating unit, DD are the check digits, AAAA is the year it was filed, J is the branch of the judiciary (4 federal, 5 labour, 6 electoral, 8 state, and so on), TR is the court, and OOOO is the judicial unit — 0000 means the number originated at the court itself.
No. Validation is pure arithmetic: it proves the digits are internally consistent, not that a case was ever filed. To confirm a case exists, search it on the website of the court the tool identifies for you.
The most common causes are a missing leading zero in the sequential part, a digit lost while copying from a PDF, or an old pre-2010 number that was never converted to the unified format. The tool shows the check digits it expected, which usually makes the typo obvious.
No. The whole check runs in JavaScript on your device — no request is made, and nothing is logged or stored. You can validate confidential case numbers safely.
Yes. Paste one number per line and every line gets its own report, plus a summary of how many are valid. The result can be copied or downloaded as a text file.
It rewrites each number with the check digits the algorithm expects. It is meant for testing and for spotting typos — it does not turn an invented number into a real lawsuit.
Vai.la turns any URL into a short link with click statistics, QR Code and your own biolink.
Vai.la is not responsible for how the tools are used or for decisions made based on their results.