Skip to content
AI Dev Toolkit.
Esc
  • AI Token CounterCount tokens for GPT, Claude, Gemini, DeepSeek, Qwen and more.Tool
  • LLM API Cost CalculatorEstimate per-request, daily and monthly API costs.Tool
  • AI Model ComparisonCompare prices, context windows and features across models.Tool
  • AI Model Pricing PagesSpecs, real costs and cheaper alternatives for popular models.Tool
  • Context Window CheckerSee whether your text fits each model's context window.Tool
  • Subscription vs API CalculatorFind out whether a chat plan or the API is cheaper for you.Tool
  • GPU / VRAM CalculatorCheck how much VRAM a local model needs and which GPUs fit.Tool
  • Claude Code Error DatabaseExact Claude Code error messages with tested fixes.Tool

Claude Code · Install and setup

syntax error near unexpected token `<' when installing Claude Code

The install URL returned a web page instead of the install script, usually because Claude Code isn’t available in your region or a proxy blocked it.

Message

The exact error

Claude Code
bash: line 1: syntax error near unexpected token `<'
bash: line 1: `<!DOCTYPE html>'

Also appears as:

PowerShell
iex : At line:1 char:2310 … Missing argument in parameter list.
Blocked download
curl: (22) The requested URL returned error: 403

Meaning

What it means

The install command downloads a script and runs it. Here the download returned an HTML page (or a 403 error), and your shell tried to run the HTML as code. If the page says “App unavailable in region”, Claude Code isn’t offered in your country.

Causes

Common causes

  • Claude Code isn’t available in your country
  • A corporate proxy or firewall blocking the download
  • A temporary routing or service problem

Fix

How to fix it

  1. Check availability

    See Anthropic’s supported countries.

  2. Use a package manager instead

    Then open a new terminal and run claude --version.

    macOS (Homebrew)
    brew install --cask claude-code
    Windows (WinGet)
    winget install Anthropic.ClaudeCode
  3. Check whether a proxy blocks it

    A 200 status means you can reach the download server; a 403 usually means a proxy or regional block.

    macOS / Linux
    curl -sI https://downloads.claude.ai/claude-code-releases/latest
    Windows PowerShell
    curl.exe -sI https://downloads.claude.ai/claude-code-releases/latest
  4. Wait and retry

    If none of the above applies, the problem is often temporary.

Related

Search all Claude Code errors