# is-executable

> Check whether a file can be executed

Latest version **2.0.2** (published 2026-02-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-executable
pnpm add is-executable
yarn add is-executable
bun add is-executable
```

## Health

**Score 60/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2026-02-01 |
| First published | 2015-12-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=14.16 |
| Dependencies | 0 |
| Unpacked size | 4.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 45 |
| Maintainers | sindresorhus |
| Keywords | executable, execute, exe, file, binary, check, detect, access, fs, permission |

## Links

- npm: https://www.npmjs.com/package/is-executable
- Repository: https://github.com/sindresorhus/is-executable
- Homepage: https://github.com/sindresorhus/is-executable#readme
- Issues: https://github.com/sindresorhus/is-executable/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/is-executable

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 2.0.2 (latest) — 2026-02-01
- 2.0.1 — 2023-04-08
- 2.0.0 — 2022-10-09
- 1.0.1 — 2015-12-17

## README

# is-executable

> Check whether a file can be [executed](https://www.yesik.it/blog/2018-the-x-permission-bit)

## Install

```sh
npm install is-executable
```

## Usage

```js
import {isExecutable} from 'is-executable';

// On macOS
await isExecutable('/usr/bin/bash');
//=> true

// On macOS
await isExecutable('/Users/sindresorhus/unicorn.png');
//=> false

// On Windows
await isExecutable('c:\\Windows\\notepad.exe');
//=> true
```

## API

### `isExecutable(filePath: string) => Promise<boolean>`

### `isExecutableSync(filePath: string) => boolean`

---
_Source: https://npm.io/package/is-executable · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
