# Visualizing hex dumps with Unicode emoji

DevFeed: [Visualizing hex dumps with Unicode emoji](<https://devfeed.tech/articles/visualizing-hex-dumps-with-unicode-emoji-21640.md>)

Original publisher: [Read original article](<https://www.windytan.com/2014/10/visualizing-hex-bytes-with-unicode-emoji.html>)

Author: Oona Räisänen (noreply@blogger.com)

Published: 2014-10-29T23:52:00Z

Content type: tutorial

Language: en

Sources: [Oona Räisänen](<https://devfeed.tech/sources/oona-raisanen.md>)

Topics: [Emoji](<https://devfeed.tech/topics/emoji.md>), [Perl](<https://devfeed.tech/topics/perl.md>), [OpenSSH](<https://devfeed.tech/topics/openssh.md>), [Script](<https://devfeed.tech/topics/script.md>), [ssh](<https://devfeed.tech/topics/ssh.md>), [Terminal](<https://devfeed.tech/topics/terminal.md>)

Tags: [art](<https://devfeed.tech/tags/art.md>), [hex-value](<https://devfeed.tech/tags/hex-value.md>), [numbers](<https://devfeed.tech/tags/numbers.md>), [openssh](<https://devfeed.tech/tags/openssh.md>), [perl](<https://devfeed.tech/tags/perl.md>), [script](<https://devfeed.tech/tags/script.md>), [silly](<https://devfeed.tech/tags/silly.md>), [ssh](<https://devfeed.tech/tags/ssh.md>), [terminal](<https://devfeed.tech/tags/terminal.md>)

## AI overview

A Perl script visualizes SSH public key fingerprints and other colon-separated hexadecimal byte sequences by mapping each byte to a selected Unicode emoji. The article explains the byte-to-emoji mapping and notes that the script could be extended to other hex-formatted sources such as xxd.

## Source excerpt

Memorizing SSH public key fingerprints can be difficult; they're just long random numbers displayed in base 16. There are some terminal-friendly solutions, like OpenSSH's randomart. But because I use a Unicode terminal, I like to map the individual bytes into characters in the Miscellaneous Symbols and Pictographs block. This Perl script does just that: @emoji = qw( 🌀 🌂 🌅 🌈 🌙 🌞 🌟 🌠 🌰 🌱 🌲 🌳 🌴 🌵 🌷 🌸 🌹 🌺 🌻 🌼 🌽 🌾 🌿 🍀 🍁 🍂 🍃 🍄 🍅 🍆 🍇 🍈 🍉 🍊 🍋 🍌 🍍 🍎 🍏 🍐 🍑 🍒 🍓 🍔 🍕 🍖 🍗 🍘 🍜 🍝 🍞 🍟 🍠 🍡 🍢 🍣 🍤 🍥 🍦 🍧 🍨 🍩 🍪 🍫 🍬 🍭 🍮 🍯 🍰 🍱 🍲 🍳 🍴 🍵 🍶 🍷 🍸 🍹 🍺 🍻 🍼 🎀 🎁 🎂 🎃 🎄 🎅 🎈 🎉 🎊 🎋 🎌 🎍 🎎 🎏 🎒 🎓 🎠 🎡 🎢 🎣 🎤 🎥 🎦 🎧 🎨 🎩 🎪 🎫 🎬 🎭 🎮 🎯 🎰 🎱 🎲 🎳 🎴 🎵 🎷 🎸 🎹 🎺 🎻 🎽 🎾 🎿 🏀 🏁 🏂 🏃 🏄 🏆 🏇 🏈 🏉 🏊 🐀 🐁 🐂 🐃 🐄 🐅 🐆 🐇 🐈 🐉 🐊 🐋 🐌 🐍 🐎 🐏 🐐 🐑 🐒 🐓 🐔 🐕 🐖 🐗 🐘 🐙 🐚 🐛 🐜 🐝 🐞 🐟 🐠 🐡 🐢 🐣 🐤 🐥 🐦 🐧 🐨 🐩 🐪 🐫 🐬 🐭 🐮 🐯 🐰 🐱 🐲 🐳 🐴 🐵 🐶 🐷 🐸 🐹 🐺 🐻 🐼 🐽 🐾 👀 👂 👃 👄 👅 👆 👇 👈 👉 👊 👋 👌 👍 👎 👏 👐 👑 👒 👓 👔 👕 👖 👗 👘 👙 👚 👛 👜 👝 👞 👟 👠 👡 👢 👣 👤 👥 👦 👧 👨 👩 👪 👮 👯 👺 👻 👼 👽 👾 👿 💀 💁 💂 💃 💄 💅 ); while (<>) { if (/[a-f0-9:]+:[a-f0-9:]+/) { ($b, $m, $a) = ($`, $&, $'); print $b.join(" ", map { $emoji[$_] } map hex, split /:/, $m)." ".$a; } } What's happening here? First we create a 256-element array containing a hand-picked collection of emoji. Naturally, they're all assigned an index from 0x00 to 0xff. Then we'll loop through standard input and look for lines containing colon-separated hex bytes. Each hex value is replaced with an emoji from the array. Here's the output: The script could easily be extended to support output from other hex-formatted sources as well, such as xxd: Some additional methods for visualizing hex dumps and key fingerprints, from the comments section: PGP Strong Set Top 50 Fingerprint Art VizHash GD - a visual hash