The dots and dashes were spotted by NASA's Mars Reconnaissance Orbiter, which used its HiRISE (High Resolution Imaging Science Experiment) camera to photograph the surface.
The camera operates in visible wavelengths, the same as human eyes, but has a telescopic lens.
Specialists from the HiRISE laboratory explained that this "code" was formed in a dune field just south of the planet's north pole.
The unique topography of Mars often leads to similar formations but in this case the peculiar patterns were formed because of a circular depression, which is probably an old and infilled impact crater.
This has limited the amount of sand available for dune formation, and influenced local winds.
The long 'dashes' are linear dunes believed to be formed by bi-directional winds, traveling at right angles to the dune and funneling material into a linear shape.
The short 'dots' are mounds of sand called "barchanoid dunes," which are made when there is some interruption to the process of forming linear dunes.
NASA scientists have even had a go at decoding the message, and NASA planetary scientist Veronica Bray revealed to technology blog Gizmodo that the Mars code says:
NEE NED ZB 6TNN DEIBEDH SIEFI EBEEE SSIEI ESEE SEEE!!
The possibility of life on the Red Planet is a hot topic among scientists, who believe it may harbor life below its surface, or have been home to an archaic form of life billions of years ago.
Recently Alfred McEwen, Professor of planetary geology at the University of Arizona, theorized that life exists in pockets of water several kilometers below the Martian surface, in a microbial form similar to that which exists in the deep ice-bound lakes of Antarctica.