Stain removal principles that work on clothing also work on carpet, and this is true with coffee stains. The first thing to do is blot the stain quickly with a clean cloth or paper towels. It is very necessary to remove as much of the coffee liquid as possible before attacking the stain. If you ignore the stain for a while or discover an old coffee stain, don’t worry. However, it might take a few tries to eliminate the discoloration. Since you are not under a time crunch, you can fuel up on some coffee to get some energy to tackle the carpet.

Before You Begin
If you have shag carpet, you will have to do a little extra work. It is more difficult to remove stains from longer carpet fibers. If your carpet has longer fibers, be sure to blot completely and limit the amount of liquid you put on it. You can speed up the drying process by using a fan.
Any cleaning solution or stain remover should be tested on a hidden spot on your carpet to ensure it will not damage the color. Ammonia and some stain removers can damage carpets made of wool, wool blends, or other natural fibers. Ask the carpet manufacturer for suggestions.
1. Blot Up the Coffee
Blot up as much coffee as possible with a clean white cloth. Until the stain is no longer transferred to the cloth, press fresh clean sections of the cloth onto it. To prevent spreading the stain, work from the outside inward. Moreover, don’t scrub the carpet, which can damage the fibers. Instead, use a blotting or pressing motion without scrubbing.
2. Add Cold Water
Apply a small amount of cold water to the coffee stain. Using a clean white cloth, blot up all of the liquid. Depending on how much coffee landed on the carpet, you may need to repeat this process at least twice. Be careful not to oversaturate the carpet. The goal is to dilute the coffee while still being able to soak up the liquid.

3. Using a stain remover
Follow the directions on the product you are using to remove stains from carpet. Do not use too much stain remover, since its residue will attract more dirt over time. Let the carpet dry fully, then vacuum it to fluff the fibers.

4. Check for reappearances
For a while, keep an eye on the affected area to see if the stain returns. The original stain has usually penetrated deeper than it initially appeared, or the carpet was not sufficiently blotted out of excess liquid during the stain removal process. Eventually, the liquid seeps to the surface, forming a ring around the stained area. Lay a towel on the wet area, and place a heavy weight on top to force up as much liquid as possible.

Tip
If you spilled coffee with cream, it may be necessary to break down the protein in the stain with an enzymatic cleaner. Consider using a carpet stain remover for pet stains. They are usually best at removing protein-based stains from carpets, and will prevent unpleasant odors. Before using any other stain removal method, rinse and blot the carpet.
The stain will be easier to remove if you wet it first with water if it is persistent, or if it is an old dried stain. Try mixing one tablespoon of ammonia with one cup of water if you know your carpet is not wool or wool blend. Wait three to five minutes after blotting the ammonia solution onto the carpet. Next, alternate blotting the carpet with water and a dry towel to rinse and dry it. Blot the carpet with a dry towel and allow it to fully dry.
When you are unsure of the type of carpet or if the carpet is wool or wool blend, mix three drops of a mild dish soap with one cup of water. After sponging this solution onto your carpet, alternate blotting it with a wet and dry cloth. Allow it to dry completely.
You can also take the easy way and call a professional cleaning service if the stains are too hard to remove on your own or you don’t have enough time to do it.
