The paper examines the relationship between law and rationality from multiple perspectives. As early as the Middle Ages, the canonist Gratian attempted to reconcile conflicting legal provisions using rational criteria in his monumental work. The humanist legal theorist Hugo Grotius referred to the ancient codifications of Roman law issued by Emperor Justinian as “written reason.” Grotius also identified “the dictate of right reason” within natural law. Civil law codifications of the 19th and 20th centuries, beginning with the Napoleonic Code, drew upon both Roman and natural law, aspiring once again to perfect rationality. The Catholic Church joined this endeavor by organizing canonical material into the first Code of Canon Law, promulgated in 1917. The ecclesiastical legislator further adopted Justinian’s division of matters into persons, things, and actions. The current Code of Canon Law also operates with rationality, exemplified by its requirement that a custom must be “reasonable.” What contravenes natural law is deemed irrational, for example the ecclesiastical legislator establishes the impediment of consanguinity as a norm of natural divine law. As an example of irrational law, the article highlights the Slovak legislator’s requirement that a petition for the recognition of a new church or religious society by the state must be accompanied by more than 50,000 signatures. It is evident that no unregistered religious society could meet this requirement, nor could the majority of churches already recognized by the state.