Easter eggs can be dyed and still eaten. Just follow these tips to make sure it's safe

FILE - Painted Easter eggs hang from an Easter Tree in Saalfeld, central Germany, March 30, 2018. (AP Photo/Jens Meyer, File)

SIOUX FALLS, S.D. (AP) — Easter is around the corner, and it's time to start thinking about how to decorate your eggs.

Whether you're dying eggs for your table spread or planning to hide them for an egg hunt, it's important to follow food safety guidelines to minimize germs and maximize your egg quality.

You have some time to eat your eggs

Eggs are remarkably long lasting, so there needn't be a giant rush to eat them.

“Stores usually do turn over eggs pretty quickly, so the recommendations is you should consume eggs three to five weeks after you purchase them,” said Kara Lynch, food safety educator with Michigan State University Extension.

There is also a benefit in letting eggs age just a bit, as older eggs can be easier to peel. That's because eggs shrink over time within the shell, creating an air pocket between the egg and the shell.

Hard boil your eggs

Egg processors clean eggs before they reach store shelves, but it also is important to thoroughly cook eggs to reduce the risk of foodborne illness, especially salmonella. That bacteria lives naturally in the gastrointestinal and reproductive tracts of chickens, said Kimberly Baker, associate extension specialist at Clemson University.

To cook your eggs, place them in a saucepan, fill it with water and bring it to a boil. After that, put the lid on, turn the heat off and let it sit for about 12 minutes. Some also favor turning down the heat and simmering eggs.

You can vary the time in the hot water depending on a desire for harder boiled or slightly creamier eggs, but the yolk should be pretty solid to be safe. Boiling them for too long can risk creating green sulfur development on the outside of the yolk.

How to cool the eggs

After that, Don Schaffner, food science department chair at Rutgers University, said there are two options.

You can run your eggs under cold water to reduce the temperature. From there, you can color them right away or place them back in the fridge until you're ready. Or, after you've boiled them, you can let them air dry until they've cooled.

The boiling process sanitizes the eggs, and as long as they are kept out of water, Schaffner said, they will remain safe to eat.

“You’ve boiled the egg, you’ve gotten rid of any bacteria that might be in the egg. And now you’ve air-cooled it, right? So it’s going to cool more slowly, it’s probably going to cook more,” he said. “But most importantly, you don’t have to worry about any bacteria from the water getting internalized into the egg.”

It’s OK to get food dye on your eggs

Either artificial or natural food dye is OK as long as the dye label says it's food grade. For those keeping track, the U.S. Food and Drug Administration has been updating its guidance and regulations regarding certain dyes.

And no, it's not a problem if the dye seeps through the shell.

“Eggs kind of naturally have their own abilities to absorb only so much,” Baker said.

As you're decorating the eggs and have the eggs outside, she suggested keeping your eggs in an ice bath, so they can stay at a cooler temperature while you're decorating.

Follow the 2-hour rule

Eggs should generally be kept at or below 40 degrees (4.4 degrees Celsius) to minimize the risk of contaminants.

Cooked eggs that weren't air-cooled should spend no more than two hours at room temperature. And that's cumulative, including the time spent decorating and the time spent hiding during the Easter egg hunt.

But if it's particularly warm, then that two-hour rule may be shortened to one hour, Lynch said.

Hard boiled eggs are generally good for about a week in the fridge.

Give your eggs a rinse before peeling

Be careful with your eggs as you handle them.

One of the biggest concerns is making sure your eggs haven't cracked during an Easter egg hunt, making them vulnerable to contaminants. And once the egg has been hard boiled, there's no way to kill bacteria that get inside, Baker said.

“We don’t want to be putting them in the soil or in lawns where pets have gone to the bathroom,” she said.

Whether the eggs are hidden outdoors or in a corner of your home, you should rinse them in cool water before you peel them. And wash your hands, too, just in case the eggs have picked up something.

Consider using plastic eggs

If the Easter egg hunt means your eggs will be at room temperature for longer than two hours, experts recommended using plastic eggs for the hunt instead of real ones to minimize food safety risk.

“If it’s an outdoor Easter egg hunt at any time, I would say go with the plastic eggs and be safe,” Baker said. “And use your dyed Easter eggs as your centerpiece on your table or your buffet, and enjoy them that way.”