Firefox and Chrome browsers include built-in geolocation services that help websites pinpoint your location. Although this feature has its benefits, there are instances when you may want to hide, spoof, or change your browser’s location. Several methods are available, whether you wish to access region-locked content or safeguard your privacy.
For instance, you may want to use a Virtual Private Network (VPN), manually spoof your location, or try out a browser extension dedicated to this task. In certain situations, you may even need to use multiple of these techniques simultaneously! Our experts have extensively research this topic for you and below, we’ll explore all of the options at your disposal for switching your location in Chrome and Firefox.
How to spoof your location using a VPN
Even if you’ve never used a VPN, setting one up is very straightforward. Here’s how to change your IP address in Firefox or Chrome with a VPN:
- Choose a provider, select a subscription term, and make your way through the checkout process. (We recommend NordVPN)
- Download the appropriate VPN software for your device. Most reputable VPN providers offer native apps for Windows, MacOS, iOS, and Android.
- Log in using your username and password (which will be provided when you signed up).
- 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, making it appear you’re in that location.
Your chosen server location is important as it changes your IP address, making websites think you’re actually in that country
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 Netflix, 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 terms—just 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 you access region-specific content, bypass restrictions on certain websites, and protect 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.
You can either manually enter a specific latitude and longitude or have it default ot one of several major cities - 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.
This might look scary but it’s just a reminder to not tinker in these settings if you don’t know what you’re doing - 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 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 unique set of digits (and symbols in the newer IPv6 addressing scheme) 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 elsewhere.
However, some browsers have other methods that can decipher where you are. For example, they can use nearby wi-fi networks to geolocate devices without IP addresses. Turning off wi-fi 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 using a VPN, your browser can detect your location. As such, you may need to 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 have dedicated browser extensions for Firefox, Chrome, and other browsers. These can be great for location spoofing, but note that most 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 the VPN server you’re connected to. This means 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). Here are our top recommendations:
- NordVPN: The best VPN for changing location on Chrome and Firefox. 6,000+ servers and fast connection speeds. Obfuscated and Double VPN servers plus 24/7 live chat and a proven no-logs policy. Comes with a 30-day money-back guarantee.
TIP In our testing we found that the cheapest NordVPN plan (Standard) works perfectly for Chrome and Firefox. - Surfshark: Best value VPN for changing browser location. High-speed servers in 100+ countries. Allows any number of simultaneous connections and just recently started offering static IP addresses too.
- IPVanish: One of the faster VPNs available. Ideal for streaming and torrenting. Secure all of your devices at once. Owns and operates its servers. Comes with a free SOCKS5 proxy and is slowly adding even more advanced tools.
- CyberGhost: Huge network of more than 11,500 servers makes it perfect for location spoofing. Allows users to automate their connections. Follows a strict no-logs policy for maximum privacy.
- ExpressVPN: Offer 3,000+ servers in 105+ countries with no bandwidth throttling. Highly secure with built-in obfuscation and and an audited no-logs policy.
- ProtonVPN: Boasts a large network, with a presence in 112+ countries. Fantastic security features including 256-bit encryption, DNS leak protection, multi-hop servers and a no-logs policy.
- PureVPN: Over 6,000 servers in 65+ countries for great international coverage. Exceptionally fast speeds for streaming and downloading. Built-in obfuscation.
- PrivateVPN: Servers in 63+ countries and consistent access to streaming platforms. Free remote help and installation available. Refuses to keep any records of your activity at all, not even connection logs.
VPNs often claim to keep you safe and private online but many VPNs (especially free ones) leak information.
We regularly test the top 70 VPNs for security and this list only includes VPNs which keep you anonymous and don't track your activity. Plus we only recommend VPNs which offer a full-money back guarantee allowing you to try them risk free.
Our top choice for changing location: NordVPN
Apps Available:
- PC
- Mac
- IOS
- Android
- Linux
- FireTV
VPN Ratings:
Overall score: | 9.3 / 10 |
---|---|
Streaming: | 9.2 / 10 |
Speed: | 10 / 10 |
Security & Privacy: | 9.5 / 10 |
Ease of Use: | 9.6 / 10 |
Server availability: | 8 / 10 |
Website: www.NordVPN.com
Money-back guarantee: 30 DAYS
Our team of experts has hands-on experience with dozens of popular VPNs but our top recommendation is NordVPN. This service works exceptionally well for spoofing your location in Firefox and Chrome but is also just a really strong choice for everyday usage.
Based in Panama, NordVPN operates a network of more than 6,000 servers spanning 111+ countries. It provides users with exceptionally fast, reliable connections. We know this because we tested its speeds and then compared it to other providers. The below chart outlines how NordVPN performed during different times of the day, the overall average, and the average vs other providers.
You can see how NordVPN performed against some of the other leading VPNs in the market later in the article in our testing methodology.
The provider’s fast speeds and SmartPlay technology make it ideal for streaming. It works with far more geo-restricted sites than most providers. We successfully used it with Netflix US (and other Netflix libraries), Hulu, HBO, BBC iPlayer, and Amazon Prime Video without issue. Best of all, we were usually able to watch with the first server we tried so there was minimal fuss. If you do have issues finding the right server, customer support agents are available 24 hours per day over live chat.

