ASCII to Octal Converter
Convert ASCII text to octal numbers online. Each character becomes its octal code point value.
Paste ASCII text and get the octal codes — handy for chmod permissions, C-style escape sequences like \101 for "A", or decoding Unix output. Pick a separator, toggle zero-padding, or add the 0o prefix to match Python and modern JavaScript syntax. And everything runs in your browser. Nothing gets uploaded.
How to Use
Enter your text in the left panel. You can type, paste, or click Sample for example text.
Choose a separator (space, comma, newline, or none), optionally enable the 0o prefix, and toggle zero-padding to pad values to 3 digits.
Click Convert or leave Live mode enabled for real-time conversion as you type.
Copy, Download, or Swap the result. Swap converts octal values back to ASCII text.
Frequently Asked Questions
What is an ASCII octal value?
Every ASCII character has a corresponding octal (base-8) number representing its code point. For example, the letter "A" is 101 in octal, "a" is 141, the space character is 40, and "0" (the digit) is 60. Octal uses digits 0-7 and is commonly used in Unix file permissions and older computing contexts. The standard ASCII table defines 128 characters (0-177 in octal).
Why would I convert ASCII to octal?
Octal notation is widely used in Unix/Linux file permissions (e.g., chmod 755), C/C++ escape sequences (e.g., \101 for "A"), and legacy computing systems. It is also used when working with serial communication protocols, embedded systems, and understanding low-level data representations. Converting text to octal helps when debugging these systems or when a protocol requires octal-encoded character data.
What does the 0o prefix mean?
The "0o" prefix is a modern notation that explicitly marks a number as octal (base-8), used in languages like Python 3, JavaScript (ES6+), and Ruby. Enabling it makes each output value appear as "0o101" instead of just "101", which helps distinguish octal values from decimal numbers. In older C-style notation, a leading zero (e.g., 0101) was used instead, but "0o" is less ambiguous.
What does zero-padding do?
Zero-padding ensures that all octal values are displayed with at least 3 digits by adding leading zeros where necessary. For example, a space character (octal 40) becomes "040", and a tab (octal 11) becomes "011". This makes the output uniform and easier to read, especially when working with fixed-width data formats or when parsing values programmatically.
Can I convert octal numbers back to ASCII text?
Yes. Click the Swap button to switch the output into the input panel, which automatically changes the mode to octal-to-ASCII. The tool will parse the octal values (separated by spaces, commas, or newlines) and convert them back to the corresponding characters. Values with the 0o prefix are also recognized and handled correctly.