Saved

Press the star next to a tool's name to save it.

All my tools

Decimal to Base64 Converter

This decimal to Base64 converter encodes decimal byte values from 0 to 255 as Base64 text, and decodes Base64 back into decimal bytes, in your browser.

Restored your last values ·

Each decimal value is one byte, from 0 to 255. Separate the values with spaces or commas.

Your data stays in your browser. Nothing is uploaded.

Converted value

–

Enter a value and press Convert.

A decimal to Base64 converter turns a list of byte values written in decimal, such as 77 97 110, into Base64 text, and back again. Enter numbers from 0 to 255 separated by spaces or commas, and this decimal to Base64 converter treats each one as a byte and encodes the bytes as Base64. Switch direction to decode Base64 into decimal byte values. It's handy for programming, data formats and checking encodings by hand.

What is Base64?

Base64 is a binary-to-text encoding that uses 64 printable characters to represent each 6-bit segment of a sequence of bytes. It lets binary data travel over channels that only handle text. It's used widely on the web, for example to embed images in HTML and CSS, and for email attachments, because email was originally designed to carry 7-bit ASCII text only. Encoding increases the size by about 33%: every 3 bytes become 4 characters.

Why decimal bytes?

A byte holds a value from 0 to 255. Programs, debuggers and protocol documents often list bytes as decimal numbers, for example as an array of integers in code or as the character codes of a string. This converter lets you go straight from those numbers to Base64 without writing them out as binary or hexadecimal first, and back again.

How the conversion works

  1. Each decimal number becomes one 8-bit byte. For example, 77 is 01001101.
  2. The bytes are joined and split into groups of 6 bits.
  3. Each 6-bit group, a number from 0 to 63, picks one character from the Base64 alphabet: A–Z, a–z, 0–9, + and /.
  4. If the number of bytes isn't a multiple of 3, the result is padded with one or two = signs.

Worked example

The bytes 77 97 110 are the character codes for the letters M, a and n. As bits they are 01001101 01100001 01101110. Split into 6-bit groups: 010011 010110 000101 101110, which are 19, 22, 5 and 46. In the Base64 alphabet those are T, W, F and u, so the result is TWFu. Three bytes become exactly four characters, so no padding is needed. Two bytes, 77 97, give TWE= with one = sign.

How to use the decimal to Base64 converter

  1. Choose the direction: Decimal to Base64 or Base64 to decimal.
  2. Enter the values. For decimal, type numbers from 0 to 255 separated by spaces or commas. For Base64, paste the text.
  3. Press Convert to see the result, the number of bytes and the number of Base64 characters.
  4. Copy or share the result.

Decimal number or decimal bytes?

This tool reads each number as a separate byte, which is how Base64 is defined. It doesn't convert one large number, such as 1234567, into a base-64 number. If you have a single large number, first write it as bytes, or use our base converter for number bases. To encode ordinary text instead, such as a sentence, use the Base64 encode and decode tool, which works from the characters directly.

Is it private?

Yes. The conversion runs in your browser, and nothing you type is uploaded.

Reading the result

Under the result you'll see how many bytes were encoded and how many Base64 characters were produced. Base64 always comes in blocks of four characters, each block holding three bytes. If the last block has only one or two bytes, = signs fill the gaps: two = signs mean the last block held one byte, and one = sign means it held two. When you decode, the tool lists each byte as a decimal number separated by spaces, ready to paste into code or a spreadsheet.

Where decimal bytes come from

  • Character codes: the ASCII code of each character in a string, such as 72 for H and 105 for i.
  • Code and debuggers: byte arrays printed as lists of integers, for example from a network packet or a file header.
  • Colors: red, green and blue values from 0 to 255, such as 255 99 71 for tomato red.
  • Sensors and devices: raw readings sent one byte at a time.

In each case, Base64 gives you a compact, text-safe way to store or send the same bytes, for example in JSON, a URL parameter, an HTML data attribute or an email.

Checking your work

A quick way to check an encoding is to convert it back. Copy the Base64 result, switch the direction to Base64 to decimal, paste it in and convert. You should get exactly the same list of numbers you started with. If the numbers differ, check for a value over 255 or a typing mistake in the original list. The number of bytes shown should match how many values you entered.

Base64 and file size

Because Base64 uses 4 characters for every 3 bytes, the encoded text is about a third larger than the original data. A list of 300 byte values becomes 400 Base64 characters. Line breaks, which some systems add every 76 characters or so, make it slightly larger again. That's the trade-off for being able to send binary data safely as plain text.

Common mistakes

  • Values over 255. A byte can't be larger than 255.
  • Missing separators. Put a space or comma between values.
  • Forgetting padding. Base64 length must be a multiple of 4 when decoding.
  • Expecting encryption. Base64 is an encoding anyone can reverse.

What next

Use this often? Add Decimal to B to your Home screen.

Frequently asked questions

How does the decimal to Base64 converter work?

Each decimal value from 0 to 255 becomes a byte; the bytes are split into 6-bit groups, and each group becomes one Base64 character.

What is 77 97 110 in Base64?

TWFu. Those bytes spell Man, and three bytes make exactly four Base64 characters.

Can I convert Base64 back to decimal?

Yes. Choose Base64 to decimal to see each byte as a decimal number.

Why must values be 0 to 255?

Each value is one byte, and a byte holds 8 bits, so it ranges from 0 to 255.

Is Base64 encryption?

No. It's an encoding that anyone can decode, so don't use it to hide secrets.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Developer Tools