This website is made possible by readers. I may earn a small commission when you buy through the links in this article at no extra cost to you. Learn more.
Ever scrolled mindlessly down your Facebook feed and spotted an interesting-looking thumbnail, only to realize that it's a sponsored post? Yep, talk about asshole design.
I'm a minimalist, and along with a minimalist wardrobe, I champion the right to choose the visual information you see.
I have nothing against ads, but I am all for the choice to opt out of it. As of 2019, I've also removed the ads from my website, opting for a donation model instead.
So, how do you block or hide these sponsored posts? These are the bread and butter of Facebook and are how they earn money, so the chances are that you will not get an option to turn them off.
But, I'm going to show you how to hide them completely for an ad-free Facebook experience
Step 1: Download the uBlock Origin browser extension.
uBlock Origin is the best adblocker on the market right now. It's not to be confused with uBlock, which is a monetized version. Why there are two versions is a saga that warrants an entire story. But the point is that you should download uBlock Origin, which is the original uBlock.
Download the extension for Chrome or Firefox. For Safari users, you are out of luck as Apple recently deprecated support for legacy extensions with Safari 13.
Step 2: Add a filter
Go to the extension options (Right-click on the extension icon and click on “Options”). A tab should open showing the uBlock Origin options. Click on the tab that reads “My filters” and add the following:
* Please see below for an updated code for Facebook's new layout because Facebook, being Facebook, has taken the step to randomize code to make it harder. This filter will no longer work for most.
Once you copy and paste the above code, it should look like the this.
This used to be an ad.
But no one likes ads, so I got rid of them. If my articles helped you, I ask for your support so I can continue to provide unbiased reviews and recommendations. Every cent donated through Patreon will go into improving the quality of this site.
Then, click on the “Apply changes” button that just turned orange and you're done.
Update: The New Facebook Layout
Recently, Facebook has rolled out its new design, and the code above may not work for some. I have unfollowed everyone and deactivated Facebook recently and might not be able to try the filters myself. So, please contribute in the comments below, and I will keep this guide updated.
If it doesn't work for you, try the following:
Facebook likes to move the code structure around and also Facebook serves different HTML depending on your region.
If this doesn't work, try any of the following filters. The reason the above might not work is because
facebook.com###facebook div[role="feed"] div > span > span > a > span > span[aria-label="Sponsored"]:upward(div[role="feed"] > div)
facebook.com###facebook div[role="feed"] div > span > span > a > span[aria-label="Sponsored"]:upward(div[role="feed"] > div)
Please post your solution in the comments below if you find one that works.
Confirm if it works
Go to your Facebook Newsfeed or refresh if you were on the page before, and Sponsored Posts should no longer appear.
Note that Facebook is continuously updating its code to circumvent this kind of block, so please leave a comment if you find that it doesn't work, and I'll see if I can find a way to break the code.
I designed a thing.
I found a 100 year old company that would create these heirloom quality canisters for me. They are handmade and will keep your tea leaves, coffee beans or anything that you need dry for years to come.
or read review
Help me empower privacy
As an advocate of a focused web browsing experience and recommending you adblockers, I am essentially helping you block out ads or affiliate links or any of the common ways a content creator like me can make a living.
So, I ask for your help the only way I know how, which is through donations. You can help me make more guides like this by becoming a Patreon or even just buying me a coffee if this information has helped make your life even a little better.
More: Want to take digital minimalism further? See how I unfollowed everyone on Facebook.
Just today, something changed on FB where my adblocker didn’t work. So far this seems to do the trick. Thank you!
I’m glad it helped. Let me know if/when it stops working and I’ll find another way.
It works. Thanks. Great page too, by the way.
I CAN’T STOP CRYING FLOODS OF SHEER JOY! FINALLY got rid of the sponsored garbage! Thanks Alex!
Doesn’t work anymore. 🙁
It works. Just tried it using the Stylish extension on Firefox. Thank you so much for this!!
If you switch back to the classic Facebook, it’d still work!
Any progress on this for the new layout? Above is not working for me. Thanks!
This filter works for me:
The ‘Sponsored’ label might be different depending on your language setting. Just replace it with whatever is shown on those sponsored posts.
This just hides the word “sponsored” as soon as I hover over it with my cursor. The rest of the div is still there.
Putting this in worked for me. I also tried and failed at a bunch of other attempts which i’ll list here for future’s sake:
!facebook.com##div[data-pagelet^=”FeedUnit_”]:has(div[class=”oajrlxb2 g5ia77u1 qu0x051f esr5mh6w e9989ue4 r7d6kgcz rq0escxv nhd2j8a9 nc684nl6 p7hjln8o kvgmc6g5 cxmmr5t8 oygrvhab hcukyx3x jb3vyjys rz4wbd8a qt6c0cv9 a8nywdso i1ao9s8h esuyzwwr f1sip0of lzcic4wl gmql0nx0 gpro0wi8 b1v8xokw”] Sponsored)
Just hid the word Sponsored for me, too. I tried all of the filters here, still my FB wall is filled with Sponsored posts, like every 3rd one. KIlling me, Smalls 😛
Tried the first filter – was a no-go. Newer, second filter working fo center page newsfeed column, but sponsored ads still appearing in right panel of display. Any filters to address those, as well? THANK YOU
I added another filter to the article, could you give it a try?
None of the filters worked for me.
I’m wondering if this only works for PCs, because my MacBook doesn’t have an “Options” option when I right-click on the icon…
Yes, it should work. I am using a Mac too.
You are a blessing to mankind.
This works for French Facebook (“Sponsorisé”):
Try this one :
facebook.com##div[data-pagelet]:nth-of-type(5n + 2)
non of these works anymore
Added the last 3 filters. It works flawlessly! Thank you!
Tried the last 3 filters in Firefox. None worked; middle column of Facebook still filled with sponsored ads.
For French version of Facebook (change “Sponsorisé” and “Annonceur” for other languages) :
facebook.com###facebook div[role=”feed”] div[role=”article”] a[aria-label=”Sponsorisé”]:upward(div[role=”article”] > div)
facebook.com###facebook div[data-pagelet=”RightRail”] a[aria-label=”Annonceur”]
Found this page today, and after inspecting Facebook to figure out what would work, I was able to tweak one of the revised ones to fit the current Facebook scheme in the US:
facebook.com###facebook div[role=”feed”] div > span > span > span > span > a[aria-label=”Sponsored”]:upward(div[role=”feed”] > div)
I just tried all of the fixes. I gues Facebook switched things around because they all only worked for a minute each before my timeline reverted back to ads.