Octal to decimal converter
Octal 755 is 493 in decimal, and a mode written as 0755 gives the same answer. Every digit is checked to be 0 to 7 before anything is calculated, so a stray 8 or 9 is caught instead of producing a wrong number. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Octal
- 755
- Decimal
- 493
- Decimal string
- 493
Unix permissions, legacy machine code, and many hardware registers still speak octal. This octal to decimal converter accepts a base-8 digit string, validates that every character is in the range 0-7, and returns the exact decimal integer plus a string form for pipelines that prefer text.
Why octal still shows up in modern work
Octal is base eight: each digit stands for three binary bits, which is why classic Unix file modes such as 755 and 644 are written in octal rather than decimal. Embedded firmware dumps, PDP-style listings, serial protocol fields, and some network configuration tools still emit values that only make sense when you read them as base-8.
Turning those values into decimal by hand is easy to get wrong once the string is longer than a few digits, and a general calculator that silently accepts an 8 or 9 as if it were valid octal will hand you a wrong number with no warning. This converter is deliberately strict. You pass a string of octal digits, optionally with a leading 0o prefix for familiarity with programming languages, and every character is checked against the legal set 0 through 7 before any arithmetic runs.
The decimal result is computed with exact integer arithmetic up to the safe JavaScript integer range, so a mode like 0755 becomes 493 and a longer valid string is not rounded by floating-point surprises. Use it whenever a human or a log line gives you octal and the next system expects an ordinary base-10 integer.
How the conversion works and what you get back
Submit the field named octal with a base-8 digit string such as 755, 644, or 0o17. Leading and trailing whitespace is trimmed; an optional 0o or 0O prefix is stripped and does not count as a digit. After that, only the characters 0 through 7 are legal.
The engine walks the digits left to right using Horner evaluation in base eight, multiplies the running total by eight and adds the next digit, and produces a safe integer result. Drop the result into chmod math, configuration templates, teaching materials, or a data-cleanup step that normalizes mixed-base dumps into one decimal column.
Where teams plug it into real workflows
Permission audits are the most common case: a script extracts modes like 750 and 640 from a filesystem report and needs decimal integers for a policy engine that only understands base ten. Hardware and reverse-engineering notes often list status words in octal; converting them before comparison against a decimal mask avoids off-by-factor-of-eight bugs that are painful to spot later. Educators and coding platforms use a strict octal converter so students see immediate feedback when they type an illegal digit instead of a quiet wrong answer.
What you can do with it
Unix permission normalization
Turn modes such as 755 or 640 into decimal integers for policy engines, spreadsheets, and APIs that only accept base-10 numbers.
Firmware and register dumps
Convert octal status words from hardware notes into decimal before masking, comparing, or storing them in a decimal-only database column.
Teaching and automated grading
Give students and auto-graders a strict octal-to-decimal check that rejects illegal digits instead of silently producing a wrong value.
FAQ
What does this octal to decimal converter accept?
A string of base-8 digits 0-7. Leading and trailing spaces are trimmed, and an optional 0o or 0O prefix is allowed.
Why is digit 8 or 9 rejected?
Those symbols are not valid in base eight. Accepting them would invent a number that is not true octal; the converter errors instead of guessing.
Is the octal to decimal converter free?
The browser tool is free and runs locally.
How large an octal value can I convert?
Up to 64 octal digits, provided the decimal result fits in a safe JavaScript integer.
What is 755 in decimal?
Octal 755 is 493 in decimal. Working from left to right, multiply the running total by eight and add the next digit; a leading zero, as in 0755, still gives 493.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/fmt/octal-decimal \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"octal":"755"}'const res = await fetch("https://api.kit.forhosting.com/fmt/octal-decimal", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"octal": "755"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/fmt/octal-decimal",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"octal": "755"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/fmt/octal-decimal", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"octal":"755"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"octal":"755"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/fmt/octal-decimal", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"octal": "755"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "fmt.octal_decimal",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
No spreadsheet formulas, no silent truncation of invalid digits, and the same deterministic result whether you run it free in the browser or call the API.
Why octal still shows up in modern work
Invalid input fails with a clear invalid_input error naming the bad digit and its position, so automation can halt instead of propagating garbage into a permission check or a register write.
How the conversion works and what you get back
The response object includes the normalized octal string without the prefix, the decimal number as a JSON integer, and decimal_string so clients that stringify every field still see an exact representation. Empty input, a bare 0o with no digits, digits beyond the published length limit, and any character outside 0-7 all raise invalid_input and are not billed. At $0.002 per successful request the API price matches a tiny edge parse; failed validation never charges.
Where teams plug it into real workflows
Data pipelines that ingest mixed logs can call the endpoint once per value, keep the structured response beside the source string, and prove that every accepted row was valid octal at ingest time. Because invalid_input names the offending character and index, a bulk job can quarantine only the bad rows and reprocess the rest without rewriting the whole file. Whether you paste one mode in the browser tool or automate thousands of conversions through the KIT API with prepaid balance, the contract stays the same: base-8 in, decimal integer out, hard fail on anything outside digits 0-7.
Technical questions
What is returned on success?
An object with the normalized octal string, the decimal integer, and decimal_string for text-safe pipelines.