<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[MyCaseStatus.in]]></title><description><![CDATA[MyCaseStatus.in]]></description><link>https://mycasestatus.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Tue, 27 Oct 2026 18:54:23 GMT</lastBuildDate><atom:link href="https://mycasestatus.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How Indian Court Case Numbers Are Structured, and How to Parse Them]]></title><description><![CDATA[If you have ever built a form that asks users for "case number", you will have seen inputs like CS 245/2023, C.S. No. 245 of 2023, WP 1234/2024, 245-2023…]]></description><link>https://mycasestatus.hashnode.dev/how-indian-court-case-numbers-are-structured-and-how-to-parse-them</link><guid isPermaLink="true">https://mycasestatus.hashnode.dev/how-indian-court-case-numbers-are-structured-and-how-to-parse-them</guid><category><![CDATA[Law]]></category><category><![CDATA[india]]></category><category><![CDATA[webdev]]></category><dc:creator><![CDATA[MyCaseStatus.in]]></dc:creator><pubDate>Mon, 19 Oct 2026 02:11:44 GMT</pubDate><content:encoded><![CDATA[<p>If you have ever built a form that asks users for "case number", you will have seen inputs like <code>CS 245/2023</code>, <code>C.S. No. 245 of 2023</code>, <code>WP 1234/2024</code>, <code>245-2023</code> and sometimes a plain 16-character code. They are not all the same kind of identifier. This post explains how Indian case identifiers are built and how to store and parse them without losing information.</p>
<p><em>General information, not legal advice.</em></p>
<h2>Four identifiers, not one</h2>
<p>A single matter in an Indian court can carry several identifiers at once:</p>
<ol>
<li><strong>Filing number.</strong> In district courts on the eCourts system, a filing number and year are given when the papers are first filed, before scrutiny.</li>
<li><strong>Registration (case) number.</strong> After the registry accepts the filing, the case gets a case type, a number and a year, for example <code>CS 245/2023</code>. This is the number printed on cause lists and order sheets.</li>
<li><strong>CNR number.</strong> A 16-character code that is unique nationally and stays the same for the life of a district court case, even if the case is transferred.</li>
<li><strong>Diary number.</strong> At the Supreme Court, a diary number is assigned on filing, and a registration number follows if and when the matter is registered.</li>
</ol>
<p>A related number, the FIR number, belongs to the police station. It is the station plus a serial number and year, and should never be mixed with any of the above.</p>
<h2>The case number: type, number, year</h2>
<p>The registration number has three parts:</p>
<ul>
<li><strong>Case type.</strong> A short code from the court's own list of case types. Common examples include <code>CS</code> or <code>OS</code> for civil or original suits, <code>WP</code> for writ petitions and <code>CRA</code> or <code>CRL.A</code> for criminal appeals. These lists are local. Each High Court and each district court establishment keeps its own, and the same matter type can be coded differently in different states.</li>
<li><strong>Number.</strong> A serial number, usually restarting each year for that case type in that court.</li>
<li><strong>Year.</strong> The year of registration.</li>
</ul>
<p>The important point for data work is that <strong><code>CS 245/2023</code> is not unique</strong>. Hundreds of courts can have a civil suit 245 of 2023. A case number only identifies a case together with its court, meaning the state, district and court establishment, or the High Court and bench.</p>
<h2>The CNR, briefly</h2>
<p>For district courts, the CNR solves the uniqueness problem. It combines codes for state, district and establishment with a serial number and a year into one 16-character string, for example <code>XXYY01</code> followed by six digits and a four-digit year. If you can get a CNR, use it as the primary key and treat the case number as a display field.</p>
<h2>Normalising user input</h2>
<p>People type case numbers in many ways. A forgiving parser can reduce most variants to a canonical form:</p>
<pre><code class="language-python">import re

PATTERN = re.compile(
    r"""^\s*
        (?P&lt;type&gt;[A-Z][A-Z.()\s]*?)      # case type, e.g. CS, C.S., CRL.A
        \s*(?:NO\.?)?\s*
        (?P&lt;num&gt;\d+)                     # serial number
        \s*(?:/|-|OF)\s*
        (?P&lt;year&gt;\d{4})                  # four-digit year
        \s*$""",
    re.IGNORECASE | re.VERBOSE,
)

def normalise(raw: str):
    m = PATTERN.match(raw.upper())
    if not m:
        return None
    case_type = re.sub(r"[.\s]", "", m["type"])   # "C.S." -&gt; "CS"
    return case_type, int(m["num"]), int(m["year"])

normalise("C.S. No. 245 of 2023")   # ('CS', 245, 2023)
normalise("wp 1234/2024")           # ('WP', 1234, 2024)
</code></pre>
<p>Some practical rules:</p>
<ul>
<li><strong>Strip dots and spaces from the type, but keep a mapping table</strong> per court. <code>CRL.A</code> and <code>CRLA</code> are probably the same type, but <code>CRA</code> might not be, depending on the court.</li>
<li><strong>Store the number as an integer</strong> and pad it with zeros only when displaying.</li>
<li><strong>Require a four-digit year.</strong> Two-digit years such as <code>/23</code> are ambiguous in old records.</li>
<li><strong>Detect CNRs separately.</strong> A 16-character alphanumeric string with no separators is almost certainly a CNR and should skip the case-number parser.</li>
</ul>
<h2>Modelling it in a database</h2>
<p>A workable schema keeps the court and the identifiers separate:</p>
<pre><code class="language-sql">CREATE TABLE cases (
  cnr            CHAR(16) UNIQUE,        -- null for courts without CNR
  court_id       INTEGER NOT NULL,       -- state + district + establishment
  case_type_code VARCHAR(20) NOT NULL,   -- as used by that court
  case_number    INTEGER NOT NULL,
  case_year      SMALLINT NOT NULL,
  filing_number  INTEGER,
  filing_year    SMALLINT,
  UNIQUE (court_id, case_type_code, case_number, case_year)
);
</code></pre>
<p>The composite unique key reflects how courts actually number cases. Keeping the filing number separate means you can still trace a matter before it is registered.</p>
<h2>Where this shows up in practice</h2>
<p>Search tools built on court data have to accept all these forms. <a href="https://mycasestatus.in/search">MyCaseStatus.in's case search</a> lets users look a case up by CNR number, party name or advocate name, which avoids much of the ambiguity in free-typed case numbers. Even so, it is worth confirming important dates against the court's own record.</p>
]]></content:encoded></item></channel></rss>