Defamation & harassment law guide

Online Harassment Laws: Federal and State Rules Explained

How federal and state laws treat online harassment, where protected speech ends, and the practical steps to protect yourself and get harmful content offline.

What are online harassment laws?

Online harassment laws are the criminal and civil rules that apply when someone uses email, texts, social media or other digital tools to threaten, torment or intimidate another person. In the United States there is no single “online harassment” statute. Instead, the conduct is covered by a mix of federal laws, such as 18 U.S.C. § 2261A on cyberstalking and 47 U.S.C. § 223 on harassing communications, and by each state’s own harassment, stalking and threat laws. Whether a specific post or message is illegal depends on what it says, how often it is sent, the sender’s intent and the state where the case is brought.

The problem is common. In a Pew Research Center survey conducted in September 2020, 41% of U.S. adults said they had personally experienced online harassment, and 25% said they had faced more severe forms such as physical threats, stalking, sexual harassment or sustained harassment.

This guide explains how these laws work, where the line between protected speech and a crime usually falls, and what you can do to protect yourself and get harmful content offline. It is general information, not legal advice.

Federal laws that apply to online harassment

Federal law reaches online harassment mainly because the internet is a channel of interstate commerce. The statutes that come up most often are these:

  • Cyberstalking, 18 U.S.C. § 2261A. It covers a course of conduct (defined in 18 U.S.C. § 2266 as a pattern of two or more acts) carried out through an interactive computer service, an electronic communication service or similar means, with intent to kill, injure, harass or intimidate someone. The conduct must place the person in reasonable fear of death or serious bodily injury, or cause (or be reasonably expected to cause) substantial emotional distress. For a deeper look, see our guide to cyberstalking laws.
  • Harassing communications, 47 U.S.C. § 223. Section 223(a) makes it a crime to use a telecommunications device without disclosing your identity and with intent to abuse, threaten or harass a specific person, or to repeatedly initiate communication solely to harass someone. For the anonymous-message offense, the law expressly includes software that sends communications over the internet. The maximum penalty is two years in prison, a fine, or both.
  • Interstate threats, 18 U.S.C. § 875(c). Sending a communication across state lines that threatens to kidnap or injure another person is a federal crime punishable by up to five years in prison.
  • Intimate images. 15 U.S.C. § 6851 lets a person whose intimate images were shared without consent sue the person who disclosed them, for actual damages or liquidated damages of $150,000, plus attorney’s fees, and ask a court to order the images taken down. The TAKE IT DOWN Act, signed on May 19, 2025, also added a notice-and-removal duty for platforms, discussed below.

Federal cases are brought by federal prosecutors, usually after an investigation by the FBI or another agency. Many harassment cases are handled under state law instead.

How state harassment laws differ

Every state has its own harassment, stalking and threat statutes, and many have updated them to cover electronic communications. The details vary in ways that can decide a case. Three examples show the range:

  • Texas. Under Texas Penal Code § 42.07, a person commits harassment if, with intent to harass, annoy, alarm, abuse, torment or embarrass another, they send repeated electronic communications in a way reasonably likely to have that effect. The definition of electronic communication is broad and covers email, texts, instant messages and social media. The base offense is a Class B misdemeanor. It becomes a Class A misdemeanor in listed situations, such as when the person has a prior conviction under the same section.
  • New York. New York Penal Law § 240.30, aggravated harassment in the second degree, covers a person who, with intent to harass, sends or causes to be sent a threat to cause physical harm or unlawful property damage by phone, computer or another electronic device, when they know or reasonably should know the message will cause reasonable fear. It is a class A misdemeanor.
  • California. California Penal Code § 653.2 targets a specific online tactic: electronically publishing someone’s personal identifying information, including a photo, or a harassing message about them, without their consent and with intent to place them in reasonable fear for their safety and in a way likely to incite harassment or harm by third parties. It is a misdemeanor punishable by up to one year in county jail, a fine of up to $1,000, or both.

Across states, the questions that usually matter are whether a single message is enough or a pattern is required, whether a threat must be involved, what kind of harm the victim must suffer, and whether the law also gives the victim a civil remedy. Publishing private details to invite harassment overlaps with doxxing; see is doxxing illegal?

Where free speech ends and harassment begins

