You can identify most pills by looking up the imprint code stamped on them in a free online database. Every prescription medication sold in the United States is required to have a unique imprint, and databases like the Drugs.com Pill Identifier let you search by that code along with the pill’s color and shape to get a match in seconds. Here’s how the whole process works.
What to Look For on the Pill
Before you search anything online, flip the pill over and examine both sides carefully. You’re looking for four things: the imprint code, the shape, the color, and whether it has a score line.
The imprint code is the most important identifier. It’s a combination of letters, numbers, or both that’s stamped, printed, or engraved into the surface. Something like “M 367” or “IP 204.” This code is unique to a specific drug, dose, and manufacturer. If you can read this clearly, you can almost always get a positive ID. Use good lighting and a magnifying glass if the pill is small or worn down.
Shape matters more than you might think. “Round” and “oval” are obvious, but pill databases also use terms like “oblong,” “capsule-shaped,” “diamond,” and “pentagon.” Pick the closest match from the options the database gives you. Color is straightforward, though be aware that lighting can make white pills look yellow or vice versa. A score line is the groove cut across one face of the pill, designed to let it be split into equal doses. Noting whether your pill has one (or none) helps narrow results.
Where to Search
The most widely used free tool is the Drugs.com Pill Identifier, which draws from multiple professional drug databases including Micromedex and Wolters Kluwer. It covers more than 24,000 prescription drugs, over-the-counter medicines, and supplements, and returns photos you can visually compare to the pill in your hand. You enter whatever details you have, and it narrows the possibilities.
The National Library of Medicine also recommends this tool on its own support pages. If you prefer a different option, WebMD and GoodRx both offer similar pill identifier features that work the same way: enter the imprint, select a shape and color, and browse the matches.
For a more official route, the FDA maintains the National Drug Code (NDC) Directory, which is updated daily and lists information on active finished drugs submitted to the agency. It’s less user-friendly for quick visual identification, but it’s useful if you already have a drug name or NDC number and want to verify details. You can also contact the FDA’s Division of Drug Information directly, where staff can identify drugs based on their physical appearance and markings.
All of these tools also exist as mobile apps. The Drugs.com app, for instance, includes the pill identifier alongside interaction checkers and medication records.
Using a Photo Instead of Text
Several apps now let you snap a photo of a pill and use image recognition to identify it. The technology is improving but isn’t perfect. A 2023 study published in the Journal of Medical Internet Research found that a deep-learning identification system correctly identified pills on the first guess about 78% of the time from consumer-taken photos, and got the right answer within its top three guesses 89% of the time. Processing took less than a second.
That 78% accuracy means roughly one in five pills could be misidentified on the first attempt. Photo-based tools work best as a starting point. If you get a result, confirm it by checking the imprint code in a text-based database.
Why the Same Drug Can Look Different
If you’ve switched pharmacies or your prescription looks different from last month, the pill might be from a different generic manufacturer. U.S. trademark law actually prevents generic drugs from looking exactly like the brand-name version or other generics already on the market. The active ingredient is identical, but the color, shape, size, and imprint code can all change between manufacturers. This is one of the most common reasons people need to look up a pill in the first place, and it’s almost always harmless. A quick search of the new imprint code will confirm you have the right medication.
When Online Tools Won’t Help
Standard pill identifiers only cover legally manufactured medications. They cannot reliably identify counterfeit pills, and this is a serious safety concern. According to the DEA, counterfeit pills are designed to look nearly identical to legitimate prescription medications like oxycodone, Adderall, and Xanax. They may contain no active ingredient at all, the wrong ingredient, or lethal amounts of fentanyl or methamphetamine. There are no quality controls in the illicit labs producing them, so even pills from the same batch can vary wildly in potency.
A pill that visually matches a database photo is not guaranteed to be legitimate if it came from anywhere other than a licensed pharmacy. If you’re unsure about the source of a pill, visual identification alone is not enough to confirm safety.
If Someone Has Taken an Unknown Pill
Poison Control operates a 24/7 hotline at 1-800-222-1222 and also offers an online tool at poison.org where you can answer a few simple questions about what happened and get a recommendation in under three minutes. Their website also includes its own pill identification tool. If someone has collapsed, is having a seizure, has trouble breathing, or can’t be woken up, call 911 immediately.
Identifying Pet Medications
Standard pill identifier tools are built for human medications and won’t reliably identify veterinary drugs. The FDA maintains a separate resource called the Green Book, which lists all approved animal drug products. It’s searchable by trade name, active ingredient, or application number through the Animal Drugs @ FDA portal, updated monthly. If you find an unlabeled pill and suspect it’s a pet medication, this database is your best starting point.

