Saved

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

All my tools

Octal to Base64 Converter

Enter octal byte values such as 115 141 156, and this octal to Base64 converter gives you the Base64 text. You can also switch direction to turn Base64 back into octal.

Restored your last values ·

Each octal value is one byte, from 0 to 377. Separate the values with spaces.

Your data stays in your browser. Nothing is uploaded.

Converted value

–

Enter a value and press Convert.

An octal to Base64 converter changes data that's written as octal byte values into the compact text format used by email, web pages and many APIs. Octal still appears in older systems, in escape sequences and in some data dumps, while Base64 is the usual way to carry binary data through a channel that only handles text. Enter your octal values, separated by spaces, and this octal to Base64 converter produces the Base64 text straight away. Switch the direction to turn Base64 back into octal. Everything runs in your browser, so the data that you paste here isn't sent to any server.

How to use the octal to Base64 converter

  1. Choose the direction: octal to Base64, or Base64 to octal.
  2. Enter your values. Each octal value stands for one byte.
  3. Press Convert.
  4. Copy the result.

What is octal?

Octal is a numeral system for representing a value in base 8. Each digit runs from 0 to 7, and each place is a power of 8. So the octal number 112 is (1 × 64) + (1 × 8) + (2 × 1), which is 74 in decimal. Because 8 is 2 to the power of 3, a single octal digit represents exactly three bits. That's why it was a convenient shorthand for binary on early computers. A single byte, which is eight bits, can hold any value from 0 to 377 in octal, the same as 0 to 255 in decimal.

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 you send binary data over a channel that only supports text. The trade-off is size. Base64 makes the data about 33% larger than the original, because every three bytes turn into four characters.

A worked example

Let's convert the octal values 115, 141 and 156. In decimal, those are 77, 97 and 110, and they're the ASCII codes for the letters M, a and n.

OctalDecimalBinary
1157701001101
1419701100001
15611001101110

Joined together, the 24 bits are split into four groups of six: 010011, 010110, 000101 and 101110. Those groups have the values 19, 22, 5 and 46. In the Base64 alphabet they correspond to T, W, F and u, so the result is TWFu.

How your input is read

You enterRead as
115 141 156Three bytes
115141156Three bytes, taking three digits at a time
7 77 377Three bytes, with values of 7, 63 and 255
400Not valid, because it's larger than one byte
128Not valid, because 8 isn't an octal digit

A long run of digits is only accepted if it divides evenly into groups of three. If your values have different lengths, keep the spaces between them, as otherwise there's no way to tell where each one ends.

What about the equals signs?

Base64 works on groups of three bytes. If the data doesn't divide evenly by three, the output is padded with one or two equals signs at the end so that the length is a multiple of four. For instance, the two bytes 115 141 become TWE=, and the single byte 115 becomes TQ==. These signs aren't data. They simply mark how many bytes were missing from the last group, and you should keep them when you copy the result.

Where you'll see octal and Base64

  • Escape sequences in programming languages can use octal to write a byte.
  • File permissions on Unix-like systems are shown in octal, such as 755.
  • Email attachments are commonly sent using Base64.
  • Data URLs embed small images in a page as Base64.
  • APIs and tokens often use Base64 for binary values.

Base64 isn't encryption

Anyone can decode Base64, including with this very page. It doesn't hide anything, and it offers no protection on its own. Don't use it to secure passwords or private information. If you need to keep something secret, use proper encryption, and treat any Base64 text as if it were plain text.

Going from Base64 back to octal

Select Base64 to octal and paste your text. The tool ignores spaces and line breaks, checks that the characters are valid, and returns each byte as a three-digit octal number. Leading zeros are kept, so that every value has the same width. For example, TQ== gives 115. If the tool reports an error, check that nothing was cut off when you copied the text, and that the padding is still in place.

Checking your input first

Before you convert anything, it's worth looking at where your numbers came from. If you copied them from a program or a log file, they may have a prefix such as a backslash or a leading zero that marks them as octal. Remove those prefixes, and leave only the digits and the spaces between them. If the source lists decimal numbers instead, you'll need to convert those first, as the digits would otherwise be read incorrectly. For example, the decimal number 77 and the octal number 77 are two different values, and only one of them gives the letter M.

Common mistakes

  • Using the digits 8 or 9. They don't exist in octal.
  • Entering a value above 377. A single byte can't hold it.
  • Removing the equals signs from the end of the Base64 text.
  • Confusing the number with its text. This tool encodes byte values, not the digits as characters.

Encode plain text with the Base64 encoder and decoder, convert bits with the binary to Base64 converter, and look up character codes in the ASCII table.

What next

Use this often? Add Octal to Bas to your Home screen.

Frequently asked questions

What does an octal to Base64 converter do?

It reads octal byte values and encodes those bytes as Base64 text.

What is the largest octal value allowed?

Each value can be up to 377, which is the largest value of one byte.

Can I convert Base64 back to octal?

Yes. Change the direction to Base64 to octal.

Why are there equals signs in the result?

They're padding, used when the data doesn't divide evenly into groups of three bytes.

Is Base64 secure?

No. It's an encoding, and anyone can decode it.

What went wrong?

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

Thanks for your feedback.

More Developer Tools