[FOOD]

Scan a Barcode to Log a Product in Base

[Published 2026-08-27 · 878 words]

[THE SHORT ANSWER]

Open the logging sheet and tap Scan, then point the camera at the package. When the product is found, Base shows every nutrition basis it carries — per serving, per 100 g, per container — you pick the one matching what you ate, set the servings, and log. If nothing is found it says why rather than inventing a result.

Getting into the scanner

Two routes, both one tap:

  • The plus button in the tab bar, then the Scan chip on the logging sheet.
  • The Food Log's hamburger menu, then the Barcode tile.

Both open the same full-screen scanner, and both carry the date and hour through, so a scan at 9pm on Tuesday files at 9pm on Tuesday.

The camera permission is asked for once, with an explicit Allow camera button and a Cancel beside it. Base has no fallback that works without the camera other than the photo-library path below, so declining leaves you with search and Quick Add.

The scanner. Live scanning is the reliable path on iOS; the photo-library route exists for a package you have already photographed, and says so when it cannot read a code.

The nutrition basis, and why it is not optional

This is the step people skip, and skipping it is the single largest source of wrong numbers in barcode logging anywhere.

Packaged nutrition data is published against a reference amount, and different products use different ones. The same crisps might be listed:

BasisCaloriesProteinFatCarbs
Per 100 g5206 g30 g54 g
Per serving (28 g)1461.7 g8.4 g15 g
Per bag (150 g)7809 g45 g81 g

All three are correct. They describe different amounts of the same food. An app that silently picks one and calls it "one serving" is wrong for two of the three cases, and the error is large — a factor of five between the first and second rows here.

So Base lists every basis the product carries, each with its own macros, and makes you choose. The radio list shows the numbers so the difference is visible at the moment of choosing rather than after logging.

Then the servings stepper multiplies whichever basis you picked:

basis:     per bag (150 g), 780 kcal
servings:  0.5
logged:    390 kcal, 4.5 P, 22.5 F, 40.5 C

Scanning from a photo

The Upload photo path reads a barcode out of an image in your library. It is genuinely useful for a package you photographed in a shop, or a label you captured before throwing the box away.

It fails more often than live scanning, and when it does it says which failure it was:

  • No barcode in that photo — the code was not in frame or not legible.
  • Could not read a barcode from that photo — the decode itself failed.

Neither is silent, and neither logs anything.

When the product is not found

Three distinct outcomes, each with its own message:

  • Not in Open Food Facts — the code scanned fine, the database has no entry. Search by name, or use Quick Add.
  • Lookup failed — the network call did not complete. Try again, or enter it by name.
  • No barcode in that photo — nothing to look up.

None of them produce a zero-calorie entry. A missing food you know is missing is recoverable; a food logged as zero calories quietly corrupts your day and your measured maintenance with it.

Where the data comes from

Open Food Facts, a collaborative open product database. It is one of only three network calls the whole app makes — the others being account sync and the optional AI plate scan — and it happens only when you scan or type a search.

The practical consequence is coverage that is excellent for European products, good for widely-sold American ones, and patchy for regional or store-brand items. When it misses, Quick Add is the intended path rather than a workaround.

Saving what you scanned

The result screen offers to save the product to your meal library at the same time as logging it. Take it for anything you eat more than once — a saved product appears in the favourites strip and is then one tap, with no camera and no network involved.

See saving a meal for how the library works.

Common mistakes

Accepting the first basis without reading it. The default is the first one the product publishes, which is frequently per 100 g. If you ate a 28 g bag, per 100 g overstates it by roughly three and a half times.

Scanning the outer carton rather than the inner package. Multipack cartons often carry their own barcode with per-container data for the whole box.

Assuming a missing product means Base cannot log it. Quick Add takes fifteen seconds and produces an entry that is just as real.

Scanning the same product every day. Save it the first time.

Treating an Open Food Facts entry as authoritative. It is crowd-sourced. If the macros look implausible against the label in your hand, trust the label and correct the amount.

Logging the whole packet when you ate half. The servings stepper accepts fractions for exactly this reason.

What to do next

Scan one thing you eat regularly and tick the save option as you log it. Check that the basis you picked matches the amount you actually ate — then it is correct every time it comes off the favourites strip afterwards.

Questions

How do I scan a barcode in Base?

Open the logging sheet with the plus button and tap Scan, or use the Barcode tile in the Food Log's shortcuts menu. Point the camera at the package. When the product is found you pick a nutrition basis, set the number of servings, and log it. You can also scan a barcode out of a photo already in your library.

What is a nutrition basis and why do I have to choose one?

Packaged food data is published against different reference amounts — per 100 g, per serving, per container — and they are not interchangeable. A product listing 250 calories per 100 g and 400 per serving is one product with two correct numbers. Base shows every basis the product carries with its macros, and you pick the one matching what you actually ate.

What happens if the barcode is not recognised?

Base says so and names the reason: not in the database, lookup failed, or no barcode readable in that photo. It never invents a result. Search the product by name from the logging sheet, or enter its macros with Quick Add — both land on the plate the same way.

Where does the barcode data come from?

Open Food Facts, a collaborative open database of food products. It is one of only three network calls the app makes, it happens only when you scan or search, and it degrades silently to manual entry when it finds nothing or the network is unavailable.

Can I save a scanned product for next time?

Yes. The result screen offers to save the product to your meal library as you log it, so the next time it is one tap from the favourites strip rather than another scan.

[KEEP READING]