Text Encoding Converter

Convert text to hex, binary, decimal byte values and Base64, and back again. Type or paste into any box and the others update.

Type or paste into any box and the others update.

How it works

Computers store text as numbers. Every character has a code point, and an encoding turns code points into bytes. This page uses UTF-8, which is the same as ASCII for plain English letters, digits and punctuation (one byte each, values 0 to 127) and uses two to four bytes for accented letters, symbols and emoji.

A = 65 = 0x41 = 01000001

Base64 groups the bytes in threes (24 bits) and writes them as four characters from an alphabet of 64 (A to Z, a to z, 0 to 9, + and /), padding with = at the end. The result is about 33 percent longer than the bytes but uses only safe text characters. It is an encoding, not encryption: anyone can reverse it. To work with individual bits and register fields use the Bitwise and Register Field Calculator.

Worked example

“Hello” is five bytes: H = 72 = 0x48, e = 101 = 0x65, l = 108 = 0x6C (twice) and o = 111 = 0x6F, so the hex is 48 65 6C 6C 6F. In Base64 the 40 bits become SGVsbG8=. The letter é is U+00E9 and takes two bytes in UTF-8, C3 A9 (Base64 w6k=), and the euro sign € is U+20AC, three bytes E2 82 AC (Base64 4oKs).

Things to know

An odd number of hex digits, a binary string whose length is not a multiple of 8, or a decimal value above 255 cannot be a whole number of bytes: the page marks the box and says why.

Bytes that are not valid UTF-8 (such as FF FE) cannot be shown as text. The other boxes still show them.

Other encodings (Latin-1, UTF-16, Shift-JIS) give different bytes for the same characters. If a file looks garbled, a wrong encoding is the usual cause.

Base64 is not secure. Use it for transporting data, never for hiding secrets.

Common questions

What is the difference between ASCII and UTF-8?

ASCII defines 128 characters in 7 bits. UTF-8 includes all of ASCII unchanged and adds every other character using multi-byte sequences, so any ASCII text is already valid UTF-8.

Why does Base64 end with =?

Base64 works in groups of three bytes. If the data does not fill the last group, one or two = signs pad it to a multiple of four characters.

Is my text sent anywhere?

No. The conversion runs in your browser.

Sources

  • RFC 3629 (UTF-8), RFC 4648 (Base16, Base32 and Base64 encodings), and the Unicode Standard.
  • ANSI X3.4 / ISO/IEC 646 (ASCII).

Last reviewed: November 2, 2026