In this work, 13 ionic liquids (ILs), including 9 halogenide ILs and 4 non-halogenide ILs, were evaluated as demulsifiers for a model oil-in-water emulsion prepared with heptane and water, where sodium dodecylbenzenesulfonate (SDBS) was used as a surfactant. The separating efficiency (the fraction of heptane that has phase separated from the emulsion) of ILs was investigated using bottle tests and tube tests. Bottle tests show that halogenide ILs exhibited very fast demulsification, and among non-halogenide ILs, only trihexyltetradecylphosphonium dicyanamide (P666,14[N(CN)2]) could demulsify effectively but slower than halogenide ILs. Tube tests suggest that the demulsification efficiency is correlated with the mole ratio of IL and SDBS. For all ILs showing effective demulsification, instead of the desired extraction of the surfactant to an IL phase, it was found that the demulsification mechanism was ion exchange between IL anions and DBS, driven by the large Gibbs energy of hydration of the anions of the sodium salts that dissolve in water. Regeneration of these ILs and surfactants requires water-free reversed ion exchange processes with sodium salts and with salts containing the IL anions, probably limiting commercial applicability of the use of these ILs for demulsification.