Nucleic acids have become a powerful tool in nanotechnology because of their conformational polymorphism. However, lack of a medium in which nucleic acid structures exhibit long-term stability has been a bottleneck. Ionic liquids (ILs) are potential solvents in the nanotechnology field. Hydrated ILs, such as choline dihydrogen phosphate (choline dhp) and deep eutectic solvent (DES) prepared from choline chloride and urea, are ‘green’ solvents that ensure long-term stability of biomolecules. An understanding of the behaviour of nucleic acids in hydrated ILs is necessary for developing DNA materials. We here review current knowledge about the structures and stabilities of nucleic acids in choline dhp and DES. Interestingly, in choline dhp, A–T base pairs are more stable than G–C base pairs, the reverse of the situation in buffered NaCl solution. Moreover, DNA triplex formation is markedly stabilized in hydrated ILs compared with aqueous solution. In choline dhp, the stability of Hoogsteen base pairs is comparable to that of Watson–Crick base pairs. Moreover, the parallel form of the G-quadruplex is stabilized in DES compared with aqueous solution. The behaviours of various DNA molecules in ILs detailed here should be useful for designing oligonucleotides for the development of nanomaterials and nanodevices.