GnuCash to QIF
Converts GnuCash XML files into QIF
SourceForge Logo
This Java program converts a GnuCash XML file into a QIF file. Go to the Project Page for news and downloads, or go directly to the source Java file. It's in the Public Domain, so you can do whatever you want with it :-).

I wrote this program to help with my desktop migration from Linux to Mac OS X, but it can also be used for other conversion paths and to programs other than Quicken.
To use GnuCashToQIF, download and launch the latest dmg image and read through the Mac OS X instructions. If you are not using Mac OS X, then download the JAR file and read the instructions for launching it.

Notes

Because this program works with GnuCash XML files, you must have saved it at least once with an XML-capable version of GnuCash, which covers all versions above and including 1.6.0. Files saved by GnuCash 1.4.x and below are not supported, though it's easy to convert it to XML by opening it up using 1.6.0 or above and then saving it. I'm not sure if 1.5.x's files are XML and/or compatible with GnuCashToQIF, but if it is not, then the procedure for making it compatible with GnuCashToQIF is the same as it is for 1.4.x and below files.

The current version is geared towards GnuCash files that are set up for personal finance where you have bank accounts and credit cards to store your money along with income and expense accounts for spending/income allocations. QIF accounts get created for asset accounts while the other accounts turn into Categories. Other scenarios may require modification to the source code and/or your GnuCash account configurations before running.

Here are the GnuCash account types supported by GnuCashToQIF. All other account types are turned into QIF Categories.
GnuCash Account
QIF Mapping
Asset
Asset Account
Bank
Bank Account
Cash
Cash Account
Credit Card
Credit Card Account
Currency
Cash Account *
Expense
Expense Category Type
Income
Income Category Type
Mutual Fund
Bank Account *
Stock
Bank Account *

* I have not yet had time to implement better mappings for Currency, Mutual Fund, and Stock. Please feel free to add better support for these GnuCash account types if you need them to map cleanly to QIF (the transactions, amounts, and dates are properly imported, but the account metadata such as stock ticker symbol and such are not). Otherwise, it's always possible to fix the account types once they're in Quicken or whatever program you are importing into.

Descriptions are split into Payee/Description and Memo using "at," "from," and "via" as the delimiters, if they exist. One can disable this behavior or extend/enhance it by modifying the source code.

The double-entry income and expense accounts are converted into QIF Categories while transfers between bank and credit card accounts remain intact as transfers, assuming the account names remain consistent during the QIF Import.

Cleared transactions carry through as Cleared in the QIF file while outstanding transactions remain outstanding. This used to not work in version 1.1, but it should now work in 1.2 and above. Please let me know if it does not. Special thanks go to Dan Poirier for sending in the patch that fixes this and adds subcategory support.

Release 1.2.1 adds mappings for more GnuCash account types. Previous versions of GnuCashToQIF converted these new mappings into categories. If all of your asset accounts were Asset and Cash, as an example, versions 1.2 and below processed them as categories and, as a result, wrote out no accounts nor any transactions into the QIF file. While 1.2.1 addresses the extra account types that were previously not mapped, other account types may come up in the future. If one or more of your accounts are not showing up in Quicken after you import the QIF, try changing that account's type to Bank inside of GnuCash and then convert the file again in GnuCashToQIF.

A user reported that loan accounts aren't converted, so that's an area for improvement that might go into the next version. For now, convert it to a Bank Account or a Credit Card Account in GnuCash for it to convert over into QIF with this program.


Converting GnuCash Files to QIF with Mac OS X

To convert GnuCash files to QIF in Mac OS X, follow these steps:
  1. Download the latest dmg.bz2 image and launch it. If it asks for an application to open the .bz2 file, then ensure that you have the latest free version of Stuff-It Expander or use bunzip2 manually from the Terminal (instructions for bunzip2 are not included).
    Launch GnuCashToQIF

  2. Launch the GnuCashToQIF icon by double-clicking on the GnuCashToQIF text.

  3. When asked, select the source GnuCash file. Press Open.
    Select the GnuCash file to convert

  4. The next window asks for the destination QIF file. By default, the name of the GnuCash file is used but with a .qif extension instead of .gnucash. Press Save once you are satisfied with the location and name of the output QIF file.
    Select the destination folder for QIFs

  5. GnuCashToQIF will now convert the input GnuCash file into a QIF file. At this time, no progress bar or other indication of activity comes up during this process.

  6. When the conversion process is complete, GnuCashToQIF will let you know. Press OK.
    GnuCashToQIF complete

  7. Launch Quicken.

  8. In the File menu, choose "Import QIF..." to bring up a file chooser. Choose the QIF file press Open. If all goes well, all the accounts, transactions, and categories should import into Quicken properly.

  9. Verify your balances and reconciliation statuses.

  10. (Optional) E-mail me about how it went, or if you came across any bugs or problems :-). My address is slawrance@yahoo.com. I don't check that e-mail box every day, so responses might occur after a few days.


Launching the JAR File

For Linux, Solaris, Windows, and other Java-capable Systems, including Mac OS X

If you are not running Mac OS X, or are but don't want to use the Disk Image from the above instructions, follow these steps:
  1. Download the JAR file.
  2. Open up a Terminal window.

  3. Go to the folder that contains the download JAR file with the cd command.

  4. Ensure that java is in your $PATH (or %PATH% for Windows). Most likely, it is, but if the next step says that it cannot find java, then ensure that your PATH environment variable contains Java. At this time, I don't have instructions for how to do this, but a Google search on that subject should give you insight for your operating system (even Windows has completely different ways to do it depending on the revision (95/98/ME vs. NT vs. 2000 vs. XP)). Mac OS X users don't need to worry about this step.

  5. Type java -jar GnuCashToQIF-1.2.1.jar into the Terminal window and press Enter.

  6. When asked, select the source GnuCash file. Press Open.
    Select the GnuCash file to convert

  7. The next window asks for the destination QIF file. Press Save once you are satisfied with the location and name of the output QIF file.
    Select the destination folder for QIFs
  8. GnuCashToQIF will now convert the input GnuCash file into a QIF file. At this time, no progress bar or other indication of activity comes up during this process.

  9. When the conversion process is complete, GnuCashToQIF will let you know. Press OK.
    GnuCashToQIF complete
  10. Launch Quicken.

  11. In the File menu, choose "Import QIF..." to bring up a file chooser. Choose the QIF file press Open. If all goes well, all the accounts, transactions, and categories should import into Quicken properly.

  12. Verify your balances and reconciliation statuses.

  13. (Optional) E-mail me about how it went, or if you came across any bugs or problems :-). My address is slawrance@yahoo.com. I don't check that e-mail box every day, so responses might occur after a few days.