change your location in Chrome and Firefox

Firefox and Chrome browsers come equipped with geolocation services that can accurately pinpoint your location. Although this feature has its benefits, there are instances when you may want to hide or spoof your browser location. Whether you wish to access region-locked content or safeguard your privacy, several methods are available.

We explore in detail the various options to achieve your desired location change, ensuring you have all the necessary information to make informed decisions. Our team has conducted extensive research and testing to present you with reliable and effective techniques.

Some popular methods include using a Virtual Private Network (VPN), manually spoofing your location, or employing dedicated browser extensions. Depending on the situation, you may need to combine multiple methods to bypass different detection mechanisms. In this post, we’ll delve into all of these options for you.

How to spoof your location using a VPN

Even if you’ve never used a VPN before, setting one up is very straightforward. Here’s how to change your IP address in Firefox or Chrome with a VPN:

  1. Choose a provider, select a subscription term, and submit your payment. (We recommend NordVPN)
  2. Download the appropriate VPN software for your device. Most reputable VPN providers offer native apps for Windows, MacOS, iOS, and Android.
  3. Log in using your username and password (which will be provided when you signed up).
  4. Connect to a VPN server in the location of your choice. For example, if you want to watch US Netflix, you’d select a US server. You’ll now have a different IP address which makes it appear you’re in that location.

However, it’s crucial to note that not all VPNs can unblock geo-restricted sites successfully. Streaming, gaming, and gambling services, among others, have developed ways to identify proxy usage, including VPNs. Many free VPNs may fall short of evading such detection. Before signing up for a VPN service, you should check with the provider to ensure it can grant access to your desired services (you can check here for VPNs working with Neflix, Amazon Prime, BBC iPlayer and Hulu).

WANT TO TRY THE TOP VPN RISK FREE?

NordVPN is offering a fully-featured risk-free 30-day trial if you sign up at this page. This lets you use a zero-logs VPN with servers in 59 countries, without restriction, for a month — more than enough time to tell if it's a good fit or not. 

There are no hidden termsjust contact support within 30 days if you decide NordVPN isn't right for you and you'll get a full refund. Start your NordVPN trial here.

How to spoof your location using HTML5

Spoofing your location using HTML5 can help access region-specific content, bypassing restrictions on certain websites and protecting your privacy. This section will discuss how to spoof your location in Chrome and Firefox using developer tools.

Chrome Browser

You can manually spoof your location using Chrome’s Developer Tools:

  • Press Ctrl+Shift+I (Windows) or Cmd+Option+I (Mac) to open the Chrome Developer Tools window.
  • Press Esc, then click the Console menu (the three dots to the left of Console in the lower portion of the screen).
  • Select Sensors and change the Geolocation dropdown to Custom location.
  • Enter any latitude and longitude you want.

Firefox Browser

You can manually change your location in Firefox using the about:config settings:

  • Type about:config in the address bar and press Enter.
  • Click “Accept the Risk and Continue” if prompted.
  • Search for “geo.provider.network.url” and click the “Pen” icon to edit it. Replace the URL with a custom location using the format data:application/json,{“location”: {“lat”: LATITUDE, “lng”: LONGITUDE}, “accuracy”: ACCURACY}.
  • Replace LATITUDE, LONGITUDE, and ACCURACY with the desired values.

Following these methods, you can successfully spoof your location using HTML5 in Chrome and Firefox browsers. Remember that some websites may still be able to detect your location through other means, such as your IP address. In such cases, consider using a VPN for additional privacy protection.

How Firefox and Chrome can detect your location

Let’s take a look at how Firefox and Chrome know where you are. One of the easiest ways for Firefox, Chrome, and any other online service to tell where you’re located is through your IP address. This is a unique set of digits (and symbols in the newer IPv6) that identifies each computer connected to the internet. Part of the IP address can be used to determine your location. As such, masking your real IP address and replacing it with another one can spoof your location, making it appear that you’re located somewhere else.

However, some browsers have other methods that can decipher where you are. For example, they can use nearby wifi networks to geolocate a device even without an IP address. Turning off wifi and Bluetooth can be one option, but the likelihood is that you’ll need one or both of these, so it’s simply not an option for most users.

Using a VPN will enable you to easily change your IP address, replacing your existing one with another from a location of your choice. However, this may not bypass other geolocation services used by the browser. To overcome this issue, you can manually change your location in your browser or use an extension such as Location Guard.

Use a VPN to change your location in Firefox or Chrome

