Privacy

How to Disable JavaScript in Tor Browser (Safest Level, Step by Step)

Tor Browser has no plain JavaScript off switch — the Safest security level is the switch the Tor Project built for this job, and it blocks JavaScript on every site.

Cysoro Security TeamPublished · 7 min read
Tor BrowserSecurity: SafestJavaScript: OFF Shield PRIVACY DisableJavaScript in Tor Browser — Safest level.
Quick answer

To disable JavaScript in Tor Browser, click the shield icon next to the address bar, open Settings, and set the Security Level to Safest. At Safest, Tor Browser disables JavaScript by default on all sites. Safer only disables JavaScript on non-HTTPS sites, so it is not enough if you want JavaScript off everywhere. Reload your open tabs, and use the built-in NoScript add-on to allow JavaScript on one trusted site at a time.

Key takeaways

  • Set the Security Level to Safest — that is Tor Browser's built-in JavaScript off switch, and it blocks JavaScript on all sites.
  • Safer only blocks JavaScript on non-HTTPS sites, so it leaves JavaScript running on almost every modern site.
  • Use NoScript for per-site exceptions, and do not change hidden about:config settings — they can make your browser stand out from other Tor users.

Tor Browser routes your traffic through the Tor network to hide who you are, but JavaScript can undo that work: scripts can measure your screen, fonts and hardware, exploit browser bugs, and in the worst case deanonymize you. Tor Browser has no plain "JavaScript off" button — but it does have a switch built for exactly this job.

How do I disable JavaScript in Tor Browser?

Click the shield icon next to the address bar, open Settings, and set the Security Level to Safest. At Safest, Tor Browser disables JavaScript by default on all sites, according to the Tor Project manual. Reload your open tabs so the change applies.

That is the whole method for most people. There is no need to install anything, edit hidden settings, or use a separate extension — the Tor Project built this control into the browser, and its manual recommends it over any other approach.

Disable JavaScript in Tor Browser in 3 steps1Click the shieldnext to the addressbar, then Settings2Security Levelin Privacy andSecurity settings3Choose SafestJavaScript off onall sitesReload open tabs. Restart if Tor Browser asks you to.
Three steps to disable JavaScript in Tor Browser. Illustration by Cysoro.

What do the three Tor security levels do to JavaScript?

Tor Browser has three security levels, and it starts on Standard. Increasing the level disables or partially disables browser features to protect against attacks, and the Tor Project warns that it may stop some pages working properly — so weigh security against usability.

LevelJavaScriptOther changes
StandardOn for every siteAll browser and website features enabled; the default
SaferOff on non-HTTPS sites onlySome fonts and math symbols disabled; audio and video click-to-play
SafestOff on all sitesSome fonts, icons, math symbols and images disabled; audio and video click-to-play

Safer is not enough if you want JavaScript off. Almost every site uses HTTPS now, so Safer leaves JavaScript running nearly everywhere you actually visit. Use Safer for everyday browsing when you want a little extra protection without breaking sites, and switch to Safest when you visit sites you do not trust or when privacy matters most.

How to disable JavaScript on desktop (Windows, Mac, Linux)

On desktop, the shield icon is the fastest path. If you cannot see it, use the menu instead — both lead to the same setting.

  1. Open Tor Browser and connect as usual.
  2. Click the shield icon to the right of the address bar.
  3. Click Settings in the shield menu.
  4. Select Safest under Security Level.
  5. Save and restart if Tor Browser asks. It closes and opens again with the new level.
  6. Reload your open tabs so the change applies to pages already loaded.

If there is no shield icon, open the menu (three lines, top right), then Settings, then Privacy and Security, scroll to Security Level, and pick Safest there. The setting applies to the whole browser on that device.

How to disable JavaScript on Android

Tor Browser for Android has the same three levels, and the same Safest setting turns JavaScript off on every site. The setting is per device, so set it on your phone separately from your computer.

  1. Open Tor Browser on your phone.
  2. Tap the three-dot menu (or the three-line menu, depending on the version).
  3. Tap Settings, then Privacy and security.
  4. Tap Security Level and select Safest.
  5. Save and restart if Tor Browser asks.

