Tutorial: How to Disable JavaScript on Tor Browser?

Tom VincentApril 11, 2024
Webmaster - DTechClub
Fact checked by a Tor Browser specialist

In this article you will learn how to disable JavaScript on Tor Browser. We will show you 3 simple methods (+ 1 bonus method) to disable JavaScript in Tor.

Most Tor Browser users don't turn off Javascript. However, onion sites (websites on Tor) may exploit vulnerabilities by utilizing JS, so it's best to disable it.

In the past, a vulnerability allowed onion websites to see the real IP address of Tor users.

Method 1 to disable JS on Tor: Edit the about:config settings

This method is the easiest because you have nothing to install. We simply need to adjust Tor Browser's settings a bit.

Here are the detailed steps:

  1. Type "about:config" in the Tor browser URL bar.
  2. Accept the confirmation message by clicking the blue button.
  3. Type "javascript.enabled" in the search bar
  4. Double click on "True" to change it to "False". Thus Tor will disable JavaScript on his own.
Javascript disable tor about config

Before running Tor Browser, you should change your original IP address with PureVPN to prevent potential vulnerabilities on Tor. I've been using it for years, it's a reliable VPN that's log-free.

Before starting Tor, you should connect to a VPN:
PureVPN will make you way more anonymous
We recommend changing your original IP address with PureVPN, a reliable logs-free VPN. This helps prevent potential vulnerabilities on Tor.
➡️ Get PureVPN

Method 2: Use the JavaScript Switcher addon

The second method is suitable for you if on some occasions you need to leave JS enabled. With the addon I am going to show you, you can toggle JavaScript on and off with one click.

Here are the 3 steps to use JavaScript Switcher in Tor Browser:

  1. Install JavaScript Switcher on this page and click on "Add to Firefox".
  2. Then you will see a small "JS" button to the right of the URL. When it is grayed out, JavaScript is disabled, and when it is green javascript is enabled. 
  3. To switch between the two states you just have to click on this button.
Javascript Switcher tor

At the beginning, I got confused many times with the colors (which one disables JS and which one enables it). But once you begin to use it regularly, you will find the JavaScript switcher addon very helpful.

If you don’t want to install this addon, you should check out the last method!

Method 3: Disable JavaScript in Tor settings

For this last method we'll go through Tor's security settings to turn off JS.

Here is how to do it:

  1. Open the Tor settings menu at the right 
  2. Select "Preferences"
  3. Click on "Privacy and Security"
  4. Select "Safest" to disable javascript on all sites (scroll almost all the way down to find the security level settings).
security safest tor

The third and last method is this but I recommend you to first consider methods 1 and 2. In the past, there was a bug with this option: even if users enabled the « Safest » mode, websites were still being able to execute JavaScript code. (source)

And to be even more secure on Tor, I recommend you to use a VPN. It will change your IP address and you will be anonymous.

The VPN will provide an extra layer of security to prevent potential vulnerabilities in Tor. So if there is a vulnerability in Tor when you are using a VPN, then your IP address that will not be visible.

Secure VPNs and Tor are both excellent tools to keep its confidentiality. But combine the two, and you have a powerful tool!

For Tor, I like to use PureVPN where there is an option for servers dedicated to security and privacy.

Using it with Tor is simple. Before running Tor, open PureVPN and connect to a VPN server. Then you can open Tor, and you'll be even more secure.

Bonus: Disable JS only on non-HTTPS websites

On Tor Browser Bundle, I found out recently that you can disable JavaScript only on websites that don’t have a secure certificate (non HTTPS websites).

This is almost the same method as the third but you have to select the "Safer" mode rather than the "Safest". This will set Tor disabling JS only on http websites.

As I said, the steps are quite similar compared to the third method.

  1. Open the Tor settings menu at the right 
  2. Select "Preferences"
  3. Click on "Privacy and Security"
  4. Select "Safer" to disable JS on non-secured websites.
security safer tor

Conclusion 

Before you go back to Tor to turn off Javascript, you should really change your IP address to be completely anonymous and protected from attacks. Connecting to a VPN like PureVPN before launching Tor is a good trick to be completely safe, even if Tor has a flaw.

Remember, Tor Project is a software project that aims to help developers create online anonymity. Unlike Google Chrome or Microsoft Edge, Tor's goal is to make online privacy as easy as possible.

It is a privacy tool that can hide your IP address and enable you to get past firewalls and access websites that are blocked in certain areas of the world.

And if you want to know how to access the deep web safely, here are some guides I created for all devices:

About the Author: Tom
Tom is the founder of DTechClub.com and has been fascinated by VPNs since 2012. He writes about online privacy, is always testing VPNs (both new and existing services), and is highly interested in the challenges of accessing certain sites and content in various regions. In addition to his interest in VPNs, he loves indie films and playing flamenco guitar.
Share this Article:

More Recent Articles About 

magnifiercrosschevron-downarrow-rightcheckmark-circle