At the time of Hillel, an elder contemporary of Jesus of Nazareth, the negative form of the golden rule already must have been proverbial, perhaps because of Tobit 4:15. When asked to sum up the entire Torah concisely, he answered:
"That which is hateful to you, do not do to your fellow. That is the whole Torah; the rest is the explanation; go and learn."
—Talmud, Shabbat 31a

https://en.wikipedia.org/wiki/Golden_Rule
…
As a concept, the Golden Rule has a history that long predates the term "Golden Rule", or "Golden law", as it was called from the1670s in England and Europe.[1][6] As a concept of "the ethic of reciprocity," it has its roots in a wide range of world cultures, and is a standard way that different cultures use to resolve conflicts.[1][5] It has a long history, and a great number of prominent religious figures and philosophers have restated its reciprocal, "two-way" nature in various ways (not limited to the above forms).[1]
Rushworth Kidder notes that the Golden Rule can be found in the early contributions of Confucianism (551–479 BC). Kidder notes that this concept's framework appears prominently in many religions, including "Hinduism, Buddhism, Taoism, Zoroastrianism, and the rest of the world's major religions".[7] According to Greg M. Epstein, " 'do unto others' ... is a concept that essentially no religion misses entirely."[8] Simon Blackburn also states that the Golden Rule can be "found in some form in almost every ethical tradition".[9] All versions and forms of the proverbial Golden Rule have one aspect in common: they all demand that people treat others in a manner in which they themselves would like to be treated.
…
Antiquity[edit]
Ancient Babylon[edit]
The Code of Hammurabi (1780 BC)[10] dealt with the reciprocity of the Lex talionis in ways such as limiting retribution, as they did concepts of retribution (literally "an eye for an eye, a tooth for a tooth").
Ancient China[edit]
The Golden Rule existed among all the major philosophical schools of Ancient China: Mohism, Taoism, and Confucianism. Examples of the concept include:
	•	"Zi Gong asked, saying, "Is there one word that may serve as a rule of practice for all one's life?" The Master said, "Is not reciprocity such a word?" – Confucius[11][12]
	•	"Never impose on others what you would not choose for yourself." – Confucius[13]
	•	"If people regarded other people's families in the same way that they regard their own, who then would incite their own family to attack that of another? For one would do for others as one would do for oneself." – Mozi
	•	"The sage has no interest of his own, but takes the  interests of the people as his own. He is kind to the kind; he is also kind to the unkind: for Virtue is kind. He is faithful to the faithful; he is also faithful to the unfaithful: for Virtue is faithful." – Laozi[14]
	•	"Regard your neighbor's gain as your own gain, and your neighbor's loss as your own loss." – Laozi[15]
Ancient Egypt[edit]
An early example of the Golden Rule that reflects theAncient Egyptian concept of Maat appears in the story of The Eloquent Peasant, which dates to the Middle Kingdom (c. 2040–1650 BC): "Now this is the command: Do to the doer to cause that he do thus to you."[16] An example from a Late Period (c. 664 BC – 323 BC) papyrus: "That which you hate to be done to you, do not do to another.”[17]
Ancient Greece[edit]
The Golden Rule in its prohibitive form was a common principle in ancient Greek philosophy. Examples of the general concept include:
	•	"Avoid doing what you would blame others for doing." – Thales[18] (c. 624 BC – c. 546 BC)
	•	"What you do not want to happen to you, do not do it yourself either. " – Sextus the Pythagorean.[19] The oldest extant reference to Sextus is by Origen in the third century of the common era.[20]
	•	"Do not do to others that which angers you when they do it to you." – Isocrates[21](436–338 BC)
	•	"It is impossible to live a pleasant life without living wisely and well and justly (agreeing 'neither to harm nor be harmed'),[22] and it is impossible to live wisely and well and justly without living a pleasant life." – Epicurus[23]
	•	"...it has been shown that to injure anyone is never just anywhere." – Socrates, in Plato's Republic. Plato is the first person known to have said this.[24]
