One of my friends told me that you are either born as a Hindu or not. You cannot convert from any other religion to Hinduism or the other way round. Is something of that sort mentioned in the Vedas or any other religious text?
No, there is no bar in converting from any religion to Hinduism or vice-versa.
Vedas speak about Mlecchas as someone who is not Vedic and not Indian. Basically, mlecchas are people who speak an illegible language and not Sanskrit. The concept of geography, religion and language was all mixed with each other to be indistinguishable.
Hinduism doesn't have a conversion ritual unlike similar ceremony in Christianity or Islam which causes the inadvertent feeling of disbelief in the believer about his conversion.
Conversion only requires that person to accept the Hindu way of life and leading a Dharmic life.
Ref 1. Mlecchas in Early India
Of course someone can convert to Hinduism. Some of the most famous Bengali Vaishnava masters are ex-muslims. One example is Haridas Thakur a direct disciple of Sri Chaitanya. Another example is the millions of Indonesians who have converted to Hinduism over the centuries. Even in recent times Swami Vivekananda has said the non-Hindus can convert to Hinduism.
"I want to see you Swami", I began, "on this matter of receiving back into Hinduism those who have been perverted from it. Is it your opinion they should be received?
"Certainly", said the Swami (Vivekananda)," they can and aught to be taken."
He sat gravely for a moment, thinking, and then resumed, "Besides," he said, "we shall otherwise decrease in numbers. When the Mohammedans first came, we are said -- I think on the authority of Ferishta, the oldest Mohammedan historian --- to have been six hundred millions of hindus. Now we are about two hundred millions. And then every man getting out of the Hindu pale is not only a man less, but an enemy the more. Again the vast majority of Hindu perverts to Islam and Christianity are perverts by the sword, or to the descendents of these. It would be obviously unfair to subject these to disabilities of any kind. As to the case of born aliens, did you say? Why, born aliens have been converted in the past by crowds, and the process is still going on. In my own opinion, this statement not only applies to aboriginal tribes, to outlying nations, and to almost all our conquerors before the Mohammedan conquest, but also to all those castes who find a special origin in the Puranas. I hold that they have been aliens thus adopted. Ceremonies of expiation are no doubt suitable in the case of willing converts, returning to their Mother church, as it were; but on those who were alienated by conquest-- as in Kashmir and Nepal -- or on strangers wishing to join us, no penance should be imposed."
― Vivekananda (Complete Works V, p233, interview given in "Prabuddha Bharat", April, 1899)
A princess of Java recently (2017) converted to Hinduism. http://www.currentriggers.com/world/indonesia-princess-java-became-hindu/
The short answer is yes, anyone can become a Hindu.
As others was pointed out, there is nothing in Vedas which prevent people from becoming Hindus(or following Dharma).
A person is a Christian if he/she pledges to follow the Nicene Creed and/or Apostles Creed which lay the definitions of Christian faith. Hinduism does not have such documents of faith which people need to pledge to follow.
What is to to become a Hindu then ? We'd need a clear definition of what is Hindu to say what it is to become a Hindu. Dr.Koenraad Elst debates the definition of Hindu in his book "Who is a Hindu?". He says that people who follow Vedas cannot alone be called Hindus as there are many non-vedic 'Hindu' sects like Lingayats.
In the books Being Different & Indra's Net, Rajiv Malothra traces a commonality between almost all 'Hindu' sects which is the belief in immanence of divinity in every object & every being, belief in the Human nature being originally divine (as opposed to being originally sinful) as the main commonalities and others being belief in Karma & re-incarnation.
Hence if anyone who accepts the above would automatically become a Hindu without any initiation ceremonies.
Vineet is right and so is Mr_Green. The name says it all. Sanatana Dharama. The word "Dharma" means "way" or "path". It is a way of life and is not a religion. So the question of conversion does not arise. And as Mr_Green said, there was no other religion as such. Anyone can accept the Dharma and continue with his/her life.
4000+ persons converted to Hinduism . see https://www.hindujagruti.org/news/2100.html
Where you can legally convert to Hinduism? Goto any Arya samaj temple. After https://www.sacred-texts.com/hin/m12/m12a064.htmconversion, you will be provided legally valid certificate.
Many Hindu/Vedic sects will convert you, such as Arya samaj ,Shaiva Siddhanta Church , BAPS, ISCKON etc. Some sects will not convert one. Those sects who will not convert the desiring person, let them choose not to do so, but they can not speak on behalf of all the sects.
If in case you are asking that whether old religious texts mention about conversion .
Argument1) There was no explicit law in vedas or scriptures, as there was no threat. But the basic principle of not a stuck dharma, but a living dharma, which can fight new challenges was already put by Krishna, which can work for Conversion
"Hinduism has been in existence for thousands of years, however it is only after the advent of Christianity and islam that conversion has become a threat to the survival of the religion. During the ancient times there was no such threat, hence the Rishis did not formulate any rule as such for reconversion. However any threat against Sanatana Dharma was met head on. That is why our Gods and Godesses are armed. They have not preached ahimsa of the mahatma variety, instead Lord Krishna terms any refusal to fight against threats to Dharma as cowardice and sin (kshudram Hrudaya dourbalyam). Refer Bhagavad Gita chapter 2, sloka 3, & 31 to 35. Now there is a serious existential threat against our religion and hence we need to put in place the necessary defenses. Making reconversion easy should be one of them." ref: http://www.haindavakeralam.com/how-to-convert-to-hinduism-a-request-hk4116#comment-158945
Argument 2) you can see lots of people from middle ages converting from other religions to hinduism here.
This is going from centuries. Even before the most orthodox middle ages. Esp, Mihirkula like Huna emperor (Mihirakula ruled his empire from 502 to 530CE ), who destroyed buddhist, hindu sites,killed monks. Later converted from his barbaric native religion to Hinduism.
So obviously during 500 CE also, we have documented cases of conversion. So, obviously conversion was allowed. Only thing is that during dark middle ages, when all the world became too much rigid, then our caste system and conversion also changed to inflexible. And Many people still carry the same impression on conversion which was during dark middle ages, in between. But our ancient india was not so inflexible. When new invadors came and tried to assimilate later here in the culture, they were welcomed then. Though nobody tried to evangelize actively to others, like buddhists.
Argument 3A) SCRIPTURE: There is a scripture named Devalasmriti, which allows you to reconvert back the person to Vedic dharma (like if he was converted forcibly by mlechhas/foreigners to their religion, then he could be converted back through this procedure).
Devalasmriti (in sanskrit) http://www.hinduonline.co/vedicreserve/smriti/upasmriti/devala_smriti.pdf and https://archive.org/details/devala_smriti
English language based detailed book on devala smriti
Example of application of devalasmriti scripture in ancient times: ref: https://www.gktoday.in/question/during-the-invasion-of-mohammed-bin-kasim-many-hin During the invasion of Mohammed Bin Kasim in ad 712 many Hindus in Sindh were converted to Islam through questionable means. All of them were reconverted to Hinduism on the authority of ancient text Deval Smriti written by Deval Rishi. Deval smriti writes down rules for it .
Argument 3B) SCRIPTURES: Mahabharat Answer https://hinduism.stackexchange.com/a/37970/13287 details Indra in Mahabharat's Shanti parva saying about conversion.
Argument 4) What views and actions the important sages have regarding conversion:
( As detailed in https://hinduism.stackexchange.com/a/414 and https://en.wikipedia.org/wiki/Haridasa_Thakur ) Haridas Thakur(born 1450) direct disciple of Sri Chaitanya Mahaprabhu was a converted ex-muslim.
So CHAITANYA MAHAPRABHU and Swami Vivekananda also converted people from Christianity or islam. Also ADI SHANKARACHARYA converted people from Buddhism to Vedic Hinduism
(others who supported conversion as part of hinduism : Shastriji_Maharaj(31 January 1865 – 10 May 1951) ( https://en.wikipedia.org/wiki/Shastriji_Maharaj ) , Swami Prabhupada, Dayanand Saraswati, Jnana guru Siva Yogaswami of Jaffna (1872–1964) ( https://en.wikipedia.org/wiki/Yogaswami ),Ramana Maharishi, Sri Aurobindo )
One of my friends told me that you are either born as a Hindu or not. You cannot convert from any other religion to Hinduism.
Hinduism has not been an avowedly proselytizing religion. In theory it could not be so. For about two thousand years the caste system has reigned supreme and no one can in theory be admitted to the Hindu fold who is not born in it.
A Hindu may lose his caste (if he's not careful) and be readmitted into Hinduism (if the prescribed prāyaścittas are followed) but this provision only applies to people who were born Hindu:
A Hindu may lose caste, be excommunicated and driven out of the fold of Hinduism, if he be guilty of very serious lapses and refuses to undergo the prāyaścittas prescribed by the smṛtis.
When the sinner performed the prāyaścitta prescribed by the śāstras, he was to be welcomed by his relatives, who took a bath along with him in a holy river or the like and throw therein an unused jar filled with water; they were not to find fault with him and were to completely associate with him in all ways.
In practice though, things worked a bit differently:
The ancient smṛtis do not expressly prescribe any rites for bringing into the brahmanic or Hindu fold a person who or whose ancestors did not belong to it. But as Hinduism has been extremely tolerant (barring a few exceptional instances) it had a wonderful power of quiet and unobtrusive absorption. If a person, though of foreign ancestry, conformed to Hindu social usages in outward behaviour, in course of time his descendants became absorbed into the vast Hindu community.
This process has gone on for at least two thousand years. The beginnings of it are found in the Śāntiparva chap. 65 where Indra tells the Emperor Māndhātṛ to bring all foreign people like the Yavanas under brahmanical influence. The Besnagar column inscription shows that the Yona (yavana) Heliodora (Heliodorus) son of Diya (Dion) was a bhāgavata (devotee of Vāsudeva)...
In the caves at Nasik, Karle and other places many of the donors are said to have been yavanas ... Several inscriptions state that Indian kings married Huna princesses, e.g. Allaṭa of the Guhila dynasty married a Hūṇa princess named Hariyadevi ... king Yaśaḥkarṇadeva of the Kalacuri dynasty is said to have been the son of Karṇadeva and Āvalladevī, a Hūṇa princess. These and similar examples show that persons of foreign descent and their children were absorbed into the Hindu community from time to time. This absorption is illustrated in modern times by the case of Fanindra Deb v. Rajeshwar ... in which it was found that a family in Kooch Behar not originally Hindu had adopted certain Hindu usages and it was held that it had not taken over the practice of adoption. How Hindu customs and incidents persist even after conversion to Islam is strikingly shown by the Khojas and Kutchi Memons of the Bombay Presidency, who though made converts to Islam several centuries ago, were held by the courts in India to have retained the ancient Hindu Law of succession and inheritance.