Harassment laws have to respect the First Amendment. Rude, offensive or unpopular speech is generally protected, even when it is hurtful. Courts look for something more: true threats, a targeted pattern of conduct, or speech tied to other unlawful acts.

The U.S. Supreme Court addressed threats in Counterman v. Colorado, decided on June 27, 2023. The case involved a man who sent a musician a long series of unwanted Facebook messages. The Court held that when a prosecution is based on threatening statements, the state must prove the speaker had some understanding of the threatening nature of the words. Recklessness is enough: the speaker consciously disregarded a substantial risk that the messages would be viewed as threatening violence.

In practice, this means that a single insulting comment is rarely a crime, while repeated, targeted messages that frighten someone, or posts that threaten violence, often are. False statements of fact that damage your reputation are a separate issue handled by civil defamation law; see our guide to defamation laws and the difference between libel and slander.

Civil remedies: restraining orders and lawsuits

A criminal case is not the only route. Victims of online harassment can often go to civil court directly, without waiting for prosecutors.

  • Civil harassment restraining orders. Many states let a victim ask a court to order the harasser to stop contacting them. In California, for example, California Code of Civil Procedure § 527.6 defines harassment to include a course of conduct, such as harassing correspondence sent by any means including email, that seriously alarms or harasses a person and causes substantial emotional distress. An order issued after a hearing can last up to five years and can be renewed.
  • Lawsuits for damages. Depending on the facts, a lawyer may consider claims such as intentional infliction of emotional distress, invasion of privacy, or defamation when false statements are involved. Deadlines for these claims can be short; see our guide to the defamation statute of limitations.
  • Federal claim for intimate images. As noted above, 15 U.S.C. § 6851 gives a direct federal civil claim, including court orders to stop the disclosure.

Lawsuits against people who are speaking on public issues can also trigger a state anti-SLAPP law, which may lead to early dismissal and fee awards. A lawyer can assess that risk before you file; see anti-SLAPP laws.

What to do if you are being harassed online

Every case is different, and a lawyer or victim advocate in your state can advise on your situation. These steps protect your safety and keep your options open:

  1. Put safety first. If you believe you are in immediate danger, call 911 or your local police before anything else.
  2. Preserve the evidence. Take screenshots that show the content, the account name, the URL, and the date and time. Save emails with full headers and export message threads where the platform allows it. Keep a simple log of each incident. Do this before you report anything, because reported content may disappear.
  3. Do not engage. Replying can escalate the situation and give the harasser new material. Use block, mute and privacy settings instead.
  4. Report to the platform. Most platforms prohibit threats, targeted harassment, impersonation and sharing private information. Use their reporting tools and keep a record of each report.
  5. Report to law enforcement when there are threats, a pattern of conduct, intimate images or exposure of your private information. Bring your log and screenshots.
  6. Talk to a lawyer about restraining orders and civil claims, and about the deadlines that apply where you live.
  7. Check what appears when people search your name. Harassment campaigns often leave posts, fake profiles and threads that keep ranking long after the conduct stops.

Getting harassing content removed from platforms and Google

A criminal case or lawsuit can take months, and it does not automatically take anything offline. Platforms themselves are rarely the defendant. Under 47 U.S.C. § 230, an online service is generally not treated as the publisher of what its users post, although that protection does not limit the enforcement of federal criminal law. So in practice, removal usually runs through the platform’s own policies, or through a court order directed at the person who posted the content.

Two newer tools help. First, the TAKE IT DOWN Act requires covered platforms to offer a process for removing nonconsensual intimate images and to take them down, along with known identical copies, no later than 48 hours after a valid request (47 U.S.C. § 223a). The Federal Trade Commission began enforcing those requirements on May 19, 2026. Second, Google’s personal information removal policy lets people ask for search results to be removed when they expose contact details or other private data, including doxxing content that carries threats or calls for harm. Google notes that this only removes the result from Google Search, not the page from the website, so the source still needs to be addressed.

When content cannot be removed, accurate and authoritative pages can push it further down your search results. If a harassment campaign is turning into a public story about you or your company, it may need a coordinated response; see social media crisis management and our crisis response checklist. For posts that make false claims, see how to report defamation on social media.

How Media Removal can help

Media Removal is not a law firm. We do not provide legal advice, bring lawsuits or represent anyone in court. Criminal charges and restraining orders belong to the police, prosecutors, courts and your lawyer.

