🎲 How Claude Code Eats the Web
giuseppegurgone.com·1d
🌐Web 1.0
Preview
Report Post

JANUARY 14, 2026

I was curious about how Claude Code handles web fetching. When you fetch a URL, Claude Code shows you the document size—but is that the original HTML file size, or something smaller? My hunch was that it converts HTML to Markdown before putting it into context. Does it actually do that, or does it just dump raw HTML and burn tokens?

So I did what any reasonable person would do: I pointed Claude Code at its own minified cli.js bundle and asked it to figure out how it works. Turns out it’s pretty clever.

The Token Problem

Web pages are bloated. A simple documentation page might be 50KB of HTML but only 2KB of actual content. If you’re paying per token that’s a problem.

Claude Code solves this in stages.

Stage 1: HTML to Markdown

The first thing that hap…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help