A Virtual Private Network (VPN) works by encrypting your internet traffic and tunneling it through an intermediary server. The two major benefits of a VPN are:

  • Encryption: The encryption factor means your internet traffic is completely secure and no one can decipher it, even if they manage to intercept it. This applies to ISPs, government agencies, cybercriminals, and anyone else who might be snooping on your activity.
  • Location spoofing: Because your traffic is tunneled through an intermediary server, you will be assigned an IP address from that server. When using a VPN, you can choose the location of the server you connect to and hence select where your IP address is from.

Note: the VPN will only spoof your location in terms of your IP address. So even when you’re using a VPN, your browser might be able to detect your location. As such, you may need to still manually spoof your location within the browser or use an extension like Location Guard (more on that below).

You’ll probably notice that some VPNs come with dedicated browser extensions for Firefox, Chrome, and other browsers. These can be great for location spoofing, but note that most of these do not encrypt your internet traffic when used alone.

One extension that’s a bit different from the others is the addon provided by ExpressVPN. Its Chrome and Firefox extensions act as remote controls for the device-level VPN apps, but they also automatically adjust the browser’s geolocation services. As such, the detected location matches that of the VPN server you’re connected to. This means that you don’t need to do anything else except connect to your chosen VPN server.

The best VPNs for changing location on Chrome and Firefox

You have hundreds (if not thousands) of VPNs to choose from, all of which allow you to change location on Chrome and Firefox, as well as Edge, Brave, and more.

All of the best VPNs for changing location on Chrome and Firefox provide desktop and mobile apps. Most also offer Chrome and Firefox browser extensions as well (although browser extensions only secure browser traffic):

  1. NordVPN: The best VPN for changing location on Chrome and Firefox. 5,000+ servers and fast speeds. P2P and Double VPN servers. 24/7 support.
    TIP In our testing we found that the cheapest NordVPN plan (Standard) works perfectly for Chrome and Firefox.
  2. Surfshark: Best value VPN for changing browser location. Servers in 100 countries. High-speed servers and unlimited simultaneous connections per account. MultiHop servers included.
  3. ExpressVPN: Offer 3,000+ servers in 94 countries with no bandwidth throttling. Highly secure with encryption and doesn’t keep identifying logs of its users.
  4. CyberGhost: Huge network of more than 9,000 servers makes it perfect for location spoofing. Very good speeds and allows seven simultaneous connections. Strict no-logs policy protects privacy.
  5. IPVanish: One of the fastest VPNs available. Ideal for streaming and torrenting. Secure all of your devices at once. Owns and operates its servers.
  6. PrivateVPN: Servers in 60 countries and very strong unblocking. Free remote help and installation available. No-logs policy — not even connection logs.
  7. Atlas VPN: Growing server network and more than fast enough for streaming. Works with popular streaming services. Unlimited simultaneous connections.

Our top choice: NordVPN

Apps Available:

  • PC
  • Mac
  • IOS
  • Android
  • Linux
  • Background FireTV

Website:  www.NordVPN.com

Money-back guarantee: 30 DAYS

We’ve put a plethora of the top-rated VPNs through some rigorous testing, and NordVPN comes out on top each time. Indeed, this is the VPN provider we recommend for use with Firefox and Chrome. Based in Panama, NordVPN operates a network of more than 5,000 servers spanning 59 countries.

It provides users with exceptionally fast, reliable connections that are ideal for streaming, and is capable of unlocking a ton of geo-restricted sites. You can easily stream Netflix US (and other Netflix libraries), Hulu, HBO, BBC iPlayer, Amazon Prime Video, and lots more. If you have any issues finding the right server to connect to, a 24/7 live chat customer service agent is always available to help.

Included in every NordVPN subscription are apps for Windows, MacOS, Linux, iOS, and Android. Chrome and Firefox users can download dedicated browser extensions which can be used as remote controls for the appropriate VPN app.

When you connect to a server, NordVPN’s browser extension will automatically change your Firefox or Chrome geolocation data to match the VPN location you’re connected to. This means that as long as you’re using the VPN, you never have to worry about changing any settings manually; just connect to the appropriate server and you’re good to go.

NordVPN is just as impressive when it comes to privacy and security. It uses 256-bit encryption which is considered “military-grade,” and this comes with perfect forward secrecy. You also get the best leak protection in the industry and a built-in kill switch. This means you can rest assured your data will always remain safe inside the encrypted tunnel.

NordVPN speed test data

No valueNordVPN
WebsiteNordVPN.com
Average Connection Speed - North America (USA)354 Mbps
Average Connection Speed - Europe (UK)262 Mbps
Average Connection Speed - Asia (Hong Kong)284 Mbps
Best deal (per month)$3.09
Up to 69% off + 3 months FREE

