AI File Token Analyzer
Upload a text file to instantly see its token count, one-time embedding cost and monthly chat API cost. Supports .txt, .md, .json and .csv.
Upload a plain text file (.txt, .md, .json, .csv) to estimate tokens and potential chat + embedding cost.
Frequently asked questions
How many tokens is my document?
A rough rule of thumb: 1 word ≈ 0.75 tokens for English text, or 1 token ≈ 4 characters. A 1-page document (~500 words) is roughly 375 tokens. A 10-page PDF (~5,000 words) is roughly 3,750 tokens. The file analyzer calculates this automatically from your uploaded file.
Is it cheaper to embed my file or use it as context?
For more than a few hundred queries per month, embedding is almost always cheaper. Embedding is a one-time cost; passing the full file as context costs every query and scales linearly with volume. The file analyzer shows both costs side-by-side so you can make the right decision for your traffic level.
What file formats are supported?
The analyzer supports plain text files: .txt, .md (Markdown), .json and .csv. For PDFs or Word documents, copy and paste the text content into the Prompt field on the Request cost page instead.
Does my file get uploaded to a server?
No. The analyzer reads your file entirely in the browser using the FileReader API. Your file content never leaves your device.