The fundamental principle of morality in Kantian ethics is the categorical imperative, which is: Act only according to that maxim by which you can at the same time will that it should become a universal law. Kant explained the categorical principle by means of the moral and nonmoral uses of the word ought. Used in the nonmoral sense, ought issues in what Kant called hypothetical imperatives that take the form “if you want x, then do y.” Kant believed that ought used in the moral sense involves categorical imperatives of the form “Do y,” without any reference to empirical conditions, such as desires. How do we identify these imperatives? According to Kant, these are rules (or maxims) that a rational person could will everyone to follow, and acts that follow these rules are right. Immoral acts, by contrast, follow rules that, if followed by everyone, would be self-defeating in some way. Kant has been called a "closet utilitarian;" however, he does not appeal to the undesirable consequences of a bad maxim but rather to the sheer impossibility of its being followed by everyone.
Many ethicists who reject Kant's categorical imperatives still agree that all moral judgments must be universalizable. Universalizability can be expressed in two ways. First, we have to say that an action that is right for one person must be right for all other similar persons in similar circumstances. This counters a natural temptation to make exceptions for ourselves or to apply double standards. Second, the principle is the basis of the common question, "What if everyone did that?" This question refers to hypothetical rather than actual consequences and suggests that if not everyone could perform some act, then that act is wrong. Universalizability is incapable of refuting fanatics, such as a Nazi who wishes everyone to persecute Jews even if it should be proved that he is a Jew himself.
The second formulation of the categorical imperative is: Act so that you treat humanity, whether in your own person or in that of another, always as an end and never as a means only. This principle is often expressed as a duty to respect persons. Virtually all ethical systems involve a respect for persons, but the Kantian argument for this duty is distinctive. Reason, in Kant's view, enables human beings to act freely, to have autonomy, and so to respect other people is to respect their capacity for reason or their autonomy. The principle of respect for persons does not lend itself to a precise method for decision making. For example, respect for employees would entail a high degree of job security, but the principle does not tell us how to manage the inevitable trade-offs with such factors as decreased efficiency. The principle of respect for persons might seem to be superior to utilitarianism in cases where utilitarians are willing to sacrifice the interests of a few in order to increase the welfare of many, but in other cases increased welfare might take precedence over respect for persons. For example, utilitarianism would generally support paternalistic legislation to protect worker health and safety, whereas the principle of respect for persons would generally allow workers to decide whether they want to be protected. Arguably, workers ought to be protected by law rather than given a choice.