Standard Codings for Information
This page converts between UTF-8, Hexadecimal, and Base64.
©2013, Bob Beeman
Updated 2013-07-10 @ 11:00 EDT (UT-4)
Read More
Important Notice

This page allows you to convert between 3 different representations of data:

Non-text data can be entered as either Base64 or Hexadecimal in the appropriate box and converted to the other coding by using the buttons. Trying to convert non-text data encoded in Hex or Base64 to text will, of course, result in gibberish. To decode the "secret" message on this page, press the "Sample" button to the left of the Base64 area, then press the "From Base64" button to the left of the text area. You can also convert the Hex sample, or start with Base64, convert to Hex, then convert to Text. You can select the contents of any area by pressing its "Select" button.

Text
Hexadecimal
Base64


Read More

f09f9a82 Train in Hexadecimal Unicode.

Binary information in modern computers is represented as groups of 8-bit bytes, or "octets" as they are sometimes called.


Text: Ordinary text is usually represented in the Unicode UTF-8 format. That means that every caracter in every living, plus the most common dead, languages can be represented as a group of 1, 2, 3, or 4 eight-bit bytes. US-ASCII is a strict subset of this code, and each US-ASCII character is encoded using only one byte. Use the upper box in the section above for Unicode or US-ASCII text.


Hexadecimal code represents each 8-bit byte as two Hexadecimal (4-bit) code symbols. The name "Hexadecimal" implies use of an underlying base-16 encoding, as opposed to our standard Arabic number system, which is base-10. Hexadecimal is intended to be human-readable, in that the underlying bit patterns can be easily read by humans, at least after a few minutes of training.

The reason for using hexadecimal coding is in order to transport special symbols, pictures, movies, or other items over media (such as email) which were intended to carry only ordinary text with english letters. Hexadecimal coding of such data allows it to be carried over such links and to be decoded properly at the destination. Hexadecimal uses only Arabic digits (0 - 1) and lower-case letters (a - f) to represent the 16 posible values. Two Hexadecimal digits (themselves each represented as two 8-bit text bytes) represent one 8-bit byte, so in a sense the "efficiency" of Hexadecimal is 50% - two bytes, each representing one Hexadecimal character, per payload or data byte.

The binary value vs the Hexadecimal code is as follows:

Value0123456789101112131415
Hex0123456789abcdef


Base64: The purpose of Base64 is to transport unrestricted data bytes with greater efficiency than can be achieved with Hexadecimal encoding. Base 64 uses 65 (not 64) US-ASCII symbols so that 6 bits can be sent with each byte of the code, rather than 4 bits as with Hexadecimal. The Base64 coding efficiency is 6 bits of data per 8-bit byte, for an average efficiency of 6/8 or 75%. Base64 is not intended to be human-readable, although somebody somewhere will prove me wrong on this.

There are many variants of Base64. The variant used for MIME email attachments is the one used for this page. Because each byte can carry only 6 bits of data Base64 is applied to groups of 3 bytes to give 4 Base64 characters. This creates a small problem for data which does not consist of a multiple of 3 bytes (24 bits). When (always at the end of a message) there is a number of bytes of data less than 3 to be encoded, the 65th character "=" is used to indicate that there are fewer than 3 bytes of data. In these cases any "missing" bits in the data due to the missing bytes are encoded as all zeros, and the trailing Base64 characters are replaced by "=". Thus a single letter "a" would be encoded as "YQ==" and "aa" would be encoded as "YWE=". "aaa" would of course be encoded as "YWFh", as the 3 "a" characters fill the total block.

The binary value vs the Base64 code is as follows:

Value0123456789101112131415
Base64ABCDEFGHIJKLMNOP
Value16171819202122232425262728293031
Base64QRSTUVWXYZabcdef
Value32333435363738394041424344454647
Base64ghijklmnopqrstuv
Value48495051525354555657585960616263
Base64wxyz0123456789+/


€ = e282ac
Ω = cea9

ecmanaut: Encoding / Decoding UTF8 in JavaScript

UTF-8 in JavaScript - monsur.hossa.in


This page is copyrighted "freeware"
©2013, Bob Beeman
www.bee-man.us
That means that although it is copyrighted, it is intended for you to use for your education or entertainment. Use for any other purpose is a violation of the copyright. You may use it yourself, copy and redistribute it, or even put it on your own website. I ask only that you not make any changes, and that you credit me as the source and reproduce this Notice unaltered and in its entirety. If you reuse any of the code, make sure to list me as one of your sources.

My only reward for writing this is the 15 milliseconds of fame I receive from having my name here. Don't deprive me of that.

You can copy this page by simply doing a "Save As" in your browser and putting it somewhere on your hard drive (or your web site). If you stop there the background will be gone. To preserve the background, copy the following file into this same folder, without changing its name, by again using your browser's "Save As". The next time you refresh the page, the background should be restored:

www_bee-man_us_background.gif

I make NO guarantee of any kind.
This page may contain serious errors.
Use this page entirely at your own risk!
This page is for entertainment purposes only.