Nitrofurantoin (Macrobid) and trimethoprim are both antibiotics used to treat urinary tract infections (UTIs), but they work differently and have distinct characteristics. Nitrofurantoin (Macrobid) is a nitrofuran antibiotic that kills bacteria in the urinary tract by damaging or blocking proteins the bacteria need to survive. It is typically taken four times a day with food and can cause side effects like nausea, headache, and dark-colored urine. Trimethoprim, on the other hand, is an antifolate antibiotic that stops bacteria from making folic acid, which they need to grow. It is usually taken once or twice daily, with or without food, and common side effects include rash and itching. Nitrofurantoin is available in both capsule and oral suspension forms, while trimethoprim is available as a tablet. Trimethoprim can make your skin more sensitive to the sun, whereas nitrofurantoin can cause more severe side effects if taken for a long period. Both medications are available as lower-cost generics. Trimethoprim is not a first choice medication during pregnancy as it can cause harm to babies, and nitrofurantoin should not be used in the last weeks of pregnancy.