Octal to Base64 Converter
Convert text, ASCII, Base64, hexadecimal, binary, UTF-8, CSV, HTML, and Markdown in one place.
What this tool does
Octal is base-8: each digit runs 0–7, and three octal digits describe one byte (0 through 255, written 0 through 377 in octal). You'll run into octal byte values in Unix file permission dumps, old terminal escape sequences, some embedded-systems firmware logs, and protocols that print raw bytes in octal instead of hex. This page turns a list of octal byte values into a Base64 string — the same 4-characters-per-3-bytes text encoding used for data URLs, JSON fields, and email attachments — so you can drop those bytes into a context that expects text rather than raw binary. Base64 is not encryption or compression; it's purely a way to represent binary data using a safe set of 64 ASCII characters.
How to use it
- Enter each byte as an octal number with the
0oprefix (JavaScript's octal literal syntax), separated by spaces or commas — for example0o150 0o145 0o154 0o154 0o157. - Click Convert.
- Copy the Base64 string from the output box.
Worked example
The word "hello" is the byte sequence 104, 101, 108, 108, 111 in decimal, which is 150 145 154 154 157 in octal. Typed into this tool as 0o150 0o145 0o154 0o154 0o157, it converts to aGVsbG8= — the standard Base64 encoding of "hello". Each octal token is first converted to its byte value, the bytes are assembled, and the result is run through Base64 encoding.
A format detail worth knowing
The 0o prefix is not optional. Internally, each token is parsed with JavaScript's Number(), which only treats a string as octal when it begins with 0o. Typing 150 without the prefix gets parsed as the decimal number 150, not the octal value 150 (which equals 104 in decimal) — and the tool won't warn you, it'll just produce an incorrect Base64 string built from the wrong byte values.
Common questions
Why do my octal numbers need a 0o prefix?
This tool reads each token with JavaScript's Number(), which only interprets a string as octal when it starts with 0o. A bare 150 is read as decimal 150, not octal 150 (104 in decimal), so the prefix is required for a correct result.
What counts as one token?
Each space- or comma-separated group is treated as one byte, so it must fall between 0o0 and 0o377 (0–255 in decimal). A value outside that range doesn't represent a single byte and will produce garbled output.
Can I convert Base64 back to octal on this page?
This page is fixed to the octal→Base64 direction. For the reverse conversion, use NeatJSON's Base64 to Octal Converter.
Is my data uploaded anywhere?
No. Conversion runs locally in your browser with JavaScript's built-in btoa function; nothing is sent to a server.