How to change your user agent in Firefox

Published at: Jul 13, 2022

Changing your user agent in Firefox takes a few simple steps.

  1. Open a new tab

    While Firefox has a standard settings interface for changing common settings, the interface for changing advanced settings such as the user agent in Firefox is done via the browser itself. Please open a blank window or tab.

  2. Browse to "about:config"

    In the address bar, type in about:config and press the Enter button on your keyboard.

  3. Dismiss the warning

    The "about:config" system will give you access to change special settings which might make your Firefox unusable or behave strangely. Firefox will normally give you a warning about this to make you aware of it.

    As long as you follow the instructions here, you should be fine.

  4. Create a new preference item

    Firefox's settings are stored as a series of Preference Names and Values.

    The setting to change your user agent doesn't exist in a default installation of Firefox; you need to create it yourself and then set it to the new user agent value you want to use.

    To create the new preference value:

    1. Type the preference name that stores the custom user agent string:

      general.useragent.override

      into the search box at the top of the Preferences tab. Screenshot of The Windows "Type to Search" input on the Windows desktop

    2. From the three choices: Boolean, Number, and String, select String and then press the Plus button
    3. You will then see an input box, where you can type or paste a new user agent (You could choose one from our list of user agents!)
    4. When you've done that, simple press the Enter button on your keyboard to save the new value

    Congratulations, you have just set a custom user agent for Firefox. You can test out your new user agent by visiting our My Browser page and setting what we detect it as!

  5. Close the Preferences tab

    You can simply close the Advanced Preferences tab and resume browsing the internet.

  6. Resetting your user agent in Firefox

    Firefox will continue to use this user agent you've set until you delete the preference you've created.

    To do remove that preference, search again for the general.useragent.override preference in the "about:config" window. Once you have found the preference that is overriding your user agent, get rid of it by clicking the Trash Can icon next to it.

    Firefox will resume using its default user agent.

  7. You have now changed (or reset!) your user agent string in Firefox. We hope this guide was useful.

    If you are a software developer who needs to parse user agents in your system, please check out our User Agent Parsing API. It will make your life much easier!

    More guides and help for Firefox

    Need more help with Firefox? Read our other Firefox guides.