On iPhone there is no Tor Browser. The app most people use is Onion Browser, which names its levels Bronze, Silver and Gold — Gold is the strictest level and is closest to Tor Browser's Safest. Set Default Security to Gold in Onion Browser's settings.

Why disable JavaScript in Tor Browser?

JavaScript is a programming language websites use for interactive elements such as video, animation, audio and timelines. Unfortunately, JavaScript can also enable attacks on the security of the browser, which might lead to deanonymization, according to the Tor Project manual.

Scripts can fingerprint your browser by measuring your screen size, fonts, hardware and installed features. They can exploit browser bugs to run code on your machine. And they run code from every third-party domain a page loads, not just the site you chose to visit. Turning JavaScript off removes that whole attack surface at once.

That is also why the Tor Project ships NoScript with Tor Browser and configures it to allow JavaScript by default: many websites will not work with JavaScript disabled, and most users would give up on Tor entirely if it were off. The project chose usability by default, and Safest for people who need the stronger setting.

How to allow JavaScript on one site only with NoScript

At Safest, some sites you trust may stop working — logins, menus, maps and web apps often need scripts. Tor Browser includes the NoScript add-on, which lets you make exceptions for one site while keeping Safest for everything else.

Allow JavaScript on one site only, with NoScript1Show the buttonAdd-ons and themes,NoScript, Show2Open the siteclick the NoScripticon by the address bar3Trust it — brieflyTemporarily trust issafer than TrustEvery exception makes your browser easier to tell apart. Keep them few.
NoScript lets you trust one site at a time while keeping Safest everywhere else. Illustration by Cysoro.
  1. Show the NoScript button. Open the hamburger menu, then Add-ons and themes, find NoScript, and next to Toolbar button select Show. The button appears to the right of the address bar.
  2. Open the site that needs JavaScript, and click the NoScript icon.
  3. Choose Temporarily trust for that site if you only need it once, or Trust if you use it regularly. Temporarily trust is safer, because the exception ends when you close the browser.

Use exceptions only on sites you really need. NoScript lets JavaScript and other potentially harmful content run only on sites you trust, and every exception makes your browser a little easier to tell apart from other Tor users.

How to check JavaScript is really off

Do not take the setting on trust. Test it with a tiny page you make yourself, so no third-party site is involved.

  1. Open a plain text editor such as Notepad or TextEdit.
  2. Paste this and save it as js-test.html: a page whose plain text says JavaScript is OFF, with a short script that changes the text to JavaScript is ON if scripts are allowed to run.
  3. Open the file in Tor Browser with Ctrl+O on Windows and Linux, or Cmd+O on Mac.
  4. Read the heading. If it still says JavaScript is OFF, scripts were blocked. If it says JavaScript is ON, a script ran — go back and check that Safest is selected and the browser restarted.

A simpler check works too: visit a site that needs JavaScript, such as a web app login page. If it shows a "Please enable JavaScript" message, JavaScript is off. The Tor Project's manual page on security levels confirms what Safest blocks, and NoScript's own site explains how its per-site trust works.

You can also check what your browser leaks with the free WebRTC leak test.

Your IP address is another check: use the what is my IP tool to see what a site sees.

What not to do: about:config and extra add-ons

Two shortcuts look tempting and both make you less safe, not more. The Tor Project manual warns against both.

  • Do not use about:config to set javascript.enabled to false. It works, but the manual recommends the Security Level instead. Hidden settings can make your browser's fingerprint unique, and a unique fingerprint can deanonymize you even though you are using Tor. Tor Browser is engineered so every user looks nearly identical; changing hidden settings breaks that.
  • Do not install extra add-ons. The manual says installing any add-on other than those included by default is strongly discouraged, because it may break functionality or affect your privacy and security, and it can make your fingerprint unique. Tor Browser already includes NoScript, and adding anything else could deanonymize you.
  • Do not log in to accounts that identify you while using Tor for anonymity, and do not maximize the browser window — Tor Browser warns that a maximized window reveals your screen size.
