Food label generator
Nutrition declaration (EU 1169/2011) and Nutrition Facts (US FDA) from a recipe: energy, rounding, %RI and %DV, the ingredient list with allergens in bold, print and PDF. The regulatory rules are not verified.
Regulatory rules not verified against the official texts — check before use. Energy factors, rounding, reference intakes, daily values, allergen lists, mandatory particulars and type sizes were written from memory of Regulation (EU) No 1169/2011, the Commission’s 2012 guidance and 21 CFR 101, not copied from the official texts. Labels made here are drafts: they are not a compliance check.
Recipe
Paste, open a CSV, TSV, TXT or XLSX file (up to 20 MB), or drop it on the field. Files are read in this browser only.
Columns (28 possible, found by the header names)
Ingredient Quantity (g) Fat (g) Oat flakes 380 7.0 Honey 150 0
1 row = 1 ingredient
Columns: tab, ; or ,
Decimals: 12,5 or 12.5
Paste measurements to start.
One row per ingredient: the quantity at the time of use in grams and the nutrients per 100 g of the ingredient. Energy is computed. Leave a value empty when it is not known: the label then says “value missing” instead of counting it as 0. Allergens: keys such as milk, wheat, hazelnuts, soybeans, fish:cod, separated by “;”. Mark words by hand with asterisks (*soya* lecithin) to choose what is bold. Tick QUID for an ingredient emphasised in the name. Editing the table rewrites the data field with the columns in use.
Label settings
Runs in this browser. Data is not uploaded or stored.
Labels
—
Method
- Status of the rules: not verified. Every regulatory value the tool uses (energy factors, rounding bands, reference intakes, daily values, nutrient names and order, allergen lists, mandatory particulars, minimum type sizes, the Nutrition Facts layout) is in one data file marked “unverified”, with the source each was recalled from. None of it was compared with the official texts. Treat every label as a draft and check it against the current consolidated texts (and, for the EU, the national rules of the country of sale) before use. The tool does not certify compliance.
- Recipe: one row per ingredient with the quantity at the time of use (grams) and its nutrients per 100 g. The finished product per 100 g = Σ quantity × value / 100, divided by the final weight, × 100. Final weight = recipe weight × (1 − loss / 100): the loss (water evaporating in baking, cooking or drying) lowers the weight while every nutrient is kept. This is the usual recipe calculation; it does not model nutrient losses in cooking (vitamins) or water uptake. Per 100 ml multiplies the per-100 g values by the density (g/ml); a portion or serving scales them by its size.
- Missing values: a nutrient column with an empty cell for an ingredient used in the recipe makes the product’s value unknown: the label shows “value missing” and the warnings list it. A nutrient without a column is not declared (voluntary EU rows are left out; required rows show “value missing”). Nothing is counted as 0 unless it is written as 0.
- Salt and sodium: salt = sodium × 2.5 (Regulation (EU) No 1169/2011, Annex I point 11). An ingredient with only one of them gets the other from it; with both, each is used as given (a difference above 5 % is reported).
- EU energy (Annex XIV): kJ = 37 fat + 17 carbohydrate + 17 protein + 8 fibre + 10 polyols + 29 alcohol + 13 organic acids + 25 salatrim + 0 erythritol; kcal with 9, 4, 4, 2, 2.4, 7, 3, 6 and 0. Salatrim is counted as part of the fat, erythritol as part of the polyols and the polyols as part of the carbohydrate (the EU carbohydrate excludes fibre and includes polyols): fat and carbohydrate are taken without them before the factors apply. Without a Polyols column, erythritol is the only polyol.
- EU declaration (Article 30, Annex XV): energy, fat, saturates, carbohydrate, sugars, protein and salt always; mono-unsaturates, polyunsaturates, polyols, starch and fibre when the data has them. Vitamins and minerals are not declared on the EU label. Rounding (Commission guidance on tolerances, December 2012): energy to 1 kJ and 1 kcal; fat, carbohydrate, sugars, polyols, starch, fibre and protein to 1 g from 10 g, to 0.1 g above 0.5 g, “<0.5 g” (or “0 g”) at or below 0.5 g; saturates and the other fatty acids the same with 0.1 g as the lowest step and limit; salt to 0.1 g from 1 g, to 0.01 g above 0.0125 g, “<0.01 g” (or “0 g”) at or below 0.0125 g. The band is chosen by the unrounded amount and the amount is rounded half up (after taking it to 12 significant digits), so 9.96 g is declared as 10.0 g and 2.45 g as 2.5 g. An amount of exactly 0 is “0 g”.
- %RI (Annex XIII Part B): energy 8400 kJ (2000 kcal), fat 70 g, saturates 20 g, carbohydrate 260 g, sugars 90 g, protein 50 g, salt 6 g; per 100 g (or 100 ml) and per portion as chosen, with the statement “Reference intake of an average adult (8400 kJ / 2000 kcal)”. FactoKit convention: the percent of the unrounded amount to a whole number, energy from kJ, “<1” above 0 but below 0.5 %.
- US Nutrition Facts (21 CFR 101.9, 2016 format) per serving: serving = the typed amount in g (or mL × density). Calories by the general factors 4 / 4 / 9 for protein, total carbohydrate and fat (101.9(c)(1)(i)(B)), plus 7 per gram of alcohol; total carbohydrate = EU carbohydrate + fibre. Rounding: calories 0 below 5, to 5 up to 50, to 10 above; fat, saturated and trans fat 0 below 0.5 g, to 0.5 g below 5 g, to 1 g from 5 g; cholesterol 0 below 2 mg, “less than 5 mg” from 2 to 5 mg, to 5 mg above; sodium and potassium 0 below 5 mg, to 5 mg up to 140 mg, to 10 mg above; total carbohydrate, fiber, total and added sugars and protein 0 below 0.5 g, “less than 1 g” below 1 g, to 1 g from 1 g; vitamin D to 0.1 mcg, calcium to 10 mg, iron to 0.1 mg. %DV (2016 daily values: fat 78 g, saturated fat 20 g, cholesterol 300 mg, sodium 2300 mg, total carbohydrate 275 g, fiber 28 g, added sugars 50 g, vitamin D 20 mcg, calcium 1300 mg, iron 18 mg, potassium 4700 mg) from the unrounded amount, to 1 % for the nutrients and in steps of 2 % (up to 10 %), 5 % (up to 50 %) and 10 % for vitamins and minerals, 0 % below 2 %; 0 % whenever the amount is declared as 0. Protein %DV is not shown (needed only with a protein claim). Servings per container = net quantity / serving, to 0.5 below 5 and to a whole number from 5, with “About” when it is not exact.
- Panel layout: the 2016 Nutrition Facts panel is approximated in CSS: black on white in both themes, “Nutrition Facts” 24 pt, serving lines 10 pt, “Calories” 16 pt and its number 22 pt, nutrient lines 8 pt, footnote 6 pt, bars of 10 pt, 5 pt and 1 pt and hairlines of 0.25 pt. These sizes were recalled, not measured on FDA’s Appendix B; the font is IBM Plex Sans, not Helvetica.
- List of ingredients: descending order of weight at the time of use (EU Article 18, 21 CFR 101.4); equal weights keep the recipe order. A compound ingredient is followed by its own ingredients in brackets. EU: allergens in bold (Article 21). A row’s words that name one of its declared allergens are bold (whole words; e.g. milk, butter, whey, cream for milk; “cocoa butter” and “coconut milk” are not); an allergen none of whose words occurs is added in brackets in bold (“Lecithin (soya)”); asterisks mark the bold words by hand (
*soya* lecithin) and then nothing else of that row is bold. Words that look like an allergen the row does not declare are reported. US: the same order without emphasis, and a “Contains:” statement with the major food allergens (milk, egg, fish, crustacean shellfish, tree nuts, wheat, peanuts, soy, sesame; the species or nut type where given asfish:cod). The precautionary “may contain” text is voluntary and printed as typed. - Allergen keys: wheat, rye, barley, oats, spelt, kamut (EU: cereals containing gluten; spelt and kamut also US wheat), crustaceans, eggs, fish, peanuts, soybeans, milk, nuts or almonds, hazelnuts, walnuts, cashews, pecans, brazil-nuts, pistachios, macadamia, celery, mustard, sesame, sulphites, lupin, molluscs; common forms such as soy, soya, egg or peanut are accepted. “Gluten” alone is refused: name the cereal. Sulphites count only above 10 mg/kg (as SO₂), which the tool cannot know.
- QUID (Article 22, Annex VIII): for an ingredient ticked as emphasised, its quantity at use related to the finished product (after the loss): quantity / final weight × 100, a whole percent (one decimal below 1 %), written after the name (“Oat flakes 40%”); above 100 % the grams used for 100 g of product are given instead.
- Text size: the label text is set so that the letter height is at least the legal minimum: EU x-height 1.2 mm (0.9 mm when the largest surface of the package is below 80 cm²; Article 13, Annex IV); US lowercase “o” 1/16 inch (1/32 inch below 12 square inches; 21 CFR 101.2(c)). Font size = minimum height / the letter’s height in em of IBM Plex Sans (x 0.532 em, o 0.548 em, measured in Chromium). A label whose content does not fit its size is reported; the content is cut off at the edge, never scaled down.
- Printing: an A4 portrait sheet (10 mm margins) with one label or as many as fit, with a gap of 4 mm, or 10 mm with crop marks (3 mm long, 1 mm from the label). Every sheet has a header line with the label size and the warning about the rules. Print at 100 % for true sizes. The label HTML export holds both labels with their styles and the warning (fonts are those of the computer that opens it).
- Mandatory particulars: the EU list of Article 9(1) and the US label elements are shown with what this label holds. Instructions for use and the alcoholic strength are not covered; the date, origin and operator lines are printed as typed and not checked.
- Checks: an independent Python script re-encodes the rules from the same recalled sources (it does not read the tool’s data file except to compare it with its own encoding) and recomputes the sums, energy, rounding at every band edge, %RI, %DV, servings, ingredient order, QUID and the allergen emphasis for several recipes; the tool agrees with it exactly. This checks the arithmetic, not the rules themselves.
- Example: an illustrative granola bar. The nutrient values of its ingredients are illustrative values, not from a food composition database, and the business name is made up.
- Files: CSV, TSV and TXT are read as if pasted (UTF-8, UTF-16, otherwise Windows-1257). XLSX: choose the sheet and the columns or a cell range; formula cells use the value Excel last saved, dates are kept as text. Files up to 20 MB are read in this browser only and never uploaded.
- XLSX files are read with SheetJS Community Edition 0.20.3, Apache License 2.0 (license text at the end of this file).