Ancient Rome[edit]
Seneca, maybe following Publilius Syrus [46-29 BCE],[25] told "ab alio expectes alteri quod feceris" ("expect from others what you did to them")[26][27] and "non est quod credas quemquam fieri aliena infelicitate felicem" ("it is not so, as you might believe, that one is made happy through the unhappiness of others").[28][29]
India[edit]
Sanskrit tradition[edit]
In Mahābhārata, the ancient epic of India, comes a discourse where the wise minister Vidura advises the King Yuddhiśhṭhira thus, “Listening to wise scriptures, austerity, sacrifice, respectful faith, social welfare, forgiveness, purity of intent, compassion, truth and self-control — are the ten wealth of character (self). O king aim for these, may you be steadfast in these qualities. These are the basis of prosperity and rightful living. These are highest attainable things. All worlds are balanced on dharma, dharmaencompasses ways to prosperity as well. O King, dharma is the best quality to have, wealth the medium and desire (kāma) the lowest. Hence, (keeping these in mind), by self-control and by making dharma (right conduct) your main focus, treat others as you treat yourself."
tasmād_dharma-pradhānéna bhavitavyam yatātmanā | tathā cha sarva-bhūtéṣhu vartitavyam yathātmani || (तस्माद्धर्मप्रधानेन भवितव्यं यतात्मना। तथा च सर्वभूतेषु वर्तितव्यं यथात्मनि॥Mahābhārata Shānti-Parva 167:9)
Tamil tradition[edit]
In the Section on Virtue, and Chapter 32 of the Tirukkuṛaḷ (c. 200 BC – 500 AD), Tiruvaḷḷuvar says: Why does a man inflict upon other creatures those sufferings, which he has found by experience are sufferings to himself ? (K. 318) Let not a man consent to do those things to another which, he knows, will cause sorrow. (K. 316) He furthermore opined that it is the determination of the spotless (virtuous) not to do evil, even in return, to those who have cherished enmity and done them evil. (K. 312) The (proper) punishment to those who have done evil (to you), is to put them to shame by showing them kindness, in return and to forget both the evil and the good done on both sides. (K. 314)
…
Christianity[edit]
See also: Christian ethics
According to Simon Blackburn, although the Golden Rule "can be found in some form in almost every ethical tradition", the rule is "sometimes claimed by Christianity as its own".[47] The "Golden Rule" has been attributed to Jesus of Nazareth, though he himself uses it to summarize the Old Testament: "Do to others what you want them to do to you. This is the meaning of the law of Moses and the teaching of the prophets"[48] (Matthew 7:12 NCV. However, when seen in the context of his other teachings, it is clear that ‘others' is understood to be universal, including enemies and the rule is not one of reciprocity but of unqualified altruism and love in the imitation of the divine. See alsoLuke 6:31). The common English phrasing is "Do unto others as you would have them do unto you". A similar form appeared in a Catholic catechism around 1567 (certainly inthe reprint of 1583).[49] The Golden Rule also has roots in the two old testament edicts, found in Leviticus 19:18 ("Forget about the wrong things people do to you, and do not try to get even. Love your neighbor as you love yourself."; see also Great Commandment) and Leviticus 19:34 ("But treat them just as you treat your own citizens. Love foreigners as you love yourselves, because you were foreigners one time in Egypt. I am the Lord your God.").
The Old Testament Deuterocanonical books of Tobit and Sirach, accepted as part of the Scriptural canon by Catholic Church, Eastern Orthodoxy, and the Non-ChalcedonianChurches, also express a negative form of the golden rule:
"Do to no one what you yourself dislike."
—Tobit 4:15
"Recognize that your neighbor feels as you do, and keep in mind your own dislikes."
—Sirach 31:15
At the time of Hillel, an elder contemporary of Jesus of Nazareth, the negative form of the golden rule already must have been proverbial, perhaps because of Tobit 4:15. When asked to sum up the entire Torah concisely, he answered:
"That which is hateful to you, do not do to your fellow. That is the whole Torah; the rest is the explanation; go and learn."
—Talmud, Shabbat 31a
…
Judaism[edit]
See also: Judaism
Context[edit]
The earliest known text of the positive form of the Golden Rule is the following Biblical verse, written c. 1300 BC:[67]
You shall not take vengeance or bear a grudge against your kinsfolk. Love your neighbor as yourself: I am the LORD.
—Leviticus 19:18[68], the "Great Commandment" (Hebrew: "ואהבת לרעך כמוך")
Hillel the Elder (c. 110 BC – 10 AD),[69] singled out the Golden Rule (Leviticus 19:18) as the most important message of the Torah. Rabbi Akiba agreed and suggested thatthe principle of love must have its foundation in Genesis chapter 1, which teaches that all men are the offspring of Adam who was made in the image of God (Sifra, Ḳedoshim, iv.; Yer. Ned. ix. 41c; Genesis Rabba 24).[70] According to Jewish rabbinic literature, the first man Adam represents the unity of mankind. This is echoed in the modern preamble of the Universal Declaration of Human Rights. And it is also taught, that Adam is last in order according to the evolutionary character of God's creation:[70]
"Why was only a single specimen of man created first?[70] To teach us that he who destroys a single soul destroys a whole world and that he who saves a single soul saves a whole world;[70] furthermore, so no race or class may claim a nobler ancestry, saying, 'Our father was born first'; and, finally, to give testimony to the greatness of the Lord, who caused the wonderful diversity of mankind to emanate from one type.[70] And why was Adam created last of all beings?[70] To teach him humility; for if he be overbearing, let him remember that the little fly preceded him in the order of creation."[70]
Sources[edit]
The Golden Rule originates in a well-known Torah verse (Hebrew: "ואהבת לרעך כמוך"):
You shall not take vengeance or bear a grudge against your kinsfolk. Love your neighbor as yourself: I am the LORD.
—Leviticus 19:18
The Jewish Publication Society's edition of Leviticus:
Thou shalt not hate thy brother. in thy heart; thou shalt surely rebuke thy neighbour, and not bear sin because of him. 18 Thou shalt not take vengeance, nor bear any grudge against the children of thy people, but thou shalt love thy neighbour as thyself: I am the LORD.[71]
This Torah verse represents one of several versions of the Golden Rule, which itself appears in various forms, positive and negative. It is the earliest written version of that concept in a positive form.[67]
At the turn of the eras, the Jewish rabbis were discussing the scope of the meaning of Leviticus 19:18 and 19:34 extensively:
The stranger who resides with you shall be to you as one of your citizens; you shall love him as yourself, for you were strangers in the land of Egypt: I the LORD am your God.
—Leviticus 19:34
Commentators summed up foreigners (= Samaritans), proselytes (= 'strangers who resides with you') (Rabbi Akiba, bQuid 75b) or Jews (Rabbi Gamaliel, yKet 3,1; 27a) to thescope of the meaning.
The Sage Hillel formulated a negative form of the golden rule. When asked to sum up the entire Torah concisely, he answered:[72]
That which is hateful to you, do not do to your fellow. That is the whole Torah; the rest is the explanation; go and learn it.
—Talmud, Shabbat 31a, the "Great Principle"
On the verse, "Love your fellow as yourself," the classic commentator Rashi quotes from Torat Kohanim, an early Midrashic text regarding the famous dictum of Rabbi Akiva: "Love your fellow as yourself — Rabbi Akiva says this is a great principle of the Torah."[73]
Israel's postal service quoted from the  previous Leviticus verse when it commemorated the Universal Declaration of Human Rights on a 1958 postage stamp.[74]