Social contract theory holds that moral and political rules are justified by an agreement, real or hypothetical, among individuals to form a society and accept certain obligations in exchange for social benefits. Thomas Hobbes offered one of the earliest versions, arguing that in the state of nature life is "solitary, poor, nasty, brutish, and short," so rational individuals consent to surrender some freedoms to a sovereign authority in return for security and order. John Locke's version is more optimistic about natural rights: individuals possess rights to life, liberty, and property, and they consent to government to protect those rights. Locke further argued that when government fails its protective function, people retain a right to revolt. Jean-Jacques Rousseau offered a third influential version in which humans are naturally good but corrupted by society, and the social contract aims to create a community governed by the general will, preserving freedom through collective self-governance.
The most prominent twentieth-century version of social contract theory is John Rawls's A Theory of Justice. Rawls asks us to imagine rational agents choosing principles of justice from behind a veil of ignorance, a thought experiment in which decision-makers are unaware of their own social position, talents, beliefs, or values. Because they could end up as anyone in society, they will choose principles that are fair to all. Rawls derived two principles from this setup: the Equal Liberty Principle, which guarantees each person an equal right to basic liberties, and the Difference Principle, which holds that social and economic inequalities are permissible only if they result in compensating benefits for the least advantaged members of society. The Difference Principle expresses Rawls's commitment to improving the condition of those worst off, even at the cost of some inequality.
Robert Nozick challenged Rawls from a libertarian perspective with his entitlement theory of justice. Nozick argued that a distribution of resources is just if it arises from just acquisitions and voluntary transfers, and he criticized the Difference Principle as a violation of individual liberty and property rights. His Wilt Chamberlain argument shows that any patterned distribution of wealth will inevitably be disrupted by the free choices of individuals, undermining the stability of Rawlsian equality. Communitarian thinkers such as Michael Sandel and Charles Taylor criticized both liberal theories by arguing against the assumption of an unencumbered self detached from communal ties, insisting that moral identity and justice are rooted in community and shared values. Beyond these, more specific conceptions of justice include distributive justice, which concerns the fair allocation of resources, opportunities, and burdens, retributive justice, which holds that wrongdoers deserve punishment proportional to their offense, and restorative justice, which focuses on repairing harm through reconciliation between offenders, victims, and the community.