Free browser tool

Claude Code permissions builder

Build a Claude Code settings.json permissions block with allow, ask and deny rules and an optional defaultMode. Add tools such as Bash, Read, Edit, WebFetch or MCP tools, then copy the JSON. Everything runs locally in your browser, with no account or network connection.

Use Tool or Tool(specifier), such as Read, Read(./.env) or WebFetch(domain:example.com).

Your rules

  • allow: Bash(npm run test:*)

Claude Code checks deny, then ask, then allow. The first match decides, regardless of rule specificity.

Your settings.json block

{
  "permissions": {
    "allow": [
      "Bash(npm run test:*)"
    ]
  }
}

Where this file lives

  • User settings: ~/.claude/settings.json applies to all your projects on this computer.
  • Project settings: .claude/settings.json applies to one project.
  • Local settings: .claude/settings.local.json applies only to your local copy of one project.

Merge this block with your existing settings instead of replacing other configuration. Project and local settings ignore auto and bypassPermissions as starting modes. Read the Claude Code permission modes guide for the fallback behavior and rule precedence.

Ready-made Claude Code permission examples

Allow npm test commands

Allow matching npm test commands through Bash.

"allow": ["Bash(npm run test:*)"]

Deny reading .env files

Deny Read calls for the .env path. A Read deny also blocks Edit and Write on the same path. The Write check needs v2.1.228 or later.

"deny": ["Read(./.env)"]

Ask before git push

Require a permission decision before matching git push commands.

"ask": ["Bash(git push *)"]

Review each rule before using it. For Bash, * stands for any text. Read and Edit rules use gitignore pattern syntax.