Text to Octal
Octal is the forgotten cousin of hex: a base-8 numbering system where each digit represents exactly 3 bits. Unix file permissions (755, 644) are written in octal, and every character has an octal code just like it has a decimal and hex one. Paste text and this converter returns the octal code for each byte; paste space-separated octal codes and it gives the original text back.
How to convert text to octal
-
1
Enter text
Plain characters; UTF-8 encoding is assumed for non-ASCII input.
-
2
Each byte becomes an octal code
`A` = 65 decimal = `101` octal. `Z` = 90 = `132`. A space = 32 = `40`.
-
3
Codes are space-separated
Byte codes are joined with single spaces (`Hi` becomes `110 151`). No leading zeros are added.
-
4
Decode by pasting octal
Switch to Octal → Text and paste space-separated octal values; each value from 0 to 255 becomes one byte.
Octal quick examples
| Character | Decimal | Octal | Binary |
|---|---|---|---|
| A | 65 | 101 | 1000001 |
| a | 97 | 141 | 1100001 |
| 0 | 48 | 60 | 0110000 |
| space | 32 | 40 | 0100000 |
| \n | 10 | 12 | 0001010 |
Why octal still matters
Most modern systems prefer hex because two hex digits equal one byte cleanly. Octal lingers in a few places:
- Unix file permissions:
chmod 755means owner = 7 (rwx), group = 5 (r-x), other = 5 (r-x). Each digit is three permission bits. - C/Python escape sequences:
\101in a string literal isA. A leading zero in C integer literals (int x = 0755) is interpreted as octal, a known footgun. - Embedded and retro systems: older 12-, 18- and 36-bit architectures aligned nicely with octal.
- umask values:
umask 022sets the default file permission mask to 755.
File permission table
| Octal digit | Permissions | Binary |
|---|---|---|
| 0 | --- | 000 |
| 1 | --x | 001 |
| 2 | -w- | 010 |
| 3 | -wx | 011 |
| 4 | r-- | 100 |
| 5 | r-x | 101 |
| 6 | rw- | 110 |
| 7 | rwx | 111 |
So chmod 644 = owner rw-, group r--, other r--, the default for a readable text file.
Gotchas
- Leading zeros matter in C.
int a = 010;sets a to 8, not 10. Python 3 dropped this; always use0o10instead. - Octal only uses digits 0-7.
8and9are invalid in octal. If you see them, the source is not octal. - Unicode bytes get bigger in octal. A UTF-8 emoji (4 bytes) becomes 4 three-digit octal codes, twelve characters. Hex would be eight. Hex wins for most display purposes.
Frequently Asked Questions
Mostly never, unless you’re dealing with Unix permissions or C-string escapes that use \NNN format. Hex is more compact and easier to read byte-by-byte.
Because each octal digit corresponds exactly to three permission bits (read, write, execute). The notation was baked into AT&T Unix in 1971 and never left, it maps elegantly to the underlying bit pattern.
Yes. Switch to Octal → Text and paste space-separated octal values (for example 110 151). Each value from 0 to 255 is turned back into one byte, so multi-byte UTF-8 characters decode from their individual byte codes.
Your text is sent to our server only to perform the conversion and is not stored or logged.
Related Tools
Meme Text Generator
Add classic meme captions to a template or your own image. Set top and bottom text, tune font, color and stroke, then download or copy a PNG.
Emoji Kitchen
Try verified Google Emoji Kitchen sticker pairs, download PNGs, and get supported suggestions when a pair is not in the curated set.
Word Counter
Count words, characters, sentences and paragraphs with reading time, speaking time, keyword density and a Flesch readability score for essays, posts, captions and meta descriptions.
Password Generator
Generate strong random passwords with adjustable length, symbols, numbers and mixed case using cryptographic randomness.
Anagram Solver
Enter up to 10 letters and see every unique arrangement of them, with duplicate permutations removed and the list capped at 200 results.
Wingdings Translator
Turn Latin letters and digits into Wingdings-style Unicode symbols for puzzles, jokes and retro Windows notes.
Tool available in other languages
- 텍스트를 8진수로 [KO]
- Texto para Octal [PT]
- Texto a Octal [ES]
- テキストを8進数に変換 [JA]
- Tekst naar octaal [NL]
- Văn bản sang bát phân [VI]
- Texte en octal [FR]
- Text zu Oktal [DE]
- ข้อความเป็นเลขฐานแปด [TH]
- Text till oktal [SV]
- النص إلى النظام الثماني [AR]
- Teks ke Oktal [ID]
- Tekst na ósemkowy [PL]
- Testo in ottale [IT]
- Текст в восьмеричную систему [RU]
- Metinden Sekizliye [TR]
- 文本转八进制 [ZH]