Foam can be applied to enhance oil recovery from a reservoir. Currently, to understand and model the behavior of foam in an oil reservoir, experiments need to be conducted in the presence of the specific crude oil, and extrapolating from one crude oil to another is not possible. It is therefore desirable to model the impact of a crude oil on foam solely based on the crude-oil composition. This would allow one to efficiently screen reservoirs for foam application. Here we investigate the behavior of foam in the presence of a crude oil and in the presence of mixtures of pure components, which we choose based on the gas chromatography analysis of the crude oil as well as its total acid number and total base number. To analyze the impact of an oil mixture on bulk foam we shake test tubes with surfactant solution and either a mixture of pure oil components or crude oil and analyze foam height and liquid height over time. We also conduct experiments in a porous medium, where we coinject mixtures of pure components, surfactant solution, and gas. We fix the oil injection rate and vary the ratio of the gas to surfactant solution. We use the following organic compounds (OC) to represent the crude oil: toluene (an aromatic), oleic acid (an organic acid), octanol (an organic base), methylcyclohexane (a cycloalkane), dimethyl sulfoxide (an organosulfur), n-octane, and hexadecane. However, when one or all of the first components is added to a 50/50 (vol %) mixture of n-octane and hexadecane, in proportions similar to their presence in the crude oil, the impact of the oil mixture on foam (both in bulk and in porous media) is only slightly different from the impact of the n-octane and hexadecane mixture. We formed a “synthetic” crude oil, with its composition mimicking the composition of a crude oil and its total acid/base number. Although the pure OC and synthetic crude oil weaken foam in bulk and in porous media, their impact on foam was less severe than the impact of the crude oil on the foam. Based on the composition of an oil mixture and the impact of its components, separately, on foam, it is not clear how to predict the impact of the oil mixture on foam in bulk or porous medium. However, in our case we find a good correlation between the foam apparent viscosity in porous media and the product of the bulk foam half-life and initial volume. One implication is that if either the half-life or initial volume of bulk foam is poor, the foam performs poorly in the porous medium.