Text to hex bytes and hex back to text, in five output styles
Text to Octal Converter
Produce octal escapes for C, shell or Python strings, or read octal values from an old dump.
Loading tool…
How to use text to octal converter
Choose Text to octal or Octal to text.
Type the text or paste the octal values.
Pick spaced values, \110 escapes or 0o110 prefixes.
Copy or download the result.
What this tool does
- Writes each UTF-8 byte as three octal digits (000 to 377).
- Reads spaced values, backslash escapes, 0o prefixes or a run of three-digit groups.
- Works with emoji and any script.
How the result is verified
Octal output is parsed back to bytes and decoded as UTF-8 to make sure it equals your text.
Frequently asked questions
Where are octal escapes still used?
In C and C++ string literals, printf and echo -e in shells, Python byte strings and Unix file permissions (chmod 755 is octal).
Is octal 101 the letter A?
Yes. Octal 101 is 1 x 64 + 0 x 8 + 1 = 65, the code for A.
Is my data uploaded to a server?
No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.
Related tools
Text to 8-bit binary and binary back to readable text
Characters to decimal codes and codes back to text
Text to \u escapes, U+ code points and HTML references, and back