The iron can be shuttled back and forth within the tube as an effective way to store data.
The team says it is achievable to build storage devices capable of carrying a terabyte of information per square inch, making it more effective than current techniques.
However, the data will also be almost incorruptible and should remain available for a billion years or more.
Current memory technologies are nowhere near as long lasting. Conventional flash memory usually fails after around three to five years.
As an example Alex Zettl, one of the team behind the invention, notes that the Doomsday Book written on vellum has so far lasted over 900 years, whereas the digital version of the book, encoded in 1986, failed in less than 20 years.
Details of the device will be published in scientific journal Nano Letters later this month.