Short answer
No, not as a girlfriend or boyfriend. Islam keeps closeness and sex for marriage, and it tells believers not even to come near sex outside it. But no one is asked to marry a stranger. A man and a woman who are seriously thinking of marrying each other may meet in person and talk, as long as they are never alone. Someone from her family sits with them as a chaperone. This is usually a close male relative whom she can never marry (a mahram), such as her father, brother or uncle. He looks out for her, helps her judge the man and keeps the meeting honest. Islam sets things up this way to keep sex for marriage. That protects people from being used and then left, from a child arriving with no committed father and a mother left to raise it alone, from the broken hearts that break-ups leave behind, and from infections passed on through sex. If the two are suited, they marry. Love is not the problem. Islam accepts that we all have desires and need love and companionship, because God (﷾) made us that way. So it encourages people to marry when they are ready in body and mind and the law of their country allows, and it gives love a safe home in marriage, where the Qur'an says God (﷾) puts love and mercy between husband and wife.
Full explanation
Not as a girlfriend or boyfriend
The Qur'an does not only forbid sex outside marriage. It says: "Nor come nigh to adultery: for it is a shameful (deed) and an evil, opening the road (to other evils)." So Islam closes the road as well as the end of it. When the Qur'an speaks of marriage, it says a man should seek a wife in chastity, "not lewdness, nor secret intrigues". The Arabic speaks of taking secret companions. That is close to what people now call a girlfriend or boyfriend. The Qur'an also tells believing men, and then believing women, to lower their gaze and guard their modesty. So a private, romantic relationship with no plan or promise of marriage is not the Islamic way.
“Nor come nigh to adultery: for it is a shameful (deed) and an evil, opening the road (to other evils).”
“This day are (all) things good and pure made lawful unto you. The food of the People of the Book is lawful unto you and yours is lawful unto them. (Lawful unto you in marriage) are (not only) chaste women who are believers, but chaste women among the People of the Book, revealed before your time,- when ye give them their due dowers, and desire chastity, not lewdness, nor secret intrigues if any one rejects faith, fruitless is his work, and in the Hereafter he will be in the ranks of those who have lost (all spiritual good).”
“Say to the believing men that they should lower their gaze and guard their modesty: that will make for greater purity for them: And Allah is well acquainted with all that they do.”
“And say to the believing women that they should lower their gaze and guard their modesty; that they should not display their beauty and ornaments except what (must ordinarily) appear thereof; that they should draw their veils over their bosoms and not display their beauty except to their husbands, their fathers, their husband's fathers, their sons, their husbands' sons, their brothers or their brothers' sons, or their sisters' sons, or their women, or the slaves whom their right hands possess, or male servants free of physical needs, or small children who have no sense of the shame of sex; and that they should not strike their feet in order to draw attention to their hidden ornaments. And O ye Believers! turn ye all together towards Allah, that ye may attain Bliss.”
Meeting with a chaperone
Islam does not ask people to marry blind. A man told the Prophet (ﷺ) that he had agreed to marry a woman. The Prophet (ﷺ) asked whether he had looked at her. When he said no, the Prophet (ﷺ) told him to go and look. When another companion, al-Mughira, asked to marry a woman, the Prophet (ﷺ) told him to look at her, because that was more likely to bring lasting harmony between them. So a man and a woman who are thinking of marriage may meet in person, see each other and talk. They meet at her family's home or in a public place, with a chaperone there, and never alone. They can talk openly about what matters: faith and prayer, character, hopes, work and money, where they would live, children and family. Each may also ask people who know the other well. And no one may be married against their will. The Prophet (ﷺ) said a woman is not to be married without her consent.
Abu Hurayra reports that a man told the Prophet (ﷺ) he had agreed to marry a woman of the Ansar. The Prophet (ﷺ) asked whether he had looked at her. He said no, and the Prophet (ﷺ) told him to go and look at her.
Al-Mughira ibn Shu'ba asked to marry a woman, and the Prophet (ﷺ) told him to look at her, because that was more likely to bring lasting harmony between the two of them.
Ibn Abbas reports that the Prophet (ﷺ) said that no man should be alone with a woman except in the presence of a mahram (a close relative she may not marry), and that no woman should travel except with a mahram.
Abu Huraira reports that the Prophet (ﷺ) said a woman who has been married before is not to be married again without being consulted, and a virgin is not to be married without her permission.
Who the chaperone is, and why
The Prophet (ﷺ) said that no man should be alone with a woman unless a mahram of hers is with her. A mahram is a close male relative whom she can never marry, such as her father, brother, uncle or grown son. So the chaperone is usually one of these men, often her father or brother, and other family members often sit in too. There are good reasons it is someone like this. He cares about her and knows her. He can never marry her himself, so he has no interest of his own. He can judge the man as another man would: whether he is honest, serious and of good character, and whether he really means marriage. He can ask the questions she may find hard to ask. And a man who means well has no reason to avoid her family. The Prophet (ﷺ) also said that whenever a man is alone with a woman, Satan is the third of them. Being alone is where temptation is strongest. With a chaperone there, both can talk freely, and no one can later claim that something happened when it did not.
Ibn Abbas reports that the Prophet (ﷺ) said that no man should be alone with a woman except in the presence of a mahram (a close relative she may not marry), and that no woman should travel except with a mahram.
Ibn Umar reports that Umar, preaching at al-Jabiya, passed on what the Prophet (ﷺ) had told them. Among it: whenever a man is alone with a woman, Satan is the third of them.
A girlfriend or boyfriend, with no plan of marriage
Being alone together
Meeting to see and talk with someone you are thinking of marrying
With a chaperone, at her family's home or in a public place
Marrying anyone against their will
Praying the prayer for guidance (istikhara)
Why Islam keeps sex for marriage
The Qur'an calls adultery a shameful deed and an evil way, and the harm is easy to see. In a relationship with no commitment, one person can take the closeness and then walk away. Too often a man uses a woman for sex and then leaves her, hurt and sometimes pregnant. A child may then be born with no committed father, and a mother left to raise the child alone. In marriage, a man takes on lasting duties to his wife and children: the Qur'an puts the cost of a child's food and clothing on the father. Sex outside one faithful marriage also spreads infections. The World Health Organization says that more than 1 million curable sexually transmitted infections are caught every day around the world among people aged 15 to 49, and that most of them cause no symptoms. When two people keep themselves for each other, these infections have far less chance to spread. There is the heart as well. Dating often means one break-up after another, and every break-up leaves a broken heart. Old comparisons and memories can follow people into marriage. Islam closes the door before any of this begins. None of this is blame on any child. The Qur'an says that no one carries the burden of another's sin.
“Nor come nigh to adultery: for it is a shameful (deed) and an evil, opening the road (to other evils).”
“The mothers shall give such to their offspring for two whole years, if the father desires to complete the term. But he shall bear the cost of their food and clothing on equitable terms. No soul shall have a burden laid on it greater than it can bear. No mother shall be Treated unfairly on account of her child. Nor father on account of his child, an heir shall be chargeable in the same way. If they both decide on weaning, by mutual consent, and after due consultation, there is no blame on them. If ye decide on a foster-mother for your offspring, there is no blame on you, provided ye pay (the mother) what ye offered, on equitable terms. But fear Allah and know that Allah sees well what ye do.”
More than 1 million curable sexually transmitted infections are acquired every day worldwide in people aged 15 to 49, and most of them have no symptoms.
“Say: "Shall I seek for (my) Cherisher other than Allah, when He is the Cherisher of all things (that exist)? Every soul draws the meed of its acts on none but itself: no bearer of burdens can bear the burden of another. Your goal in the end is towards Allah: He will tell you the truth of the things wherein ye disputed."”
Desire is part of how God (﷾) made us
Islam does not pretend that people have no desires. Every human being feels desire and needs love and companionship, and God (﷾) made us that way. The Qur'an says He created spouses for us so that we may find rest in them. It calls husband and wife each other's garments: "They are your garments and ye are their garments." So Islam does not ask anyone to crush these feelings. It encourages them to marry when they are ready in body and mind, and when the law of their country allows it. Then desire has a safe home: a loyal and loving marriage, built on attraction, love and trust. Attraction matters too, which is why the Prophet (ﷺ) told a man to look at the woman before he married her. The Prophet (ﷺ) even said that a husband's intimacy with his wife is a charity that earns a reward, because it is lawful.
“And among His Signs is this, that He created for you mates from among yourselves, that ye may dwell in tranquillity with them, and He has put love and mercy between your (hearts): verily in that are Signs for those who reflect.”
“Permitted to you, on the night of the fasts, is the approach to your wives. They are your garments and ye are their garments. Allah knoweth what ye used to do secretly among yourselves; but He turned to you and forgave you; so now associate with them, and seek what Allah Hath ordained for you, and eat and drink, until the white thread of dawn appear to you distinct from its black thread; then complete your fast Till the night appears; but do not associate with your wives while ye are in retreat in the mosques. Those are Limits (set by) Allah: Approach not nigh thereto. Thus doth Allah make clear His Signs to men: that they may learn self-restraint.”
Abu Hurayra reports that a man told the Prophet (ﷺ) he had agreed to marry a woman of the Ansar. The Prophet (ﷺ) asked whether he had looked at her. He said no, and the Prophet (ﷺ) told him to go and look at her.
Abu Dharr reports that some poor companions said the rich were taking all the reward. The Prophet (ﷺ) told them that every glorification of God is a charity, and so is enjoining good and forbidding evil, and that in a man's intimacy with his wife there is a charity too. They asked whether a man is rewarded for fulfilling his desire. He said: if he fulfilled it unlawfully, would he not bear a sin? So when he fulfils it lawfully, he has a reward.
Advice for anyone looking to marry
Choose for faith and character first. The Prophet (ﷺ) said a woman is married for her wealth, her family standing, her beauty or her faith, and told the man to choose the one with faith. Muslims apply the same when a woman chooses a husband. Pray the prayer for guidance (istikhara), which the Prophet (ﷺ) taught for every decision. Keep messages and calls in the open too, because the same reasons apply on a phone as in a room. Bring both families in early, and do not drag things out. The Prophet (ﷺ) told the young that whoever can afford to marry should marry, because marriage helps a person lower the gaze and stay chaste, and that whoever cannot should fast. The Qur'an also tells the community to help single people marry. For advice about your own situation, ask a qualified scholar.
Abu Hurayra reports that the Prophet (ﷺ) said a woman is married for four things: her wealth, her family standing, her beauty and her religion; so win the one with religion, or you will be the loser. Al-Bukhari places it in the chapter "Equals in religion".
Jabir reports that the Prophet (ﷺ) taught his companions the prayer for guidance (istikhara) in every matter, as he taught them chapters of the Qur'an. Whoever means to do something prays two units of prayer beyond the obligatory ones. Then he asks God by His knowledge and His power, for God is able and he is not, God knows and he does not, and God knows the unseen. If God knows the matter is good for him in his religion, his livelihood and its outcome, he asks God to decree it for him. If God knows it is bad for him, he asks God to turn it away from him and to decree the good for him wherever it is.
Abdullah ibn Mas'ud reports that the Prophet (ﷺ) told the young men with him: whoever of you is able to marry should marry, because it helps him lower his gaze and guard his chastity; and whoever cannot should fast.
“Marry those among you who are single, or the virtuous ones among yourselves, male or female: if they are in poverty, Allah will give them means out of His grace: for Allah encompasseth all, and he knoweth all things.”
Love has a home
Islam does not treat love as a sin. It encourages love, and wants it to grow where it is safe: in a marriage, where both have made a promise before God (﷾) and their families. The Qur'an calls marriage one of God's (﷾) signs: "He created for you mates from among yourselves, that ye may dwell in tranquillity with them, and He has put love and mercy between your (hearts)". What Islam forbids is not love, but taking what belongs to marriage without the commitment of marriage.
“And among His Signs is this, that He created for you mates from among yourselves, that ye may dwell in tranquillity with them, and He has put love and mercy between your (hearts): verily in that are Signs for those who reflect.”
Perspectives
You need to date to know someone
Critics say you cannot know whether you suit someone until you have dated them. Marrying without it, they say, is a gamble, and a chaperone only gets in the way.
Without dating, people marry someone they do not really know.
Rebuttal
Islam does not forbid getting to know someone, only being alone together. A man and a woman may meet in person, talk with a chaperone there, and ask about each other. The Prophet (ﷺ) told a man to look at the woman he meant to marry, because that was more likely to bring lasting harmony between them. What Islam keeps for marriage is the closeness that belongs to it.
A chaperone is old-fashioned, because adults can decide for themselves.
Rebuttal
The chaperone does not decide for her. No woman may be married without her consent, so the choice stays hers. He is there so that the two are never alone, where temptation is strongest, and to look out for her. The Prophet (ﷺ) said that whenever a man is alone with a woman, Satan is the third of them.
The Islamic perspective
Islam has no girlfriends or boyfriends. It keeps sex for marriage, and it closes the doors that lead there, such as being alone together. A man and a woman thinking of marriage may meet in person with a chaperone, usually a close male relative of hers, and get to know each other openly. No one may be married without their consent. Islam encourages love, and gives it its home in marriage, where God (﷾) puts love and mercy between husband and wife.
The Qur'an forbids coming near to adultery.
The Prophet (ﷺ) said no man should be alone with a woman unless a close relative of hers is present.
The Prophet (ﷺ) said that whenever a man is alone with a woman, Satan is the third of them.
The Prophet (ﷺ) told men to look at the woman they meant to marry, as that was more likely to bring lasting harmony.
A woman is not to be married without her consent.
The Prophet (ﷺ) urged young people to marry when they could.
The Prophet (ﷺ) said that intimacy between husband and wife is a charity that earns a reward.