Pros:

  • A large selection of servers
  • Strong security and privacy features
  • A strict no-logs policy
  • Pay anonymously with Bitcoin
  • User-friendly apps and browser extensions

Cons:

  • The desktop app can be slow to connect

Our score:

4.5 out of 5

BEST VPN FOR CHANGING BROWSER LOCATION:NordVPN is our top recommendation. There are thousands of servers worldwide, so you can get an IP address from almost anywhere. Fast speeds make it ideal for streaming, and there is a 30-day money-back guarantee.

Read our full review of NordVPN.

NordVPN Coupon
Up to 69% off + 3 months FREE
Get Deal >
Discount applied automatically

How to manually spoof your location

If you’re just setting up Firefox or Chrome, as part of the setup process, you’ll be asked if you want to allow location services. You can simply deny this request, and for Firefox, you can skip the first set of instructions below.

But chances are you’re doing this after initial setup. In this case, you’ll need to turn the geolocation services off manually. Plus, it doesn’t help with actually changing your location, so you’ll need to do that manually too.

Manually change your location in Firefox

Here’s how to spoof your location in Firefox:

  1. Type about:config in your browser. A warning will pop up to tell you about the risk involved in altering the advanced settings. As long as you’re happy to go ahead, click I accept the risk!
  2. Look for the setting geo.enabled.
  3. The value column should read “true.” Double click it to set it to “false.”

The geo.enabled row highlighted.

Note that this will only stop Firefox tracking your location. To set a new location, you can continue with the following steps:

  1. Still in about:config, look for the setting geo.wifi.uri.
  2. Change this to the location you want to “be” in. To do this, you have to enter a specific longitude and latitude value. You can use the following line of code but replace the values: data:application/json,{"location": {"lat": 40.7590, "lng": -73.9845}, "accuracy": 27000.0}

The geo-wifi.uri row highlighted.

The above example from a Stack Exchange user will put you in Times Square, but you can change it to wherever you want by tweaking the latitude and longitude values. There are plenty of tools to help you find out these numbers such as GPS Coordinates and LatLong.net.

Note that if you ever want to revert back to the default settings, you can right click anywhere on the geo.wifi.uri row and select Reset.

Manually change your location in Chrome

In Chrome, you can use the following instructions to spoof your location:

  1. In a browser window, hit Ctrl+Shift+I (for Windows) or Cmd+Option+I (for MacOS). This will open the Chrome Developer Tools window.
  2. Hit Esc, then click the Console menu (three dots to the left of Console in the lower portion of the screen).
  3. Select Sensors and change the Geolocation dropdown to Custom location…
  4. Enter any latitude and longitude you want.

Chrome Developer Tools screen.

Alternatively, you can choose one of the preset options in the Geolocation menu, including Berlin, Mumbai, or San Francisco.

Note that for the location override to work in Chrome, you have to keep the developer tools open and stay in the same browser window. If you open a new window, it will revert back to your original location. This is different to Firefox where you can open multiple windows and still have your location spoofed.

To check if these processes have worked in either browser, you can test it using a tool such as BrowserLeaks.

The Browserleaks.net test.

In the above screenshot, you can see that we managed to spoof our location to make it appear that we were actually in Times Square.

Use the Location Guard addon

If you’re happy to let an addon do the work for you, you might want to try Location Guard. This extension has two major uses:

  • Lower accuracy of location detection: If you’re concerned about privacy but still want to appear that you’re in the same general location, you can use this extension to hide your exact location. This means you can still enjoy the perks of geolocation services (such as local search results), without having to let browsers and third parties know exactly where you are. You can choose the level of “noise” added depending on how much you want to mask your location.

Location Guard Privacy Levels page.

  • Spoof your location: Another option is to use Location Guard’s Fixed Location feature which basically does what we did earlier: enables you to select an exact location you want to appear to be in.

Location Guard Fixed Location page.

To use the Fixed Location feature:

  1. Install the Location Guard extension for Firefox or Chrome.
  2. Go to Options and change Default Level to Use fixed location.
  3. Go to Fixed Location and choose a location on the map. You can either find your desired location manually or enter an address in the search bar. Just make sure that you “place” the pointer in your desired location — you’ll have to actually click on the map to put it in place.

Location Guard Options page.

Location Guard’s setup is an arguably easier option than the manual steps we outlined earlier. Plus, the extension offers an attractive and intuitive interface. Although, there is the issue that you’re using another extension, so it might not be the most ideal option for privacy-conscious users. While it worked for us, there have been complaints from some users that it hasn’t worked consistently.

WebRTC blocking

