Convert Unix permissions between symbolic and octal
rwxr-xr-- converts to 754, and 754 converts back to rwxr-xr--, because read counts 4, write 2 and execute 1 for each audience. Paste either form and get both, with malformed values flagged instead of guessed. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Text
- rwxr-xr--
- Input
- rwxr-xr--
- Input format
- symbolic
- Octal
- 754
- Symbolic
- rwxr-xr--
Unix permissions are compact, but switching between forms can be surprisingly error-prone when you are reviewing a deployment, writing a chmod command, or documenting a security change. This converter accepts either a nine-character symbolic value such as rwxr-xr-- or a three-digit octal value such as 754, validates every position, and returns both representations. The conversion is deterministic and runs without network access, filesystem access, or interpretation of the permission against a real file. Malformed digits, misplaced letters, extra prefixes, whitespace, and incomplete values produce an explicit input error instead of a plausible but incorrect result.
Understand the two permission representations
A standard Unix permission value describes access for three audiences in a fixed order: the file owner, the owning group, and everyone else. Symbolic notation gives each audience a three-character block. The positions always mean read, write, and execute, so rwx grants all three permissions, r-x grants read and execute, and r-- grants read alone.
Octal notation compresses those same bits into one digit per audience. Read contributes four, write contributes two, and execute contributes one. Adding the enabled values produces a digit from zero through seven.
Therefore rwx becomes 7, r-x becomes 5, and r-- becomes 4, making rwxr-xr-- equivalent to 754. This converter preserves that exact owner-group-other ordering. It does not look up users, groups, access-control lists, or filesystem metadata.
Keeping the operation narrowly focused makes the result predictable and useful in scripts, reviews, runbooks, and educational material where a clear representation change is all that is needed.
Provide a strict symbolic or octal value
Enter exactly one permission string in the text field. For octal input, provide exactly three characters and use digits zero through seven, for example 640 or 755. For symbolic input, provide exactly nine characters, divided conceptually into owner, group, and other triplets.
Each triplet must place r in the read position, w in the write position, and x in the execute position; use a hyphen when that permission is absent. A value such as rw-r----- is valid, while wr-r----- is not, because the letters are in the wrong positions. Validation is intentionally strict.
The converter does not trim spaces, accept a chmod command, accept a leading file-type character from an ls listing, or silently discard a leading zero. It also excludes setuid, setgid, and sticky-bit notation because those special bits require additional symbolic rules. Rejecting unsupported forms prevents accidental normalization and makes malformed input visible immediately, which is safer when permission values are copied into deployment automation.
Use the result safely in operational work
The response identifies whether the submitted value was octal or symbolic and returns normalized fields for both forms. You can show the symbolic field to a reviewer who wants readable access rights, while using the octal field in a command, infrastructure template, or configuration record. Always remember that conversion is not authorization analysis.
A mathematically correct mode can still be inappropriate for a sensitive key, shared directory, executable, or service account. Before applying it, confirm who owns the target, whether directory execute permission is required for traversal, whether default ACLs add access, and whether the application expects special permission bits. This tool never changes a file and never claims that a mode is secure; it only converts a supplied value.
That separation is useful for change-control workflows because teams can validate formatting and compare representations before any privileged command runs.
What you can do with it
Review a chmod change
Turn an octal mode into readable owner, group, and other permission blocks before approving a deployment.
Prepare configuration
Convert a reviewed symbolic permission string into the compact three-digit value expected by automation.
Validate documentation
Check that symbolic and octal forms in a runbook describe the same basic Unix permission bits.
FAQ
Does this tool modify a file?
No. It converts text only and never accesses a filesystem.
Are four-digit modes supported?
No. This version accepts three basic owner, group, and other octal digits, without special bits.
Can I paste output from ls -l?
No. Remove the leading file-type character and provide exactly the nine permission characters.
Why are spaces rejected?
Strict validation prevents hidden formatting from being silently accepted in security-sensitive automation.
Why is a value like wr-r----- rejected?
Each block of three has fixed positions: read first, write second, execute third. In wr-r----- the letters are swapped, so it is not a valid permission. Put each letter in its place and use a hyphen where a right is missing.
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/security/file-permission-symbolic-convert \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"rwxr-xr--"}'const res = await fetch("https://api.kit.forhosting.com/security/file-permission-symbolic-convert", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"text": "rwxr-xr--"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/security/file-permission-symbolic-convert",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"text": "rwxr-xr--"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/security/file-permission-symbolic-convert", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"text":"rwxr-xr--"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"text":"rwxr-xr--"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/security/file-permission-symbolic-convert", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"text": "rwxr-xr--"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "security.file_permission_symbolic_convert",
"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
Use the result safely in operational work
Automated callers can treat an invalid_input response as a hard stop rather than continuing with guessed permissions or a partially parsed value.
Technical questions
What does the API call cost?
Each API request costs $0.002. The browser version can run locally on the page.