Even on light carpeting, a tomato-based stain doesn't have to be permanent. Whether the stain is tomato sauce, juice or soup, the cleanup methods and supplies remain the same -- but it may take more than one option to completely free the carpet from the tomato color. The quicker you act, the easier it will be to remove the substance before it's absorbed by the carpet fibers.
If the spill is fresh, scoop up as much of the remaining tomato sauce as possible, using a large spoon. Keep a bowl handy, depositing the scooped sauce into it. You can use the bowl of the spoon to scrape partially dried tomato sauce as well, or use the edge of a plastic knife. Scoop and scrape from the outside edges of the spill toward the center. Once you've removed as much as possible with the spoon, blot the spot with a damp dye-free sponge or white cloth. Use cool water when wetting the sponge or cloth, wringing out excess to avoid soaking the carpet. Blot and dab -- do not rub -- to remove as much of the tomato stain as possible.
Rub half of a cut lemon over the stain, rubbing from the outside edges of the stain toward the center, after you've scooped and blotted most of the tomato out of the carpet. Wait a few minutes, and then pour some water over the stain. Use enough to saturate the carpet fibers without creating a puddle. Blot the liquid up with an absorbent white cloth, wringing it out as needed. Once the carpet dries, the stain should be gone.
Club soda is another effective substance for removing tomato-based stains from carpet. Club soda does not contain the sugars and dyes found in flavored sodas, so it won't leave a sticky mess that attracts ants. Pour enough club soda over the stain to cover it without creating a puddle on the floor. Blot it up with a slightly damp sponge or absorbent white cloth after a minute or two, followed by a dry cloth or plain paper towel. Afterward, mix a generous squirt of liquid dish soap into a cup of cold water, dabbing the remaining tomato residue with a cloth dipped into the soapy solution. If the stain doesn't come up completely when you dab it, rub it from the outer edges toward the center to avoid spreading it. Follow up with a damp white cloth to remove any remaining soap.
If some of the stain remains after you've tried other methods, hydrogen peroxide removes the rest. Mix 1 part peroxide with 3 parts cold water, and then pour it over the stain, using just enough liquid to cover the stained area. Set a folded white towel over the peroxide and let it sit for 30 minutes or so. The towel blocks light that could contribute to bleaching the carpeting. Check the stain every few minutes to ensure the liquid isn't changing the color of the carpet itself. Rinse and blot the area thoroughly with cold water on a white cloth, blotting up excess water with a dry cloth afterward. If the carpeting is a dark or bright color, test the peroxide mixture in an inconspicuous area first to ensure it does not bleach the fibers.