How much data a QR code can hold depends on its version and error correction level. I set the highest QR version my recipe app would use by testing 54 made-up recipes, and all of them fit. Then I measured 25 real recipes, and 4 didn't. This is what went wrong, how I fixed it, and what testers of the Android build taught me along the way.
Some context: I build small apps on my own, as a hobby. The one I'm working on now is Sievebook, a recipe book app. It collects recipes from links, screenshots and photos of paper into one book, and it can hand a recipe to someone as a QR code.
Why real recipes didn't fit in a QR code
The biggest mistake was the QR code for sharing a recipe.
Long recipes didn't fit.
The recipe is compressed, encoded as Base45 and stored in the QR code's alphanumeric mode. The higher the version, the more modules (dots) and the more data it holds. I'd capped it at version 25 with error correction level M, based on recipes I made up for testing. All 54 test recipes fit.…