---
title: "Octal"
description: "Every byte as an octal number from 0 to 377. Spaced by default and decoding takes commas too"
canonical_url: "https://encodings.agntn.dev/encodings/octal"
---
# Octal

> Every byte as an octal number from 0 to 377. Spaced by default and decoding takes commas too

<encoding-facts name="octal">



</encoding-facts>

Base 8, one number per byte. It looks like decimal. It isn't.

```ts
encode("octal", "Hi");                       // "110 151"
encode("octal", "Hi", { separate: false });  // "110151"
```

Is `110` a hundred and ten? Not here. It's `H`. Puzzles know this and use it on purpose.

Decoding splits on spaces and commas. A run with no separator reads three digits per byte, which is what `separate: false` writes. An `8` or a `9` is an error. So is anything over `377`, because a byte ends there.


## Sitemap

See the full [sitemap](https://encodings.agntn.dev/sitemap.md) for all pages.
