chmod Calculator
Unix permissions: rwx ↔ octal
Convert Unix file permissions between symbolic (rwxr-xr-x) and octal (755), including setuid, setgid and sticky bits.
- chmod
- Unix
- Permissions
How to use chmod Calculator
- Tick Read, Write and Execute for Owner, Group and Others, and any Special bits (setuid, setgid, sticky). Or type a mode into Octal (
755,0755,4755) or Symbolic (rwxr-xr-x, or anls -lstring likedrwxrwxrwt). All views stay in sync. - Tick It's a directory when the mode is for a directory. It changes the
ls -ltype character and howXbehaves in expressions. - Copy the
ls -lform, thechmodcommand in octal or symbolic form, or the 4-digit octal. Warnings appear for risky modes such as777, world-writable files and setuid. - Pick a Preset such as
644,755,600or1777, or type a chmod expression under Apply a symbolic mode (for exampleu+x,g-w,o=rora+rX) and press Use this mode to take the result. - Enter a umask in the umask calculator to see the default mode of New files and New directories, and press Use to load one.
How it works
A Unix mode is 12 bits: three bits (read 4, write 2, execute 1) each for owner, group and others, plus setuid (4000), setgid (2000) and sticky (1000). Octal is those bits written in base 8. In the symbolic form a special bit replaces the matching execute position: s or t when execute is also set, capital S or T when it isn’t. When you paste an ls -l string, the first character is read as the file type (- d l c b p s) and a trailing ., + or @ (SELinux, ACL or extended attributes) is ignored.
Expressions follow POSIX and GNU chmod rules. Each comma-separated clause is [ugoa][+-=][rwxXst], applied in order to the current mode. X adds execute only for a directory or when someone already has execute, permissions can be copied from another class (o=g, go=u-w), and = on a directory keeps its setgid bit, as GNU chmod does. A clause that is only digits replaces the whole mode.
The umask calculator removes the umask’s bits from 666 for files and 777 for directories. Everything is calculated instantly in your browser.
Limits
- Octal modes are 1 to 4 digits from 0 to 7, with an optional
0oprefix. Symbolic input must be exactly 9 characters, or 10 (11 with a trailing.,+or@) for anls -lstring. - In Apply a symbolic mode, a clause without
u,g,oora(such as+x) applies to everyone and is not reduced by the umask field, whereas realchmodwould mask it with your shell’s umask. - Copying from a class takes one class at a time (
o=g, noto=gu) and can’t be mixed withr,worxin the same operator;tonly affects others, sou+tchanges nothing. - Only the permission bits are modelled. Owner and group, ACLs and extended attributes aren’t, and the result isn’t checked against any real file.
Privacy
Everything is calculated in your browser and nothing is uploaded or saved; the site’s Content Security Policy blocks requests to other servers. Copy share link puts the mode, the directory setting, the expression and the umask in the link’s # fragment, which browsers don’t send to servers.
Frequently asked questions
What is the difference between 755 and 644?
755 (rwxr-xr-x) lets the owner read, write and execute, and everyone else read and execute; it suits programs and directories. 644 (rw-r--r--) has no execute bit and suits ordinary files.
What does a capital S or T mean in ls -l output?
The setuid, setgid or sticky bit is set but the matching execute bit isn’t. For setuid on a file that isn’t executable by its owner this has no effect, and the tool warns about it.
Why does a 4-digit mode like 4755 start with 4?
The first digit holds the special bits: 4 for setuid, 2 for setgid and 1 for sticky, added together. 4755 is 755 plus setuid, and 1777 is the usual mode for /tmp.
What does capital X do in a chmod expression?
X adds execute only if the target is a directory or someone already has execute. a+rX makes a tree readable without making ordinary files executable. Tick It's a directory to see the directory result.
Why is 777 a bad idea?
Every user on the system can change or replace the file. Use 755, or 775 for a directory shared by a group. For shared writable directories, add the sticky bit (1777) so users can only delete their own files.
How does umask decide the default permissions?
New files start from 666 and new directories from 777, and every bit set in the umask is removed. With the common 022, files get 644 and directories 755; with 077 only the owner has access.
More tools
- Clean Image: Inspect and remove hidden image metadata
- JWT Decoder: Decode and verify JSON Web Tokens
- Diff Checker: Compare two texts line by line
- JS Runner: Run JavaScript and TypeScript in your browser
- JSON Formatter: Format, validate and minify JSON
- Encode / Decode: Base64, URL, HTML entity and hex
- Hash Generator: MD5, SHA and HMAC of any text
- UUID Generator: Generate UUID v4 and v7 in bulk
- Timestamp Converter: Unix time ↔ human dates
- Regex Tester: Test regular expressions live
- URL Parser: Break a URL into its parts
- HTTP Status Codes: Look up any HTTP status code
- MIME Type Lookup: File extension ↔ MIME type
- Password Generator: Strong random passwords and passphrases
- Random String Generator: Random tokens, IDs and keys
- Slug Generator: Turn titles into URL slugs
- Case Converter: camelCase, snake_case, Title Case and more
- Word Counter: Count words, characters and reading time
- JSON to TypeScript: Generate TypeScript types from JSON
- JSON Diff: Compare two JSON documents structurally
- JSON to SQL: Turn JSON arrays into SQL inserts
- YAML ↔ JSON: Convert between YAML and JSON
- XML ↔ JSON: Convert between XML and JSON
- CSV ↔ JSON: Convert between CSV and JSON
- CSV Viewer: View, sort and filter CSV files
- SQL Formatter: Format and beautify SQL queries
- cURL ↔ Fetch: Convert cURL commands to fetch and back
- Markdown Editor: Write Markdown with a live preview
- Text Cleaner: Remove duplicate lines, empty lines and extra spaces
- Find & Replace: Find and replace in any text
- Cron Expression Builder: Build and explain cron schedules
- User-Agent Parser: Identify browser, OS and device from a user agent
- HTTP Headers Inspector: Paste response headers and get them explained
- JWT Generator: Create and sign test JSON Web Tokens
- Certificate Inspector: Decode PEM certificates and keys
- Meta Tag Inspector: Check a page's SEO and social tags
- UTM Builder: Build campaign URLs with UTM parameters
- URL Cleaner: Strip tracking parameters from links
- Robots.txt Generator: Create and test a robots.txt file
- Sitemap Generator: Create an XML sitemap from a list of URLs
- Image Compressor: Shrink JPEG, WebP and AVIF images in your browser
- Image Resizer: Resize images by pixels, percentage or to fit a box
- Image Converter: Convert between PNG, JPEG, WebP and AVIF
- Image to Base64: Encode images as Base64 data URIs and decode them back
- SVG Optimizer: Minify and sanitize SVG files
- Favicon Generator: Make favicon.ico, Apple and Android icons from an image or emoji
- Color Converter: HEX, RGB, HSL, OKLCH and contrast checks
- Number Base Converter: Binary, octal, decimal, hex and float bits
- IP / CIDR Calculator: Subnets, masks and IP ranges for IPv4 and IPv6
- JSONPath Query: Query JSON with JSONPath expressions
- JSON Schema Validator: Validate JSON against a schema, or generate one
- Semver Checker: Check versions against semver ranges
- .env Diff: Compare and validate .env files
- TOTP Generator: Generate and verify 2FA codes
- String Escaper: Escape and unescape strings for any language
- Unicode Inspector: See every character, code point and hidden symbol
- Mock Data Generator: Generate realistic fake data
- QR Code Generator: Create QR codes for links, Wi-Fi and contacts
- Lorem Ipsum Generator: Placeholder text in paragraphs, sentences or words
- Date Calculator: Date differences, business days and durations
- Unit Converter: Convert bytes, lengths, weights, temperatures and more
- Query CSV with SQL: Run SQL queries on CSV files
- PDF Merge & Split: Merge, split, reorder and rotate PDFs
- PDF Metadata Cleaner: See and remove hidden PDF metadata
- Office Metadata Cleaner: Remove author and revision data from Word, Excel and PowerPoint
- Images to PDF: Combine images into one PDF
- Image Editor: Crop, rotate, resize and adjust images
- Encrypt / Decrypt Text: Encrypt text with a passphrase (AES-GCM)
- SSH Key Generator: Generate Ed25519 and RSA SSH keys locally
- Email Header Analyzer: Trace an email's path and check SPF, DKIM and DMARC
- JSON to Code: Generate Go, Python, Rust, Java, C# and Kotlin models from JSON
- docker run ↔ Compose: Convert docker run commands to docker-compose and back
- Color Palette Extractor: Pull the dominant colours out of any image
- Password Strength Checker: How long would your password take to crack?
- SPF / DKIM / DMARC Checker: Validate and explain email DNS records
- Kubernetes YAML Checker: Validate and explain Kubernetes manifests
- .gitignore Generator: Build a .gitignore from presets
- CSP Builder: Build and check a Content-Security-Policy
- JSON-LD Generator: Create schema.org structured data
- Open Graph Image Generator: Make 1200×630 social preview images
- CSS Generator: Gradients, shadows, clamp() and more
- Time Zone Meeting Planner: Find meeting times across time zones