Force Firefox to Save Your Password

To sustain this free service, we receive affiliate commissions via some of our links. This doesn’t affect rankings. Our review process.

Trying to login to Paypal, your bank or credit card account, airline website, Yahoo, MSN, or any number of other online sites and for some reason Firefox doesn’t ask you if you want to save your password? So, you have to type it in every time you want to log in. We show you how to force it to remember your passwords.

As far as security is concerned, it’s actually a good thing that Firefox doesn’t allow you to save your password for these sites, given the prevalence of Firefox on public computers, such as those in libraries, schools, and airports. You wouldn’t want someone to sit down behind you, after all, and be able to login to your credit card account with the click of a button.


Newer versions of Firefox are disabling the auto-forcing of password saving for a good reason: security. Instead of meddling with Firefox settings, we recommend you try out the LastPass application. LastPass lets you save your passwords and login credentials securely (in the LastPass vault). You will be able to retrieve them (use them to auto-login) on any supported browser or device.

Firefox 4 and Up

For security purposes, the nsLoginManager.js file has been repacked in Firefox versions 4 and up, into a compressed file called omni.jar (a JAR file is a Java archived file). You can extract the nsLoginManager.js file by renaming the archive to, or using 7-Zip or WinRAR (which have .jar extraction support). Next, make the edits below to nsLoginManager.js, and finally, repack it (recompress it) into omni.jar and restore the archived file to its original location. Restart Firefox. Please remember that modifications to core files like are done at your own risk – there’s a reason the Mozilla development team has structured and compressed these files as they have, and re-enabling the auto-saving of passwords on certain sites could pose a security threat.

Firefox 3.6 -3.9: Force Firefox To Remember Your Password

Any website that has the autocomplete attribute set to off will disable Firefox’s ability to save your password. To have Firefox change/ ignore this setting, you can do the following:

  • Make sure there are no instances of Firefox running (press Ctr + Alt + Del and check the process manager for any instances of Firefox.exe).
  • Browse to the directory you have Firefox installed in (C:\Program Files\Mozilla), and edit the file nsLoginManager.js using Notepad or another text editor that won’t add formatting to your file (Word won’t work).
  • Search the file (Ctrl + F) for instances of “autocomplete”. This should bring you to the following section of code:
    • /* _isAutoCompleteDisabled
    • * Returns true if the page requests autocomplete be disabled for the specified form input. */
    • _isAutoCompleteDisabled : function (element) {
      • if ( element && element.hasAttribute(“autocomplete”) && element.getAttribute(“autocomplete”).toLowerCase() == “off“)
      • return true;
    • return false;
    • },
  • Change the value “off” to “xxx” and save your changes.
  • Relaunch Firefox.

Bookmarklet to Force Firefox to Save Your Password (For Firefox 3.5 and earlier)

It’s important that you only use this on a computer you trust, such as your home computer. Here’s how it works:

  • Right-click on this link and save it as a bookmark: (Note: the extension “Force Firefox Save” has been removed by the author)
  • The next time you’re on a page that requires you to enter a password, and Firefox refuses to save it, simply load the saved bookmark while on the page, before entering your password.
    • You’ll see a confirmation dialog with the following: Removed autocomplete=off from 1 form and from 2 form elements, and removed onsubmit from 3 forms. After you type your password and submit the form, the browser will offer to remember your password.
    • Next, simply login as normal. The difference is that this time, Firefox will offer to save your password. Next time you login, your username and password will fill in automatically

How Does the Force Password Save Bookmarklet Work?

Firefox (and other browsers) are setup so that websites can request the “autocomplete” (password saving functionality) feature to be turned off. That means, when you visit their website, you won’t (by default) be able to save a password because of a setting change. Don’t forget that this is a reliable security precaution – as mentioned, you don’t want to override this setting on a computer you’re not familiar with or that is in a public location.

The Force Password Save Bookmarklet (Javascript) Code

That bookmarklet that forces Firefox to turn the “autocomplete” setting back on for specific web pages is executed via Javascript, so your browser must support Javascript for this to work. For the technically minded, or those that are simply curious, here’s the code used to make the Javascript bookmarklet:

