Skip to main content
TrackJud TrackJud

Free tool

CNJ number decoder

Paste a standardized Brazilian CNJ process number and see what each part means. The parser runs in your browser — nothing is sent to any server.

How a CNJ number is built

The CNJ number is the standardized unique identifier issued by Brazil's National Council of Justice (CNJ) for every lawsuit in the country. It has 20 digits distributed across 6 fields:

NNNNNNN-DD.AAAA.J.TR.OOOO

- NNNNNNN (7 digits) — sequential case number within the issuing authority - DD (2 digits) — check digits computed via mod-97 - AAAA (4 digits) — year of filing - J (1 digit) — justice segment (1=STF, 3=STJ, 4=Federal, 5=Labor, 6=Electoral, 7=Federal Military, 8=State, 9=State Military) - TR (2 digits) — tribunal code within the segment (e.g., 26 = TJSP) - OOOO (4 digits) — origin unit (court section, district, chamber)

This decoder validates the check digits with the official mod-97 algorithm (CNJ Resolution 65/2008) and identifies the tribunal, segment, state, and region for the vast majority of active processes.

Frequently asked questions

How do I read a CNJ number (NNNNNNN-DD.AAAA.J.TR.OOOO)?

Left to right: first 7 digits are the sequential number within the tribunal for the year; DD are 2 check digits (mod-97); AAAA is the distribution year; J is the justice segment (1 digit, 1-9); TR is the tribunal code (2 digits); OOOO is the origin unit (court/comarca, 4 digits). Total 20 digits.

What does each justice segment code (J) mean?

The codes are: 1 = STF (Supreme Court), 2 = CNJ (Judicial Council), 3 = STJ (Superior Justice Court), 4 = Federal Justice, 5 = Labor Justice, 6 = Electoral Justice, 7 = Federal Military Justice, 8 = State and Federal District Justice, 9 = State Military Justice. This decoder identifies the segment and shows the full name.

How do I know which state court a process is from?

When the segment is 8 (State Justice), the 2 TR digits identify the state: 26 = TJSP, 19 = TJRJ, 13 = TJMG, 24 = TJRS, etc. The decoder lists all codes and shows the corresponding state. Useful for query routing — each state court has its own portal.

Are the check digits mandatory?

Yes. CNJ Resolution 65/2008 requires the standard across all Brazilian tribunals. Numbers with wrong CDs are rejected by official systems. This decoder validates the CD with the mod-97 algorithm (ISO 7064) — if it fails, the number was mistyped or is not a valid CNJ.

Can I look up process details after decoding?

Yes — once decoded, you know the tribunal and segment. Vigilant queries 12 Brazilian court sources (TJSP, TJMG, TJBA, TJCE, TJPE, TJDFT, TJMA, TJAL, TJAP, TJAC, TJAM, TRF1/3) via a single API. Paste the decoded CNJ number and receive parties, movements, and subjects in structured form within seconds.

Learn more

Related tools

Decoded it — now what?

Vigilant lets you search, monitor, and extract structured data from this process — parties, movements, subjects — via API or dashboard.

See process details with Vigilant