What we do is the work that sits alongside the legal process: getting harmful content taken down at the source and cleaning up what appears when people search your name. That can include:

  • Reporting posts, profiles and threads through each platform’s own rules and legal channels.
  • Requesting removal or deindexing from Google once the source is gone or a removal ground applies.
  • Pushing down results that cannot be removed with accurate, authoritative content through online reputation management.
  • Monitoring for new posts and accounts so they can be reported quickly.

Removal always depends on the platform, the publisher or a court, and not every item can come down. For content removal, you are billed only when the URL is verified offline. When harassment is already damaging your name or your business, our reputation crisis management team responds the same day. Every client signs an NDA, and so do we. If you want us to look at your case, request a quote.

Frequently asked questions

Is online harassment a crime?

It can be, but not always. Conduct such as threats of violence, a repeated pattern of targeted messages that causes fear or substantial emotional distress, anonymous messages meant to harass, and sharing intimate images without consent can be crimes under federal or state law. Offensive or rude speech on its own is usually protected by the First Amendment.

What federal laws cover cyber harassment?

The main ones are 18 U.S.C. § 2261A on cyberstalking, 47 U.S.C. § 223 on harassing communications, and 18 U.S.C. § 875(c) on interstate threats. For intimate images, 15 U.S.C. § 6851 gives victims a civil claim, and the TAKE IT DOWN Act adds a notice-and-removal duty for platforms. Many cases, though, are handled under state law.

How many messages does it take to count as harassment?

There is no single number. Some laws, such as the federal cyberstalking statute, require a course of conduct, meaning two or more acts. Others, such as laws on threats, can apply to a single message. One Texas provision, for example, targets repeated electronic communications, while New York’s aggravated harassment law focuses on threats. The answer depends on the statute and the state.

Can I get a restraining order for online harassment?

In many states, yes. Civil harassment restraining orders can cover harassing emails, messages and other electronic contact. In California, an order issued after a hearing can last up to five years. The rules and forms differ by state, so a local lawyer or court self-help center can explain the process where you live.

Will a platform remove harassing posts about me?

Often, if the content breaks the platform’s rules on threats, targeted harassment, impersonation or private information. For nonconsensual intimate images, covered platforms must remove them within 48 hours of a valid request under the TAKE IT DOWN Act. Platforms decide case by case, so not every report succeeds, and Google can sometimes remove search results that expose private information.

Should I contact the police, a lawyer or a removal company first?

If you are in immediate danger, call 911. Otherwise, preserve your evidence first, then report to police where there are threats or a pattern of conduct, and speak with a lawyer about restraining orders and civil claims. Content removal and search cleanup can run alongside the legal process, but they do not replace it.

Sources

Need harmful content taken down?

Tell us where it lives. We review each case and recommend the fastest route that fits it.

  1. Guide 1Libel vs. Slander: What Is the Difference?Libel is written defamation and slander is spoken. Learn how they differ in proof, damages and deadlines, where online posts fall, and what to do next.
  2. Guide 2Defamation Per Se: Definition, Categories and ExamplesDefamation per se is a false statement so harmful that damages are presumed. Learn the four categories, how states differ and what to do if it targets you.
  3. Guide 3Defamation Statute of Limitations: How Long Do You Have to Sue?How long do you have to sue for defamation? Learn when the clock starts, how the single publication rule works online, and what to do before time runs out.
  4. Guide 4How to Sue for Defamation Over an Online PostLearn how to sue for defamation over an online post: what you must prove, who you can sue, the steps to file and faster ways to get content removed.
  5. Guide 5Anti-SLAPP Laws by State: How They Work and When They ApplyAnti-SLAPP laws by state explained: how the early dismissal motion works, why coverage varies, fee risk for plaintiffs, and what it means for online content.
  6. Guide 7Cyberstalking Laws: Federal Rules and State-by-State GuideCyberstalking laws explained: what 18 U.S.C. § 2261A covers, federal penalties, how state laws differ, and steps to take if someone is stalking you online.
  7. Guide 8Is Doxxing Illegal? Doxxing Laws ExplainedIs doxxing illegal? Learn which federal and state laws apply, when posting private information becomes a crime and what to do if you have been doxxed.