Text to Octal Converter
Write your text as base-8 byte values, for example "Hi" → 110 151, or as \110\151 escapes.
Processed locally in your browser· Your data stays in your browser.
What is Text to Octal Converter?
Octal uses the digits 0–7, so one byte (0–255) fits in exactly three digits, from 000 to 377. It is the notation of Unix file permissions, of older assembly listings and of octal escape sequences such as \101 for "A" in C strings, shell printf and many config files.
This converter encodes your text as UTF-8 and prints each byte as a zero-padded 3-digit octal number. Pick a space, comma, no separator, or the backslash style (\110\151) that string literals accept. Accented letters and emoji become several groups, one per UTF-8 byte.
How does it work?
- Type or paste text in the input box.
- Choose the format: spaces, commas, one continuous string or backslash escapes.
- Copy the octal bytes, or press Swap to decode octal back to text.
Common use cases
- Writing an octal escape in a C, printf or awk string for a special character.
- Learning how octal relates to binary and hexadecimal (three bits per digit).
- Reading octal dumps produced by older tools such as od.
- Checking the octal value of a control character like newline (012).
Examples
Try this input in the tool above:
Hello, é!
110 145 154 154 157 054 040 303 251 041
Privacy
Text to Octal Converter runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.
Limitations
The numbers are UTF-8 bytes, not Unicode code points. Some languages interpret octal escapes as Latin-1 characters instead, so test in your target language.
Frequently asked questions
Why are there always three digits?
A byte reaches 255, which is 377 in octal. Padding to three digits keeps every group the same width and makes the continuous format unambiguous.
What is the octal code of a newline?
Line feed is 012 (decimal 10) and carriage return is 015. A space is 040.
How does this relate to hex and binary?
One octal digit is three bits, one hex digit is four. The same byte 01001000 is 110 in octal, 48 in hex and 72 in decimal.
Related tools
Octal to Text Converter
Paste octal byte values such as 110 145 154 154 157 or \110\145\154 and read the text.
Encoding & Decoding
Text to Hex Converter
See the exact bytes behind any text, from a quick "Hello" to emoji, formatted the way your code or debugger expects.
Encoding & Decoding
Text to Binary Converter
Turn words into ones and zeros: each byte of your text is shown as eight bits.
Encoding & Decoding
Text to ASCII Converter
List the ASCII / byte code of every character, for example "Hi" → 72 105.
Encoding & Decoding
Base Converter (Base 2 to 36)
Type a number, pick its base and the base you want, and get an exact result with a quick view in binary, octal, decimal, hexadecimal and base 36.
Developer Tools
Text to Decimal Converter
Get the Unicode number of every character: "é" is 233, "世" is 19990 and 😀 is 128512.
Encoding & Decoding