Flirting with a minor is not itself a named crime, but the question is misleading, because the moment communication between an adult and someone under 18 takes on a sexual tone, suggests meeting up, or involves explicit images, it stops being flirting in any legal sense and becomes solicitation, enticement, or exploitation. Those are felonies, several carry mandatory minimum prison sentences measured in decades, and conviction brings sex offender registration that follows the person for life. So the honest answer to “is it illegal to flirt with a minor” is that the law does not care what you call the conversation. It cares what you said, what you meant by it, and what you were trying to make happen.
What Actually Crosses the Line
An adult telling a teenager “great game today” after a soccer match isn’t a crime. An adult sending that same teenager private messages with sexual undertones at midnight is a different situation entirely, even if both get called “friendly.” Certain categories of communication are criminal regardless of how the adult characterizes them:
- Sexually explicit images or messages. Sending sexual images to a minor, asking for them, or possessing them are all federal crimes. This applies even if the minor initiated the exchange or appeared willing.
- Sexually suggestive language, including intrusive questions about a minor’s sexual experiences. No image needs to change hands for this to count as solicitation.
- Any attempt to arrange an in-person meeting for sexual purposes. The crime is complete at the attempt. The meeting does not have to happen.1Office of the Law Revision Counsel. 18 U.S. Code 2422 – Coercion and Enticement
- Grooming: building a relationship through flattery, gifts, emotional dependency, or isolation with the goal of eventually engaging in sexual conduct. The law treats grooming as part of the criminal scheme, not as an innocent lead-up.
One point that catches people off guard: a minor cannot legally consent to sexual communication with an adult. “They started it” or “they said they were okay with it” is not a defense. The law places the entire burden of responsibility on the adult.
How Intent Turns a Conversation Into a Crime
Criminal intent is the dividing line. For online solicitation charges, prosecutors need to show that the adult knowingly communicated with a minor for the purpose of engaging in or encouraging sexual activity. That “knowingly” element matters: the adult must have been aware, or had reason to believe, they were talking to someone under 18.
Proving intent doesn’t require a confession. Sexually suggestive language in messages is the most obvious indicator, but courts look at the full picture. A pattern of escalating contact, attempts to move the conversation to encrypted or disappearing-message platforms, efforts to isolate the minor from parents, sending gifts or money, and trying to arrange private meetings all serve as evidence of criminal purpose. Deleting messages or browser history after the fact can itself become evidence of consciousness of guilt.
Asking a teenager to keep the conversations secret from their parents is one of the strongest indicators prosecutors point to. Adults with innocent intentions rarely do that.
Age of Consent and the Close-in-Age Exception
The age of consent for sexual activity varies by state, ranging from 16 to 18. A 17-year-old can legally consent to sexual contact in one state but not in a neighboring one. For federal offenses like enticement, the threshold is uniformly 18, regardless of state consent laws.
Many states have close-in-age exceptions, sometimes called Romeo and Juliet laws, that reduce or eliminate criminal liability when both people are close in age. They were designed to prevent a 19-year-old from being prosecuted over a relationship with a 17-year-old partner. These exceptions do not protect adults with significant age gaps, and they do not apply to online solicitation or exploitation charges at the federal level.
Federal Charges and What They Carry
The federal government prosecutes these offenses aggressively, and the penalties are among the harshest in the criminal code.
- 18 U.S.C. § 2422(b), Enticement of a Minor. Using the internet, phone, mail, or any other means of interstate communication to persuade someone under 18 to engage in sexual activity. Mandatory minimum of 10 years, maximum of life.1Office of the Law Revision Counsel. 18 U.S. Code 2422 – Coercion and Enticement
- 18 U.S.C. § 2251, Sexual Exploitation of Children. Producing, soliciting, or receiving sexually explicit images of a minor. First offense: 15 to 30 years. Second: 25 to 50 years. Third or subsequent: 35 years to life.2Office of the Law Revision Counsel. 18 U.S. Code 2251 – Sexual Exploitation of Children
- 18 U.S.C. § 1470, Transfer of Obscene Material to Minors. Knowingly sending obscene material to someone under 16 through the mail or electronic communication. Maximum of 10 years.3Office of the Law Revision Counsel. 18 U.S. Code 1470 – Transfer of Obscene Material to Minors
State laws add another layer. Every state has its own online solicitation and enticement statutes, and most classify these offenses as felonies. Many states also have separate contributing-to-the-delinquency-of-a-minor laws that can apply when an adult’s behavior corrupts a minor’s morals, even if the conduct doesn’t rise to the level of a federal charge. Penalties and definitions vary, but the direction is consistent everywhere.
Life After Conviction: The Registry
Prison is only part of the sentence. Under the federal Sex Offender Registration and Notification Act, a conviction for soliciting a minor requires registration. Solicitation offenses are classified as Tier II, which requires 25 years of registration.4Office of Justice Programs. Current Law More serious offenses, including enticement under § 2422, can trigger Tier III classification and lifetime registration.
Registration affects almost every part of daily life. Registered offenders face restrictions on where they can live and work, are excluded from jobs involving children or vulnerable populations, and may lose professional licenses. Many are barred from schools, parks, and playgrounds. The registry is public, so employers, landlords, and neighbors can see the conviction. Even after a prison sentence and the registration period end, background checks will reflect the conviction indefinitely.
Why “I Thought They Were 18” Rarely Works
The argument that the adult genuinely believed the minor was 18 or older rarely succeeds in federal court. The majority of federal circuit courts have held that knowledge of the victim’s actual age is not required for conviction under the major child exploitation statutes. The Third Circuit, for example, has ruled that because knowledge of age is not an element of the offense, a mistake-of-age defense simply does not apply. It doesn’t matter if the minor lied, used a fake ID, or looked older. The legal risk falls entirely on the adult.
How These Cases Get Discovered
A significant number of online solicitation arrests come from sting operations where a law enforcement officer poses as a minor in chat rooms, on social media, or on dating apps. Federal courts have consistently held that the enticement statute covers communications with someone the adult believed to be a minor, even when no actual minor existed.1Office of the Law Revision Counsel. 18 U.S. Code 2422 – Coercion and Enticement The absence of a real child is not a defense.
Officers in these operations document every message and typically let the adult drive the conversation’s direction. That matters for the entrapment defense, which requires proving both that the government induced the crime and that the defendant was not predisposed to commit it. If chat logs show the defendant initiated sexual conversation, escalated the tone, or expressed interest in meeting, prosecutors will argue that shows predisposition. The burden of proving entrapment rests on the defendant, and most claims fail on the predisposition element.
Even outside sting operations, these cases are easy to investigate because of the digital trail. Social media companies, messaging apps, and other electronic service providers are required by federal law to report any apparent child sexual exploitation they discover to the National Center for Missing and Exploited Children through its CyberTipline.5Office of the Law Revision Counsel. 18 U.S. Code 2258A – Reporting Requirements of Providers NCMEC forwards actionable reports to law enforcement. A parent who finds concerning messages on a child’s phone can also go straight to police, and the messages themselves become the core of the case.