Ionic liquids can be immobilized in a membrane by, for example, bonding to a support such as a matrix, or by inclusion within a gel. Immobilized ionic liquids can be used in a number of applications, such as separation of carbon dioxide or other gases from gas streams. Membranes can be included in electrochemical cells. For example, a membrane can contain sufficient immobilized ionic liquid to reduce ionic current density of at least one of protons and hydroxyl ions, relative to carbon-containing ionic current density. A gas stream containing carbon dioxide can be introduced on a cathode side, while a source of hydrogen gas can be introduced on the anode side of the membrane. Operation of an electrochemical cell with such a membrane can separate the carbon dioxide from the gas stream and provide it at a separate outlet.