Block All Contacts on WhatsApp [How To]

Share this article with your friends and peers...

At times in life, you feel weird that you don't want anyone in your life. You may sometimes feel like you want to block everyone in your life or with some exception. If you are in such a situation, then this post will help you to block all contacts on WhatsApp with a single script. Don't worry; I have also added a way to unblock them all.

To block all contacts on WhatsApp, you need a computer with you as we do this trick using WhatsApp Web. Thus, this method is not restricted for Android or iOS or Windows Phone. It works for all.

Steps to block all contacts on WhatsApp

  1. Make sure your phone is connected to the internet using mobile data or WiFi.
  2. Go to from your computer and sign-in to your WhatsApp.
  3. Click on three vertical dot menu icon and choose Settings.
  4. Click on Blocked.
  5. Now right-click anywhere and choose Inspect Element.
  6. Press Esc key on your keyboard and paste the following code.
    var cl = document.getElementsByClassName('chat-body');
    for(var i=0;i<cl.length;i++) cl[i].click();
    Block all contacts on WhatsApp
  7. Press Enter to run the code.

Steps to unblock all contacts on WhatsApp

To unblock all contacts on WhatsApp, we need an additional browser extension, iMacros.

  1. Make sure you have logged into WhatsApp Web.
  2. Now click on three vertical dot icon and choose Settings.
  3. Click Blocked.
  4. Click on iMacros extension icon available on the top right corner of your Google Chrome.
  5. Right-click on #Current.iim and choose Edit Macro.
  6. Paste the following code.
    URL GOTO="javascript:document.getElementsByClassName('chat-body')[0].click(); document.getElementsByClassName('popup-controls-item')[1].click();"
  7. Save the file and close it.
  8. Enter some highest number on Max value on the iMacros window.
  9. Click on Play Loop to start unblocking all contacts on WhatsApp.

If you have any queries, please comment them below. You can also suggest tricks to us to experiment and post on this blog.


  1. iMacros Extension for Google Chrome
Share this article with your friends and peers...

10 people commented. Join the conversation.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • Ha ha.. Funny trick.. Its better you to uninstall whatsapp rather than blocking all the contacts. If you block all the contacts then there will be no use on keeping app in your mobile.. 😀

    • Arjun says:

      Exactly! But you can still keep track of group messages. 😉

      • renjith says:

        The code you mentioned above is picking the first one from blocked list and click - this will result in a popup to unblock. How to iterate through the contact list and do the click action. Seems contact list is loading on demand

        • Arjun says:

          We have received a lot of messages regarding this on our Facebook page. WhatsApp has changed the UI to block people. This script works for the older UI. We are revising the script so that it works on the new UI too. Thanks! We will notify once this is fixed.

  • Georges Fayad says:

    Dear Arjun,
    It is very important to be able to block all whatsapp contacts at once.
    I am trying your proposed code but it is not running.
    Can you give me more guidance on how to proceed.
    Thanks in advance.

    • Arjun says:

      This trick was working in the old interface of WhatsApp Web. After there were few changes in WhatsApp Web, this code did not work. I am trying out new code to block all contacts on WhatsApp. I will post once I get succeed with it.

  • Vinayak says:

    Hello ,

    Any app to hide the block contact on iphone whats app. Or how i can hide the block contact also so no one can see who are there in block list. it will help a lot

  • sara says:

    Hello, have you managed to run a new code?