How to backup internet favorites in different browsers

Whenever we want to format our hard drive, or we change computers or we simply want to reinstall our operating system, we lose our favorites and bookmarks and it can become rather frustrating. Personally, I have been backing up favorites since 2002 and you can notice I have almost 7 years old bookmarks (and most of them are still useful).