# CLAUDE_CODE_DISABLE_WEB_FETCH

> Set to 1, it turns off WebFetch. Web search still works.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** CLAUDE_CODE_DISABLE_WEB_FETCH=1

## Think of it like

It is like a helper may look up a book's name. They may not borrow the book.

## Definition

CLAUDE_CODE_DISABLE_WEB_FETCH set to 1 turns off the WebFetch tool. Claude can no longer open a web page and read it. Web search still works. It needs version 2.1.285 or later.

## Example

Emma worries that a web page could carry hidden orders for Claude. She turns fetching off, but keeps search for quick facts.

## Example code

```bash
export CLAUDE_CODE_DISABLE_WEB_FETCH=1
claude
```

Search the web, but open no pages.

## Why it matters

Reading a web page brings in text no one checked. Some teams want less of that.

## Common mistake

Expecting it to stop web search too. Search is a separate tool.

## Three principles

- **WebFetch off.** No page reads.
- **Search stays.** Its own tool.
- **From 2.1.285.** Version.

## Related terms

- [WebFetch Tool](https://learn.benibix.com/term/ai/web-fetch-tool)
- [WebSearch Tool](https://learn.benibix.com/term/ai/web-search-tool)
- [Prompt Injection](https://learn.benibix.com/term/ai/prompt-injection)

---

Source: https://learn.benibix.com/term/ai/claude-code-disable-web-fetch-variable
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
