Đang chọn gợi ý…
Chọn ngẫu nhiên một nội dung dành cho bạn.
Mở ngay →Drop an image → base64 ready for Claude / GPT-4V / Gemini vision APIs. Encode + decode reverse, with data: URI prefix.
Encode images to base64 for LLM vision APIs (Claude, GPT-4V, Gemini), inline CSS, or data URIs. Note: base64 is ~33% larger than the original — avoid for images > 100KB on production sites.
background: url(data:image/png;base64,...) — saves an HTTP request for small icons.POST https://api.anthropic.com/v1/messages
{
"model": "claude-sonnet-4-7",
"messages": [{
"role": "user",
"content": [
{
"type": "image",
"source": {
"type": "base64",
"media_type": "image/jpeg",
"data": "/9j/4AAQSkZJRgABAQAAAQ..." // base64 from this tool (NO data: prefix)
}
},
{ "type": "text", "text": "Describe this image" }
]
}]
} Note: Claude wants raw base64 (NO data:image/...;base64, prefix). Uncheck "Include data: URI prefix" for the clean string.
OpenAI is the opposite — it wants the full data URL with prefix:
{
"type": "image_url",
"image_url": {
"url": "data:image/jpeg;base64,/9j/4AAQ..." // WITH prefix
}
} Developers using ChatGPT/Claude/Gemini daily, AI engineers building RAG/agents, anyone paying LLM API and wanting quick metrics.
No. The tool runs 100% in your browser — no HTTP requests to TopDev servers or any AI provider. You can disconnect from the internet to verify.
Yes. All TopDev tools are free, no signup required, no usage limits.
Accurate token count for ChatGPT, Claude, Gemini, Llama. Live input cost.
Estimate monthly/yearly LLM API spend. Compare which model is cheapest.
Compose well-structured prompts. 6 templates for common tasks.
NEWRender markdown live — paste ChatGPT/Claude output. GFM, tables, code blocks.