TontonTools

Text to Octal

Convert text to octal character codes — every character in base 8.

100% Free No signup Privacy-friendly Binary & Number Tools
Updated Sep 2026

Share X / Twitter Facebook LinkedIn WhatsApp

How to use Text to Octal

  1. Type or paste your text into the input box.
  2. Read the octal codes instantly — one per character: "Hi" → 110 151.
  3. Turn a code into a C escape by prefixing a backslash: 101 → \101 prints A.
  4. Click “Copy result” to use the codes in scripts, docs or lessons.

What is Text to Octal?

A text to octal converter writes each character of your text as its character code in base 8: H is code 72 = octal 110, i is 105 = 151, so "Hi" becomes 110 151. It's the same per-character encoding as text-to-hex or text-to-ASCII — just in the base Unix tradition uses for escapes.

Octal-coded characters live on in C string escapes (\101 is A), in shell printf sequences, in the output of od (octal dump — the original Unix hex-dump tool, which dumped octal by default), and in older documentation and formats from octal's heyday.

About the Text to Octal

Type or paste text and each character's octal code appears instantly, space-separated: "cat" → 143 141 164.

Practical jobs: writing octal escape sequences for C, awk or shell scripts (A → 101 → \101), predicting or checking od output when inspecting files on Unix systems, preparing retrocomputing or standards-document material where octal is the house style, and adding a third notation to encoding lessons alongside decimal and hex. Non-ASCII characters simply produce larger octal values (é → 351).

Runs live in your browser. Octal to Text decodes the reverse; Text to Hex and Text to ASCII give the same codes in the other common bases.

Frequently Asked Questions

101 — its code 65 written in base 8 (1×64 + 0×8 + 1). In C-style strings, \101 is a literal A.
C and C++ string literals (\0 for NUL is the most famous), shell printf, awk, and sed on some systems. \0 itself is an octal escape — the one every programmer uses without noticing.
od ("octal dump") is the classic Unix tool for inspecting file bytes, printing octal by default. This converter predicts what od -c or od -b will show for given text.
Base 8 counts 0–7 then carries: 7 + 1 = 10 (which is eight). So character codes jump from x7 to x10 — 71 → 107, 72 → 110 — with no 108 or 109 in between.
Their Unicode code point is written in octal: é (233) → 351, € (8364) → 20254. Larger characters just produce longer octal numbers.

We use cookies for analytics and to keep the tools free via ads. See our Privacy Policy.