Stay identical to other Tor usersTor's anonymity depends on every user looking the same. Safest, NoScript exceptions kept few, no extra add-ons, and no hidden settings — that is the combination that keeps your fingerprint ordinary.

Troubleshooting: sites break at Safest

Most problems at Safest have the same cause: the site needs JavaScript, and you turned it off. Work through them in order.

  • A site shows "Please enable JavaScript". The site needs scripts. Use Safer for that session, or trust only that site in NoScript.
  • JavaScript still runs on some sites. You are probably on Safer, which only blocks JavaScript on sites without HTTPS. Choose Safest instead.
  • Videos will not play. At Safer and Safest, audio and video are click-to-play. Click the media to play it.
  • Fonts or icons look wrong. Safest disables some fonts, icons and images. That is expected — the page is still readable, and the trade-off is the point.
  • No NoScript icon. It is hidden by default. Show it through Add-ons and themes, as described above.
  • The change did not apply. Reload open tabs, and restart Tor Browser if it asks. The level applies to the whole browser, on each device separately.

The bottom line

To disable JavaScript in Tor Browser, set the Security Level to Safest — that is the switch the Tor Project built for this job, and it blocks JavaScript on every site. Use Safer for everyday browsing, Safest when privacy matters most, and NoScript for the few trusted sites that need scripts.

Do not reach for about:config or extra add-ons. They make your browser stand out, which is the opposite of what Tor is for. You can check what your browser reveals right now with the free WebRTC leak test.

Frequently asked questions

How do I disable JavaScript in Tor Browser?

Click the shield icon next to the address bar, or open Menu, then Settings, then Privacy and Security, and set the Security Level to Safest. At Safest, Tor Browser blocks JavaScript on every site. Reload your open tabs so the change applies, and restart the browser if it asks you to.

Is JavaScript enabled by default in Tor Browser?

Yes. Tor Browser starts at the Standard security level, where JavaScript and all website features are enabled. The Tor Project leaves it on by default because many websites will not work without JavaScript, and most users would give up on Tor entirely if it were off. You have to choose Safer or Safest to turn it off.

What is the difference between Safer and Safest in Tor Browser?

Safer disables JavaScript only on sites without HTTPS, and disables some fonts and math symbols. Safest disables JavaScript on all sites, and also limits some fonts, icons, math symbols and images. In both levels, audio and video become click-to-play. Almost every site uses HTTPS now, so Safer leaves JavaScript running nearly everywhere.

How do I disable JavaScript in Tor Browser on Android?

Open Tor Browser on your phone, tap the menu, open Settings, go to Privacy and security, tap Security Level and choose Safest. The levels mean the same on Android as on desktop, but the setting is per device, so set it on each device separately.

Can I allow JavaScript on one site only in Tor Browser?

Yes, with NoScript, the add-on Tor Browser already includes. Show the NoScript button through Add-ons and themes, open the site, click the NoScript icon and choose Trust or Temporarily trust for that site. Keep exceptions few, because every exception makes your browser easier to tell apart from other Tor users.

Should I disable JavaScript with about:config in Tor Browser?

No. You can set javascript.enabled to false in about:config, and it works, but the Tor Project's manual recommends using the Security Level instead. Changing hidden settings can make your browser's fingerprint unique, which can deanonymize you even though you are using Tor. Use Safest, and NoScript for exceptions.

Does disabling JavaScript make Tor Browser completely safe?

No. Disabling JavaScript removes a large attack surface — JavaScript can enable attacks that lead to deanonymization, according to the Tor Project manual — but it does not make you anonymous on its own. You still need to avoid logging in to accounts that identify you, avoid installing extra add-ons, and keep Tor Browser updated.

Sources

  1. Tor Project — Tor Browser Manual: Security Levels
  2. Tor Project — Tor Browser Manual: Plugins, Add-ons and JavaScript
  3. NoScript — NoScript Security Suite
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against the Tor Project's Tor Browser Manual pages on security levels and on plugins, add-ons and JavaScript, and NoScript's own documentation.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free