Every NordVPN subscription includes apps for Windows, MacOS, Linux, iOS, and Android. Chrome and Firefox users can download dedicated browser extensions that 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 effectively uncrackable 256-bit encryption, and this comes with perfect forward secrecy. You also get a built-in kill switch, leak protection, and a Threat Protection tool that stops ads, trackers, and malicious downloads automatically. This means you can rest assured your data will always remain safe inside the encrypted tunnel. Use the chart below to see how NordVPN compares with the other VPN providers we tested in terms of security and privacy.
NordVPN subscriptions allow up to 10 simultaneous device connections per account. The service is also compatible with some home routers (though manual setup is required). Configuring a router connection allows you to change the virtual location of every device on your home network.
Buy this VPN if:
- You want the best selection of secure IP addresses available
- You want access to speciality servers for accessing the dark web
- You want a VPN for streaming
- You want fast speeds
Don’t buy this VPN if:
- You want port forwarding
BEST VPN FOR CHANGING BROWSER LOCATION:NordVPN is our top recommendation. It has thousands of RAM-only 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.
How to manually spoof your location
If you’re just setting up Firefox or Chrome, you’ll be asked if you want to allow location services as part of the setup process. You can simply deny this request, and for Firefox, you can skip the first set of instructions below.
But chances are you’ll do this after the initial setup. In this case, you’ll need to manually turn the geolocation services off. Plus, it doesn’t help 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:
- 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!
- Look for the setting geo.enabled.
- The value column should read “true.” Double click it to set it to “false.”
Note that this will only stop Firefox tracking your location. To set a new location, you can continue with the following steps:
- Still in about:config, look for the setting geo.wifi.uri.
- 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 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:
- In a browser window, hit Ctrl+Shift+I (for Windows) or Cmd+Option+I (for MacOS). This will open the Chrome Developer Tools window.
- Hit Esc, then click the Console menu (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.
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 from 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.
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 (available for both Chrome and Firefox). 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.
- 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.
To use the Fixed Location feature:
- Install the Location Guard extension for Firefox or Chrome.
- Go to Options and change Default Level to Use fixed location.
- 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’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:
- Enter about:config in your Firefox address bar.
- Find media.peerconnection.enabled.
- 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.
Read more browser articles here:
Recent VPN Product Updates
Digital security is always changing so VPNs can’t afford to get too comfortable. Luckily, the top providers are constantly working on ways to improve their services. In fact, we’ve seen a few introduce significant new functionality in their latest updates. Take a look below to see what’s new with our recommended VPNs:
NordVPN
- Made a series of small UI tweaks for greater usability. This includes allowing you to pause the VPN, making the app easier to navigate on mobile, and letting users rename Meshnet devices (as well as see the remaining time on invites). (September 2024)
- Drastically improved the NordVPN browser extension with faster, more reliable performance, a kill switch, and the ability to remember settings changes between sessions (September 2024)
- Rolled out quantum-resistant encryption in the Linux app (September 2024)
Surfshark
- Gave iOS users the ability to let certain apps pass through the VPN unencrypted (October 2024)
- Launched an online tool that checks if your personal information has been leaked in any major online data breaches (October 2024)
IPVanish
- Expanded its network to cover more than 105 countries and added double hop functionality in all versions of the app (October-November 2024)
- Rolled out a secure cloud-based browser for users on the Advanced plan (October 2024)
ExpressVPN
- Launched its own ARM-optimized app for Windows Copilot+ devices (September 2024)
- Introduced Identity Defender, a suite of tools designed to protect US subscribers from identity theft, manage their personal data, and keep an eye on their credit (November 2024)
Methodology: How we chose the best VPNs for changing browser location
We concentrated on the following areas to find the best overall provider:
Speed
All VPNs slow your connection a little due to the additional routing and encryption processes needed to create a secure tunnel. However, some are much, much faster than others. To find out which will best preserve your base connection speed, we carried out speed tests in the morning, at noon, and in the afternoon. We used VPN servers in the UK, US, and Japan to get an idea of global speeds.
The tests were carried out on a virtual machine which has been rate limited to 250 Mbps. We chose this figure as it’s the median download speed for broadband users in the US and therefore gives users a good idea of how each VPN would realistically perform.
We then combined these results to create a speed score out of 10. The chart below shows how each VPN performed.
The fastest providers were NordVPN, Surfshark and ProtonVPN.
Server availability
If you’re changing your virtual location with a VPN, the number of location options available will depend on where the VPN has servers. We scored providers on the number of countries they have a presence in. We also took into account the number of servers in their networks, as this helps determine their relative availability.
CyberGhost combines a vast network with a presence in 100+ countries, so it’s not surprising it leads the scores in this category. NordVPN is the next best option, with roughly 6,600 servers in 111+ countries.
Security & privacy
It’s important to choose a VPN that keeps your connection private and secure. Many don’t, which is why we thoroughly evaluate each provider before recommending them. In all, we use 16 different criteria for calculating security and privacy scores.
This includes looking at the strength of each VPN’s encryption, which protocols it supports, and whether it’s been independently-audited. We also consider things like which country it’s based in and if it’s capable of beating country-wide censorship.
Ease of use
The vast majority of consumer VPNs are fairly straightforward. However, users often mention that they can’t find specific options or that they have trouble getting a server that works with a particular streaming platform, which is why we like to prioritize providers that go above and beyond to streamline your experience.
To do this, we score each VPN against 10 different criteria. For instance, we look into how consistent their unblocking abilities are, make sure they offer apps for all major platforms, and check to see if they offer the same level of functionality across desktop and mobile devices.
Streaming
Only a few VPNs provide access to geo-restricted content from all of the big-name platforms. If this is important to you, choose one of the VPNs that score highly in the chart below. This represents the combined scores for nine metrics related to streaming.
As you can see, NordVPN, Surfshark and ExpressVPN are all particularly good options for streaming.
Change your location in Chrome and Firefox: FAQs
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.
Unfortunately, these services fall short on security and privacy too. Our research indicates that many of the most-downloaded mobile VPNs collect more data than is strictly required. Some even inject ads into the sites you visit! Digital privacy is one area where you don’t want to compromise, so we strongly recommend choosing a service for its security credentials and not making a decision based on price alone.
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.
Disclaimer: Although we’ve spent hours researching this topic, we are not legal experts. As such, nothing we’ve said above should be taken as legal advice. We encourage you to consult local laws or perhaps even seek a professional’s opinion bif you’re not sure spoofing your location is legal where you are.
Do these VPNs work on other browsers?
While most VPNs have their own extensions for Firefox and Chrome, you don’t always need these. In fact, when connected to the desktop or mobile app, all traffic from your device will be encrypted, regardless of whether you’re using Edge, Brave, Safari, or something else entirely. The only difference is in the way each browser handles GPS location data and even then, disabling these features rarely takes more than a minute.
Can my real location be exposed when using a VPN?
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 using a provider that can automatically change your GPS settings (such as NordVPN), or using the Location Guard extension alongside a VPN could be a very viable solution.
Unfortunately, despite even using the pre-determined locations in the latest Chrome Sensor box, it still shows my default location using the websites you mentioned. I exited Chrome and then relaunched everything Developer’s box. I have my location disabled. Do you know what I am doing wrong?
today is 12.1.2020
your most recent update is
11.27.2020
firefox 78.5.0esr
geo.wifi.uri is not an option (about:config)
For some reason it’s not listed alphabetically, but it should show up if you enter it in the search bar.
Hi Aimee,
I have to agree with r’s comment, the option doesn’t exist anymore. It did give me the option to create it myself, but unfortunately it didn’t seem to fix my issue.
But in Firefox 84.0.1, the option is no longer there.
Thank you. This is really helpful to solve my issue.. Thank you.
Chrome and firefox methods don’t work. I have read many blogs that have the same steps, but they don’t change the location in Google. Example: I get the lat & long for beaumont, texas, plug that into Google dev tools, run my “family lawyer” search but I still get results for my local area, not beaumont texas. When I follow the steps for firefox, same thing.
Am I doing something wrong?
Some websites will employ additional measures to detect your location. In the case of Google, you also need to turn off the location tracking features within the account. You can read more about this here: https://www.comparitech.com/blog/vpn-privacy/stop-google-apple-microsoft-tracking-location/