Using Filters to Hide Comments on Social Media: First Amendment Implications
This post is Part 5 of a multi-part series. For a more detailed analysis of the issues discussed, please see Local Government Law Bulletin #148.
Local governments have several methods available for moderating comments on their social media pages. One option involves hiding comments automatically by enabling filters available on social media platforms, which will automatically hide or block certain comments from the public on a user’s page. Some social media platforms offer customizable filters that allow the accountholder to choose which words, phrases, or emojis appear publicly on their pages and which will be hidden from public view. Additionally, some social media platforms offer accountholders an option to use a standardized (non-customizable) profanity filter or other filter for objectionable content (as determined by the platform).
Courts have identified a number of potential First Amendment concerns when government entities use filters as a mechanism for automatically hiding comments. This post will explore the evolving case law regarding the use of user-determined keyword filters and platform-determined profanity filters in the government context.
Using Customizable Keyword Filters
In People for the Ethical Treatment of Animals v. Tabak, 109 F.4th 627 (D.C. Cir. 2024), the D.C. Circuit Court of Appeals examined the constitutionality of a rule prohibiting “off-topic” comments on government-operated social media pages. The case involved a First Amendment challenge to “Comment Guidelines” maintained by a federal government agency, the National Institutes of Health (NIH), for its Facebook and Instagram pages. Among other types of content, the NIH Comment Guidelines prohibited “off-topic posts” by members of the public. The court held that NIH’s off-topic rule failed the reasonableness test for a limited public forum due to its lack of “objective, workable standards” that would “guide either NIH’s social media moderators or the public as to how to divine what may come in from what must stay out.” (For more discussion of the issues with “off-topic” comment restrictions on government social media pages, see this blog post.)
The D.C. Circuit also held that NIH’s method of enforcing its “off-topic” rule was unreasonable. NIH used customizable keyword filters on Facebook and Instagram to enforce its Comment Guidelines by automatically filtering out and hiding any comment that contained one of a list of prohibited keywords. For example, the keywords NIH chose to use for its filter on Facebook included the words “PETA, PETALatino, animal(s), animales, animalitos, cats, gatos, chimpanzee(s), chimp(s), hamster(s), marmoset(s), monkey(s), monkies, mouse, mice, primate(s), sex experiments, cruel, cruelty, revolting, torment(ing), torture(s), torturing, #believemothers, marijuana, cannabis, Hitler, [and] nazi,” along with various expletives. The court found this particular list of keywords problematic based on the topics of NIH’s own posts:
In the context of NIH’s posts—which often feature research conducted using animal experiments or researchers who have conducted such experiments—to consider words related to animal testing categorically “off-topic” does not “ring[ ] of common-sense.” . . . For example, consider NIH’s July 20, 2021 Instagram post, which featured a photo of the eye of a zebrafish. . . . The caption read, in part: “This picture of an anesthetized adult zebrafish was taken with a powerful microscope that uses lasers to illuminate the fish.”. . . It is unreasonable to think that comments related to animal testing are off-topic for such a post. Yet a comment like “animal testing on zebrafish is cruel” would have been filtered out because “animal,” “testing,” and “cruel” are all blocked by NIH’s keyword filters.
Further, the D.C. Circuit concluded that the “permanent and context-insensitive nature of NIH’s [use of filters] reinforces its unreasonableness.” The filters would automatically block even comments that were generally responsive to the topic of an NIH post if a single prohibited keyword was used in the comment, without evaluating the context of the post on which the comment was made. Moreover, NIH did not “employ any manual review of comments to restore otherwise on-topic comments that have been removed, turn off its filters when it post[ed] content that [was] likely to make certain keywords relevant, or even routinely review its keyword list to consider whether its keywords should be removed (at least absent a lawsuit).” Combined with finding that NIH’s chosen keywords appeared to target a particular viewpoint (namely, the viewpoint that NIH should cease funding research on animals), the D.C. Circuit held that the off-topic restriction violated the First Amendment.
In 2025, the Seventh Circuit Court of Appeals ruled on a similar use of filters in Krasno v. Mnookin, 148 F.4th 465, 471 (7th Cir. 2025). Animal rights advocate Madeline Krasno alleged that the University of Wisconsin-Madison violated her First Amendment rights by deleting or hiding her comments about the University’s primate testing facilities on the University’s social media pages. The University’s “Social Media Statement” reserved the right to remove “off-topic” comments, and its guidance to its social media staff gave them discretion to “remove posts that are unrelated to the topic or purpose of the [social media] page.” Like NIH in the Tabak case, the University used customized keyword filters—primarily focused on words related to animal testing—to enforce its social media guidelines. For example, on Facebook, the University automatically filtered and hid comments using the following keywords: “peta, macaques, animal laboratories, testing on animals, animal testing, barbaric, wnprc, primate, primates, experimenting on, research animals, cruelty, torturing, torture, vivisection, monkeys, and experimenting.” The fact that the University’s off-topic comment rule was “enforced through sheer discretion” of social media staff and through “inflexible and context-blind keyword filters” led the Seventh Circuit to hold the restriction was unconstitutional.
The primary problem with the customizable keyword filters highlighted by the Tabak and Krasno decisions is the automatic, inflexible, context-blind way in which these filters block speech from public view. By design, these customizable filters automatically hide comments based on the presence of a single word or emoji, regardless of the overall context of the comment or the underlying post on which the comment was made. Even under a limited public forum standard (which was applied in both Tabak and Krasno), courts have found this method of hiding comments to be unreasonably rigid and formulaic.
These cases also show that customized filters can be used in a viewpoint-discriminatory manner. In both Tabak and Krasno, government entities used keywords that appeared to be specifically aimed at censoring speech expressing a specific viewpoint—a viewpoint opposing animal testing. Even a rule in a comment policy that appears viewpoint-neutral as written could be deemed viewpoint-based as applied through the use of customized filters that appear to intentionally target specific points of view.
Using Profanity/Offensive Content Filters
A more challenging question is whether a government entity may use filters to hide comments containing profanity or other offensive content. In addition to the customized keyword filters described above, some social media platforms allow users to select a standardized “profanity filter” option under which the platform, rather than the accountholder, determines what words or phrases are prohibited.
Facebook, for example, allows accountholders to turn on a profanity filter for their pages that automatically hides comments containing “offensive” words. Facebook “determine[s] what to hide by using the most commonly reported words and phrases marked offensive by the community.” (see Facebook’s explanation here). Similarly, Instagram allows accountholders to choose a “Hide unwanted comments” setting and to customize that setting so that the accountholders see no unwanted comments, “some” unwanted comments, or “more” unwanted comments (meaning, Instagram hides more than “some” comments but less than “none”). According to Instagram, “Comments containing common offensive words, phrases, or emojis that are likely to be abusive or mean, such as insults, sexual remarks, or personal attacks against an individual or group, are automatically hidden.” In other words, “unwanted comments” refers to a wide range of potentially offensive comments, not merely profanity.
For both Facebook and Instagram, Meta (the company that owns and operates both platforms) determines which comments will automatically be hidden by these filters, based on a list of words, phrases, or emojis known only to Meta and not available to the public. Therefore, a government entity opting into this type of platform-determined filter does not know which words or phrases are being deemed “offensive” or “unwanted” by the filter. Meta states on its website, for example, that it develops “market-specific slur lists” for different jurisdictions, but each user has no way to know which words are on the “slur list” for their jurisdiction.
Appellate courts have not ruled on this issue and very few cases from federal district courts have addressed it, so it is unclear how a government entity’s use of these platform-controlled filters might fare against a First Amendment challenge. For government social media pages that constitute designated public forums (i.e., those with no comment policy in place restricting the topics of discussion allowed on the page), federal district courts have widely concluded that the use of platform-controlled profanity filters is a content-based restriction that is likely unconstitutional. See, e.g., Scheffler v. Chitwood, No. 6:23-CV-1634-JSS-DCI, 2024 WL 4591246, at *5 (M.D. Fla. Oct. 28, 2024) (concluding that a profanity filter is likely a content-based restriction and collecting cases agreeing with that conclusion).
There is, however, a lack of case law regarding the use of profanity filters (or even manually imposed restrictions on profanity) on social media pages that constitute limited public forums. Unlike in designated public forums, where content-based speech restrictions are presumed unconstitutional, the government may impose a content-based restriction in a limited public forum, so long as the restriction is reasonable and viewpoint-neutral.
Consider the contrast between the two unreported decisions from federal district courts that have examined the use of profanity filters—one involving a designated public forum and the other involving a limited public forum. In Tanner v. Ziegenhorn, a federal district court analyzed the Arkansas State Police’s use of Facebook’s profanity filter and held that it was “unconstitutionally broad” as a restriction on speech in a designated public forum. No. 4:17-CV-780-DPM, 2021 WL 4502080, at *4 (E.D. Ark. Sept. 30, 2021), aff’d, No. 21-3462, 2023 WL 327848 (8th Cir. Jan. 20, 2023). While the court concluded that the agency’s objective to restrict profanity was “both reasonable and compelling” in light of the “constant presence of children in the State Police’s Facebook audience, as well as the family-friendly aim of the page,” it found the method by which the State Police achieved that goal was not sufficiently narrow. In the court’s words:
[T]he choice [of profanity filter] is overbroad. The State Police doesn’t know what words it is actually blocking. This information is apparently unavailable. Insofar as the testimony disclosed, Facebook’s community standards might filter out some words even if the State Police turned the page’s profanity filter off. The Court understands that Facebook has its own baseline community standards and changes them regularly. The State Police can’t do anything about that. Facebook’s control of which words it alone will and will not tolerate, though, doesn’t free the State Police from complying with the First Amendment in the filtering decisions the agency can make. . . . The Court holds only that the State Police’s current filter choice is not narrow enough for this designated public forum.
Conversely, in Scheffler v. Chitwood, a federal district court examined the use of Facebook’s profanity filter on a county sheriff’s office’s Facebook page and concluded that the use of the filter to hide comments did not violate the First Amendment. No. 6:23-CV-1634-JSS-DCI, 2024 WL 4591246, at *5 (M.D. Fla. Oct. 28, 2024). The court found that the page was a limited public forum due to the sheriff’s office’s posted social media policy, which limited the content allowed on the page to disseminating news and information about the sheriff’s office and sharing public health and safety announcements with the general public. Applying the standard for evaluating speech restrictions in a limited public forum, the court found that the restriction on profanity was viewpoint-neutral and reasonable in light of the stated purpose of the page.
Again, both Tanner and Scheffler are unreported decisions, and it remains unclear how federal appellate courts will rule on First Amendment challenges to similar restrictions. Undoubtedly, a court’s evaluation of whether a profanity restriction on a government social media page violates the First Amendment will depend on what type of forum the government created on the page, the purpose of the page, how the government applies the restriction in practice, and how filters are used to impose the restriction.
Based on the opaque nature of non-customizable, platform-controlled filters, it seems likely some courts will conclude that they fail the “reasonableness” criteria in a limited public forum, and even more likely that they will fail the “narrowly tailored” criteria in a designated public forum. While a government entity may have a reasonable objective behind hiding profanity or other objectionable content from a government social media page, it would be challenging to argue that using a platform-controlled filter is a reasonable method for accomplishing that objective. In order to survive a First Amendment challenge in a limited public forum, “the government’s means and ends must both be reasonable,” even though there is “no requirement that the restriction be narrowly tailored or that the Government’s interest be compelling.” White Coat Waste Project v. Greater Richmond Transit Co., 35 F.4th 179, 198 (4th Cir. 2022) (internal quotation marks, citations omitted). By electing to use one of these platform-controlled filters, a government entity is choosing to hide speech from public view without knowing what speech is being censored. In light of the Supreme Court’s ruling in Minnesota Voters Alliance v. Mansky, 585 U.S. 1 (2018), requiring the government’s discretion in restricting speech to be “guided by objective, workable standards,” it is unlikely that a government entity could defend the use of a non-customizable, platform-controlled filter when it cannot determine in advance what speech is being blocked from public view by the filter.
Alternatively, what if a government entity wants to choose a limited set of expletives to ban from its social media page, as opposed to using an opaque platform-controlled filter to hide that type of content? Under a First Amendment analysis, could it be deemed “reasonable” for a government entity to use a self-determined, customized keyword filter to narrowly target a discrete list of expletives and slurs? Possibly, but that remains unclear due to a lack of court decisions evaluating this type of restriction.
When determining whether (and how) to limit profanity in comments on an official social media page, government entities should consider the larger backdrop of First Amendment case law regarding profanity. It is well established that, absent a “particularized and compelling reason for its actions,” the government may not make “the simple public display [of a] single four-letter expletive a criminal offense.” Cohen v. California, 403 U.S. 15, 26 (1971). Prohibiting or deleting a comment on social media is, of course, a far less severe sanction than a criminal punishment. Nonetheless, “[i]f there is a bedrock principle underlying the First Amendment, it is that the government may not prohibit the expression of an idea simply because society finds the idea itself offensive or disagreeable.” Texas v. Johnson, 491 U.S. 397, 414 (1989) (collecting cases).
Final Thoughts
Using filters to hide comments on social media is filled with potential pitfalls for government agencies. User-determined keyword filters operate in an inflexible, context-blind manner by automatically hiding comments based on the presence of a single word or phrase—a mechanism that may fail the “reasonableness” test in the event of a First Amendment lawsuit. The use of customizable filters may also be viewpoint-discriminatory if the government uses them to intentionally hide comments that express a particular viewpoint. Turning on optional profanity/objectionable content filters that are controlled by social media platforms raises a separate set of concerns, given that when a government entity opts to use such filters, it does not know what speech is being hidden from its pages.
