Varuna (; Sanskrit: वरुण, IAST: Varuṇa, Malay: Baruna) is a Vedic deity associated initially with the sky, later also with the seas as well as Ṛta (justice) and Satya (truth). He is found in the oldest layer of Vedic literature of Hinduism, such as hymn 7.86 of the Rigveda. He is also mentioned in the Tamil grammar work Tolkāppiyam, as the god of sea and rain. He is said to be the son of Kashyapa (one of the seven ancient sages).
In the Hindu Puranas, Varuna is the god of oceans, his vehicle is a Makara (crocodile) and his weapon is a Pasha (noose, rope loop). He is the guardian deity of the western direction. In some texts, he is the father of the Vedic sage Vasishtha.
In Hindu tradition, the theonym Váruṇa (Devanagari: वरुण) is described as a derivation from the verbal root vṛ ("to surround, to cover" or "to restrain, bind") by means of a suffixal -uṇa-, for an interpretation of the name as "he who covers or binds", in reference to the cosmological ocean or river encircling the world, but also in reference to the "binding" by universal law or Ṛta.
Georges Dumézil (1934) made a cautious case for the identity of Varuna and the Greek god Ouranos at the earliest Indo-European cultural level. The etymological identification of the name Ouranos with the Sanskrit Varuṇa is based in the derivation of both names from the PIE root *ŭer with a sense of "binding" – the Indic king-god Varuṇa binds the wicked, the Greek king-god Ouranos binds the Cyclopes. While the derivation of the name Varuṇa from this root is undisputed, this derivation of the Greek name is now widely rejected in favour of derivation from the root *wers- "to moisten, drip" (Sanskrit vṛṣ "to rain, pour").
In the earliest layer of the Rigveda, Varuna is the guardian of moral law, one who punishes those who sin without remorse, and who forgives those who err with remorse. He is mentioned in many Rigvedic hymns, such as 7.86–88, 1.25, 2.27–30, 8.8, 9.73 and others. His relationship with waters, rivers and oceans is mentioned in the Vedas. Vedic poets describe him as an aspect and one of the plural perspectives of the Agni, one of the primary deities of the Vedic period For example, hymn 5.3 of the Rigveda states:
तवम अग्ने वरुणो जायसे यत तवम मित्रो भवसि यत समिद्धः |
तवे विश्वे सहसस पुत्र देवास तवम इन्द्रो दाशुषे मर्त्याय ||
तवम अर्यमा भवसि यत कनीनां नाम सवधावन गुह्यम बिभर्षि |
अञ्जन्ति मित्रं सुधितं न गोभिर यद दम्पती समनसा कर्णोषि ||
1. You, o Agni, are Varuṇa when you are born. You become Mitra when you are kindled.
In you are the all the gods, o son of strength. You are Indra for the pious mortal.
2. You become Aryaman when you belong to young girls (at marriage). You bear a secret name, o you of independent will.
Varuna and Mitra are the gods of the societal affairs including the oath, and are often twinned Mitra-Varuna. Both Mitra and Varuna are classified as Asuras in the Rigveda (e.g. RV 5.63.3), although they are also addressed as Devas as well (e.g. RV 7.60.12). Varuna, being the king of the Asuras, was adopted or made the change to a Deva after the structuring of the primordial cosmos, imposed by Indra after he defeats Vrtra.
According to Doris Srinivasan, a professor of Indology focusing on religion, Varuna-Mitra pair is an ambiguous deity just like Rudra-Shiva pair. Both have wrathful-gracious aspects in Indian mythology. Both Varuna and Rudra are synonymous with "all comprehensive sight, knowledge", both were the guardian deity of the north in the Vedic texts (Varuna later gets associated with west), both can be offered "injured, ill offerings", all of which suggest that Varuna may have been conceptually overlapping with Rudra. Further, the Rigvedic hymn 5.70 calls Mitra-Varuna pair as rudra, states Srinivasan. According to Samuel Macey and other scholars, Varuna had been the more ancient Indo-Aryan deity in 2nd millennium BCE, who gave way to Rudra in the Hindu pantheon, and Rudra-Shiva became both "timeless and the god of time".
In Vajasaneyi Samhita 21.40 (Yajurveda), Varuna is called the patron deity of physicians, one who has "a hundred, a thousand remedies". His capacity and association with "all comprehensive knowledge" is also found in the Atharvaveda (~1000 BCE). Varuna also finds a mention in the early Upanishads, where his role evolves. In verse 3.9.26 of the Brihadaranyaka Upanishad (~800 BCE), for example, he is stated to be the god of the western quarter, but one who is founded on "water" and dependent ultimately on "the heart" and the fire of soul. In the Katha Upanishad, Aditi is identified to be same as the goddess earth. She is stated in the Vedic texts to be the mother of Varuna and Mitra along with other Vedic gods, and in later Hindu mythology she as mother earth is stated to be mother of all gods.
Varuna, addressed as Varuni explained Brahman in Taittiriya Upanishad to sage Bhrigu. First six anuvakas of Bhrigu Valli are called Bhargavi Varuni Vidya, which means "the knowledge Bhrigu got from (his father) Varuni". It is in these anuvakas that sage Varuni advises Bhrigu with one of the oft-cited definition of Brahman, as "that from which beings originate, through which they live, and in which they re-enter after death, explore that because that is Brahman". This thematic, all encompassing, eternal nature of reality and existence develops as the basis for Bhrigu's emphasis on introspection, to help peel off the outer husks of knowledge, in order to reach and realize the innermost kernel of spiritual Self-knowledge.
Rama interacts with Varuna in the Hindu epic Ramayana. For example, faced with the dilemma of how to cross the ocean to Lanka, where his abducted wife Sita is held captive by the demon king Ravana, Rama (an Avatar of Vishnu) performs a pravpavesha (prayer, tapasya) to Varuna, the Lord of Oceans, for three days and three nights, states Ramesh Menon. Varuna does not respond, and Rama arises on the fourth morning, enraged. He states to his brother Lakshamana that "even lords of the elements listen only to violence, Varuna does not respect gentleness, and peaceful prayers go unheard".
With his bow and arrow, Rama prepares to attack the oceans to dry up the waters and create a bed of sand for his army of monkeys to cross and thus confront Ravana. Lakshmana appeals to Rama, translates Menon, that he should return to "peaceful paths of our fathers, you can win this war without laying waste the sea". Rama shoots his weapon sending the ocean into flames. As Rama increases the ferocity of his weapons, Varuna arises out of the oceans. He bows to Rama, stating that he himself did not know how to help Rama because the sea is deep, vast and he cannot change the nature of sea. Varuna asked Rama to remember that he is "the soul of peace and love, wrath does not suit him". Varuna promised to Rama that he will not disturb him or his army as they build a bridge and cross over to Lanka. Although, most of the sources claim it was Samudra, the god of the oceans who met Rama not the rain god 
The Tolkāppiyam, a Tamil grammar work from 3rd century BCE divides the people of ancient Tamilakam into 5 Sangam landscape divisions: kurinji, mullai, paalai, marutham and neithal. Each landscape are designated with different gods. Neithal is described as a seashore landscape occupied by fishermen and seatraders, with the god of sea and rain, Varunan or Kadalōn. "Varuna" means water which denotes the ocean in the Tamil language.
Jhulelal is believed by Sindhi Hindus to be an incarnation of Varuna. They celebrate the festival of Cheti Chand in his honor. The festival marks the arrival of spring and harvest, but in Sindhi community it also marks the mythical birth of Uderolal in year 1007, after they prayed to Hindu god Varuna to save them from the persecution by tyrannical Muslim ruler named Mirkhshah. Uderolal morphed into a warrior and old man who preached and reprimanded Mirkhshah that Muslims and Hindus deserve the same religious freedoms. He, as Jhulelal, became the champion of the people in Sindh, from both religions. Among his Sufi Muslim followers, Jhulelal is known as "Khwaja Khizir" or "Sheikh Tahit". The Hindu Sindhi, according to this legend, celebrate the new year as Uderolal's birthday.
The Pali Canon of the Theravada school recognizes Varuṇa (Sanskrit; Pali: Varuna) as a king of the devas and companion of Sakka, Pajāpati and Isāna. In the battle against the Asuras, the devas of Tāvatiṃsa were asked to look upon the banner of Varuna in order to have all their fears dispelled (S.i.219).
Buddhaghosa states (SA.i.262) that Varuna is equal in age and glory (vanna) with Sakka and takes the third seat in the assembly of devas.
In Japan, he is called "Suiten" (水天 lit. "water deva"). He is included with the other eleven devas, which include Taishakuten (Śakra/Indra), Fūten(Vāyu), Emmaten (Yama), Rasetsuten (Nirṛti/Rākṣasa), Ishanaten (Īśāna), Bishamonten (Vaiśravaṇa/Kubera), Katen (Agni), Bonten (Brahmā), Jiten (Pṛthivī), Nitten (Sūrya/Āditya), and Gatten (Candra).
Varuna is also worshipped in Japan's Shinto religion. One of the Shinto shrines dedicated to him is the Suitengū ("Palace of Suiten") in Tokyo. After the Japanese emperor issued the Shinbutsu bunri, the separation of Shinto and Buddhist practices as part of the Meiji Restoration, Varuna/Suiten was identified with the Japanese supreme God, Amenominakanushi.