function() {
var ca,cea,cs,df,dfe,i,j,x,y;
function n(i,what) {
return i+” “+what+((i==1)?””:”s”)
if(x.onsubmit) {
if(x.attributes[“autocomplete”]) {
for(j=0;j<dfe.length;++j) {
if(y.attributes[“autocomplete”]) {
alert(“Removed autocomplete=off from “+n(ca,”form”)+” and from “+n(cea,”form   element”)+”, and removed onsubmit from “+n(cs,”form”)+”. After you type your password and submit the form, the browser will offer to remember your password.”)

How to Make Your Own Bookmarklet?

Bookmarklets are essentially snippets of Javascript code. Just like when you create a bookmark to a page, a URL is stored, and upon recall executed (so your browser is taken to that URL), with a bookmarklet, the URL is a snippet of Javascript. If you bookmark the bookmarklet (hence the name), upon recall the Javascript snippet is executed in your browser. So all you really need to do is copy and paste the above code into the URL field of a link, and you have your bookmarklet. Note that we’ve inserted tabs and spacing for readability – you may need to remove these (ie. consolidate space) to get the Javascript to work correctly.

About The Author:

Alex has been involved on the business side of the internet since the early 2000's. He holds both a Management Science degree from the University of California at San Diego as well as a Computer Science degree from NJIT.

We Rock Your Web had its roots back in 2004 as the tech blog for a web design and development company Alex founded that has grown and evolved into the parent company of We Rock Your Web.

While his foundation is rooted in web development, his expertise today lies in content and digital marketing, SEO, organic and paid search, analytics, and publishing. Alex is an avid tennis player, nature enthusiast, and hiker, and enjoys spending time with his wife, friends, and dogs.

Disclaimer: This website contains reviews, opinions and information regarding products and services manufactured or provided by third parties. We are not responsible in any way for such products and services, and nothing contained here should be construed as a guarantee of the functionality, utility, safety or reliability of any product or services reviewed or discussed. Please follow the directions provided by the manufacturer or service provider when using any product or service reviewed or discussed on this website.

Notify of
Oldest Most voted
January 22, 2018 9:57 pm

This bookmarklet creates a pop-up that appears every time I open Firefox. How can I remove it?

October 2, 2017 8:12 am

What should I do with firefox 52?

February 16, 2016 12:49 am

Love you propellor heads, someday you will learn to speak plain English.

Kimberly Alt
February 16, 2016 11:27 am

Our focus is to put things in layman terms for our readers to understand. May I ask what you didn’t understand?

January 9, 2015 5:43 am

Is it possible for us to change the command which enables ‘no prompt’ for asking if you want to change the existing password on Firefox?

Kimberly Alt
January 9, 2015 11:19 am

Hi Wendy, try downloading this add-on to Firefox.

November 2, 2013 8:10 pm

worked on my cell phone providers website with germna FF 25.0

thanks a lot!

Kimberly Alt
November 4, 2013 2:52 pm

You’re welcome! Glad we could help you out and thank you for reading!

Tim Pate
August 25, 2013 4:12 am

The bookmarklet, “Force Firefox Save” worked on Firefox 23 – August 2013


February 27, 2013 11:03 am

I’m sorry to say, this fix does not save passwords for MSN on FF 9.0. It is quite annoying. I hoped it would save me the hassle of resetting every now and then. Could someone please provide a solution for this?


a web rocker
April 24, 2012 3:58 am

We spend entirely too much of our time and energy searching for ways to repair our Firefox Password Manager. Shouldn’t we be asking “What gives ‘them’ the right to interfere in our security settings on our computers?” The password manager exists to protect our security. It does not exist for ‘their’ convenience.

a web rocker
March 11, 2012 3:35 pm

The instructions below do not work in Firefox 10 & 11 beta … nsLoginManager.js is in omni.ja, not omni.jar, and resetting the true to false in the nsLoginManager.js as instructed below has no effect. FF 10 & 11 beta still will not save passwords on sites that this nsLoginManager.js file would work with the true/false change in FF version 3.6.

For security purposes, the nsLoginManager.js file has been repacked in Firefox versions 4 and up, into a compressed file called omni.jar (a JAR file is a Java archived file). You can extract the nsLoginManager.js file by renaming the archive to, or using 7-Zip or WinRAR (which have .jar extraction support). Next, make the edits below to nsLoginManager.js, and finally, repack it (recompress it) into omni.jar and restore the archived file to its original location. Restart Firefox.

a web rocker
April 10, 2012 3:03 am

I would have to confirm that it is annoying that we need to alleviate our security concerns via third party software such as Last Pass or miscellaneous plugins to handle our passwords – that’s absurd!

The ACTA days and widespread invigilation on the web stinks like hell!

March 7, 2012 5:31 pm

This might be useful.

I found this on another forum….so all of the credit goes to that person and the creator of this plug-in.

Saved password editor plugin for Firefox.

I’m using FF v10.02 at home & FF v10.02 ESR at my work. Works good on most websites, but not all.

Best wishes…

a web focker
February 21, 2012 3:59 pm

omni.jar doesn’t exist in Firefox 10, but the file omni.ja does.

February 14, 2012 1:38 am

This method to force Firefox to save your password doesn’t appear to work any longer in Firefox 10.

Alex Schenker
February 14, 2012 10:20 pm

Anyone having trouble getting this to work in newer versions of Firefox, we suggest you checkout the LastPass utility. It allows you to keep an encrypted database of logins across not only browsers but platforms (PC, smartphone, etc.) as well.

January 9, 2012 7:18 am

Does not work on FF 9.0.1. Is there a revised version that will force passwords to be saved in FF 9.0.1?


prius2010 at hotmail dot co dot uk

February 5, 2011 8:46 pm

I can’t get this to work in FF 3.6.6. Is there something obvious I might be doing wrong?

March 15, 2010 7:50 pm

Nice script. Exactly what I need now. This code I need as well =)