One more factor to be concerned about is WebRTC leaks. WebRTC, or Web Real-Time Communication helps facilitate audio and video browser-to-browser communication. It is built into many browsers, including Firefox and Chrome. Even when using a VPN, WebRTC can pose a risk by potentially exposing your real IP address.

Many VPNs build WebRTC protection into their software, but this is often limited to actual VPN apps, and doesn’t typically carry over to browser extensions. Some do include WebRTC leak protection in their extensions, such as NordVPN, but if you’re going with another provider, you might need to take extra precautions.

Is it possible to disable WebRTC in your browser to avoid the issue altogether. Here’s how to disable WebRTC leaks in Firefox:

  1. Enter about:config in your Firefox address bar.
  2. Find media.peerconnection.enabled.
  3. If the Value column says “true,” then double-click the row so that it reads “false.”

There is no similar method to do this in Chrome. However, there are extensions available that can prevent WebRTC leaks, including WebRTC Leak Prevent.

You can check to see if these methods have worked using BrowserLeaks.

Change your location in Chrome and Firefox: FAQ

Can I use a DNS proxy instead of a VPN?

It is possible to use a DNS proxy service in place of a VPN for the IP address component of location spoofing. However, you should bear in mind two major differences between VPNs and proxy servers.

The first is that a DNS proxy will only change your location if you’re visiting a site that requires geo-unblocking. For any other site, the proxy won’t kick in, and you’ll get a direct connection to that site. This means if you want privacy, a DNS proxy won’t provide it. Plus, while a DNS proxy can technically help you unblock geo-restricted content, the reality is that many are unable to bypass some heavy proxy crackdowns such as those rolled out by Netflix and BBC iPlayer.

The second big difference is that most DNS proxy services won’t encrypt your internet traffic. This means that if it’s intercepted, anyone can decipher your information. If privacy and security are concerns, then you’re better off with a VPN.

Can I use a free VPN to change my IP address?

Free VPNs will pop up all the time in your search, but these are generally not good options. For starters, in a similar vein to DNS proxies, they are less likely to be able to bypass the geo-restriction measures taken by certain sites. So chances are you won’t be able to access your favorite shows, movies, or games. What’s’ more, servers are few and far between and tend to be overloaded. Even if you can bypass restrictions, you could end up with a slow, unreliable connection.

Additionally, free VPNs tend to have rather strict data limits. If you’re looking to effectively use a VPN service for anything more than basic web browsing, you’ll find a free VPN is extremely limited.

If you’re more concerned about privacy and security, free VPNs fall short there too. Various services have been known to track user activity, sell information to third parties, and inject ads into the sites you visit. Some fail to encrypt your data and could even carry malware. It’s definitely worth the few extra bucks for a top-rated provider.

Is it legal to change your location in Chrome?

The good news is that it’s legal to change your location in Chrome, Firefox, or any other browser you choose to use. Indeed, VPNs are legal in the vast majority of countries and are a great way to secure your online activity and bypass geographic restrictions. Remember, illegal online activities such as torrenting copyrighted material are still illegal regardless of whether you’re using a VPN.

Do these VPNs work on other browsers?

Yes, VPNs can work on other browsers, such as Microsoft Edge, Safari, and Opera. Each browser has its own set of instructions for setting up a VPN connection, and users should refer to the specific instructions for their preferred browser. However, it is important to note that some older versions of browsers may not be compatible with certain VPN services or protocols. Additionally, it may be necessary to install additional plugins or extensions to establish a successful connection. Therefore, it is best to consult the documentation provided by your chosen VPN provider before attempting to configure a connection using an unsupported browser.

Another thing to consider is that although some browsers are more secure than others when used without a VPN, they might still leak unencrypted data while connected with one. This can be avoided by selecting a browser compatible with your chosen VPN service or using one of the more secure browsers, such as Chrome or Firefox.

Can I use a browser extension to change my location?

Most major VPN providers offer browser extensions through which you can connect to a server and change your IP address and location. VPN browser extensions are most commonly available for Chrome and Firefox although they can also be found for Edge and Safari. The key difference is that if you use a browser extension, only your browser traffic (not apps) will be encrypted.

Can my real location be exposed?

Although a VPN is designed to hide your real location, there are instances where it might be exposed, such as when your VPN connection drops or due to a DNS leak. However, reputable VPN providers implement advanced security features like kill switches and DNS leak protection to prevent your actual location from being exposed, ensuring your privacy and security at all times.

Wrapping Up

Because browsers have multiple methods in place to detect your location, to truly spoof your location, you may need to use a couple of methods. Our recommended solution is to use a VPN and manually change your location in your browser. If you find that too cumbersome (it’s a little more difficult in Chrome), then trying the Location Guard extension alongside a VPN could be a very viable solution.