Format Code Now
/

Octal to Base64 Converter

ED-61

Paste octal byte values such as 110 145 154 and get the Base64 string for those bytes. Base64 back to octal is included.

Runs in your browser. Nothing is uploaded.

Octal bytes (000 to 377) or Base64

Result

How to use it

  1. Paste octal bytes into the input box, from 000 to 377, separated by spaces, commas or line breaks.
  2. Choose the standard or URL-safe alphabet and whether to keep the = padding.
  3. Click Octal to Base64.
  4. To reverse it, paste Base64, pick a separator and click Base64 to octal.

One number, one byte

A byte holds a value from 0 to 255, which in octal is 0 to 377. Each octal number you paste is read as one byte, and the bytes are then encoded with Base64. So 110 is the byte 72, the letter H in ASCII, and the single byte encodes to SA==. A number above 377, or one with more than three digits, is an error, because the tool does not guess where one byte ends and the next begins.

Accepted notations

Numbers can be separated by spaces, commas, semicolons or line breaks. A 0o prefix, as in 0o110, and a backslash prefix, as in \110 from C style escapes, are accepted. Digits 8 and 9 are rejected with their position. The bytes are encoded exactly as given, not as text, so no character set conversion is involved.

Base64 to octal

This direction reads standard or URL-safe Base64, with or without padding and with line breaks ignored, and prints each byte as three octal digits. You can choose a space, a comma or a line break between bytes. If the Base64 contains text, the octal list is its ASCII or UTF-8 bytes, and if it holds a file, the list is just its raw bytes.

Error messages and what to do

MessageWhat it meansFix
is not an octal digitA character other than 0 to 7 appears in a number.Octal has no 8 or 9. Check the position in the message.
is bigger than one byteA number is above 377 or has more than three digits.Separate the bytes with spaces, one number per byte.
No octal numbers foundThe input is empty or only whitespace.Paste bytes such as 110 145 154 154 157.

Questions people ask

How do I convert octal to Base64?

Paste the octal bytes and click Octal to Base64. Each number becomes one byte and the bytes are written in Base64. For example 110 145 154 154 157 gives SGVsbG8=.

What range can an octal byte have?

From 0 to 377 in octal, which is 0 to 255 in decimal. Anything larger would not fit in one byte, so the tool reports it instead of splitting it or reading it as two bytes.

Is this the same as converting an octal number to Base64?

Not exactly. This tool treats the input as a list of bytes in octal notation. It does not convert one large octal number to its value first. A single number such as 377 gives the one byte 255.

How do I convert Base64 to octal?

Paste the Base64 and click Base64 to octal. Each decoded byte is printed with three octal digits. Pick a space, comma or line break as the separator. URL-safe Base64 and missing padding are both accepted.

Can I paste C-style escapes like \110?

Yes. A leading backslash on a number is accepted, and so is a 0o prefix. Put a space or other separator between escapes, because the tool needs to see where each byte ends.

Why does 110 become SA==?

110 in octal is 72 in decimal, the byte 0x48. One byte gives two Base64 characters and two = padding signs. Turn padding off for SA, or add more bytes to fill the group.

About this tool

Each number is one byte written in octal, from 0 to 377 (decimal 255), separated by spaces, commas, semicolons or line breaks. A 0o or backslash prefix, as in \110, is accepted. A number above 377 or with more than three digits is an error, because it would not fit in one byte, and the tool will not split it for you. The bytes are encoded as they are, not as text, so 110 gives SA==. Base64 to octal reads standard or URL-safe Base64, with or without padding, and writes each byte as three octal digits.

Format Code Now: free, no ads, no accounts. Your input stays in your browser.