The Categorical Imperative takes several formulations. The first: "Act only according to that maxim whereby you can at the same time will that it should become a universal law." This tests actions by asking whether their underlying principle could be consistently universalized.
The second formulation emphasizes human dignity: "Act in such a way that you treat humanity, whether in your own person or in the person of any other, never merely as a means to an end, but always at the same time as an end." This prohibits using people as mere instruments.
Unlike consequentialist ethics that judge actions by outcomes, Kantian ethics evaluates the will and the principle behind actions. A morally good action is one performed from duty, according to a principle that respects the rational autonomy of all persons.
This framework profoundly influenced modern concepts of human rights, dignity, and the rule of law.
Source
Groundwork of the Metaphysics of Morals - Immanuel Kant