If the unthinkable happened to you tomorrow, would your spouse or other relative be able to find important documents such as your insurance policies, your financial statements, your passwords to important accounts? If you died, would your loved ones know your funeral wishes?

“Generally speaking, people are unprepared [for serious accidents or death],” says Mark Gavagan, author of “12 Critical Things Your Family Needs to Know.” “For every hour someone spends documenting these things, they are saving family members five to 15 hours of anguish.”

Every person or couple needs an emergency file that spells out their finances, funeral wishes, whom to notify in case of death and more. Sadly, and probably not surprisingly, very few Americans are prepared in this way. A recent survey by Rocket Lawyer, a website that offers low-cost legal services, found more than half of people haven’t even “gotten around” to drafting a will.

Preparing for the worst isn't fun, but it's smart. When you’re ready to create your emergency file, here’s what Gavagan and other experts say it should include.

A will. You need a will, or relatives could be settling your estate for months or years in probate court after your death. Once you have a will, give a copy to your lawyer, and keep a copy in your emergency file (or include your lawyer’s contact information in the file).

A signed advance directive. Find out how to create one here. Also called a health care proxy or living will, this document spells out your medical care wishes when you may not be able to so yourself. Advance directives can be expressed through a living will and/or a durable power of attorney, a document that names who will make medical decisions for you if you can’t.

Your social security card and other official documents. These include copies of your birth certificate, marital records, deeds and divorce and custody settlements if you have them.

Related: Advance Directives: The Documents That Let You Die With Dignity

Medical records. Include a list of prescription drugs you take and a brief medical history, including past surgeries or chronic conditions.

Insurance and financial account info. First, make sure your insurance policies have up-to-date beneficiaries. Your emergency file should contain account numbers and contact information for your insurance policies, mortgage companies, bank accounts, credit card companies, auto loan lenders and investment accounts.

Passwords. Write down the login information for banking and financial websites you use as well as for your social media and email accounts. Don’t forget about passwords for your cellphone, computer and other gizmos.

Related: Who’s In Charge of Your Online Presence After Death?

How your home works. If you’re incapacitated (or worse), a family member may need to care for your home for an extended period of time. Your file should include information on alarm codes, service repairmen you use (and the last time major appliances were serviced), who else may have keys or access to your home, utility information and any automatic deliveries for heating fuel. If your utilities are paid automatically by credit card or electronic payment, include that information as well.

Important contacts. If something happens to you, who should know about it? Keep a contact list of important people such as your attorney, physicians, work supervisor and colleagues, clergy and relatives and friends.

Last wishes. Discuss your funeral and health care wishes (including whether you want your organs donated) with loved ones ahead of time and put your intentions in writing, Gavagan says. Doing so can ease your loved ones’ grief and even save them money. “So often in these emotionally charged moments, people want to show how much they care and say ‘I'm not cutting corners on their funeral’ — so people will go into debt or spend enormous sums of money,” Gavagan says. Don't store your last wishes in a safe deposit box, as some states seal those after your death, and it may be weeks or months before a relative can access them.

The logistics

Now that you've filled your file with your most vital, and most secret, personal information, you'll need to think carefully about where to store it and who knows how to access it. If it's a paper file, keep it secure — perhaps in a fire-resistant safe. You’ll need to trust someone with the combination. Or, Gavagan suggests, you can provide one person half the combination and another person the second half for more security.

If you store the information electronically, make sure it’s encrypted so that it's not readable without a password or encryption key. There are several online services that encrypt data.

Related: 4 Legal Documents Your 18-Year-Old Might Want to Have

Like this article? Share it with friends by clicking the Facebook or Twitter button below. And don't forget to visit our Facebook page!

Ronald Agrella is a freelance writer and former editor of The Boston Globe’s Boston.com.