Abstract A novel and eco-friendly method is described for the direct preparation of a series of ionic liquids containing alkylimidazolium-based cations and hexafluorophosphate-based (or tetra-fluoroborate-based) anions in a one-pot procedure by using ionic liquids themselves as solvents.