About ChmodTest
What this is
Type an octal mode (755, 4755) or a symbolic one (rwxr-xr-x, -rwsr-xr-x) and get the other form, a per-class breakdown, the special bits, and the chmod command to paste. Everything runs in your browser; nothing is uploaded.
The mapping is an eight-entry lookup table (---, --x, -w-, -wx, r--, r-x, rw-, rwx) indexed by digit value for each of the three classes, plus the three special bits (setuid 4000, setgid 2000, sticky 1000). It does not consult a filesystem.
What it does with your input
| Input | Result |
|---|---|
755 | rwxr-xr-x, chmod 755 |
4755 | rwsr-xr-x, setuid noted, chmod 4755 |
1777 | rwxrwxrwt, sticky, with a world-writable note |
000 | ---------, chmod 000 |
7 | 0007: a short input is padded on the left, so a lone 7 means o+rwx, not u+rwx |
778 | Rejected: 8 is not an octal digit |
12345 | Rejected: at most four digits |
rwxr-xr-x / -rwxr-xr-x | Parsed; the optional leading file-type character is accepted |
rwSr--r-- | Parsed; capital S and T mean the special bit is set without execute |
Until 2026-10-31 this page documented the opposite behaviour: 4755 reported as 0755, 778 rendered NaN, and 000 printed a blank chmod command. Those are fixed and pinned by tests; see the changelog.
Two companion tools
- Umask calculator: the default modes a umask produces, and the umask for a mode you want.
- chmod symbolic calculator: what
u+x,go-wora=rdoes to a starting mode, with GNU chmod's umask and directory rules.
What it will not do
- No ACLs (
setfacl), SELinux contexts or file-type bits beyond the one-letter prefix. - No filesystem access, so no way to verify a file's actual mode. For that,
stat -c %a file(Linux) orstat -f %Lp file(macOS).