Tiktokenizer

Google Gemini 3.6 Flash · Local estimate

Gemini 3.6 Flash Token Counter

Estimate plain-text size locally using Google's documented rule of about 4 characters per token, without an API key. Use model-aware countTokens for complete request input.

Accuracy note

Local character estimate using Google's rough rule of about 4 characters per token, oriented toward English text. It is not Gemini tokenization, produces no token IDs and excludes request overhead. Other languages, code and emoji can vary substantially; use countTokens for model-aware input.

Official counting docs →
Model ID
gemini-3.6-flash
Input limit
1,048,576 tokens
Output limit
65,536 tokens
Local support
Local character estimate
Exact method
models.countTokens

Facts checked against official sources on .

How to Count Gemini 3.6 Flash Tokens

For a keyless local estimate, paste text into the editor. Google documents about 4 characters per token, with 100 tokens roughly corresponding to 60–80 English words. This heuristic does not produce token boundaries or IDs and can vary substantially for multilingual text, code and emoji.

For a model-aware count, call models.countTokens with model gemini-3.6-flash and the same contents you plan to send. The method runs the model's tokenizer and returns the total number of input tokens without generating a response.

For a completed interaction, inspect its usage object. Google separates input, output, thought, cached, tool-use, and total tokens, so a preflight text count and the final interaction total answer different questions.

javascriptOfficial counting example
import { GoogleGenAI } from "@google/genai";

const client = new GoogleGenAI({});
const result = await client.models.countTokens({
  model: "gemini-3.6-flash",
  contents: "Count this Gemini 3.6 Flash prompt.",
});
console.log(result.totalTokens);

What Gemini countTokens Can Measure

Input typeCount before generation?Important note
Text and chat historyYesSend the complete contents structure
Images and documentsYesMedia follows Gemini-specific token accounting
Audio and videoYesDuration and media processing affect the total
System instructions and toolsYesInclude the same configuration as the real request
Generated output and thinkingNoRead these from final interaction usage

Gemini 3.6 Flash Context Planning

Google documents a 1,048,576-token input limit and a 65,536-token output limit for the current Flash generation. Do not fill the input allowance without considering files, system instructions, tool definitions, conversation state, and the output your workflow needs.

The Gemini 3.5 Flash page remains useful for applications pinned to that stable model. Use this Gemini 3.6 page only when the request model is gemini-3.6-flash, because model updates can change tokenization and usage behavior.

Tiktokenizer Reference Sources

Tokenizer behavior and model limits change. Verify production decisions with current provider documentation:

Frequently asked questions

How do I count Gemini 3.6 Flash tokens exactly?

Call models.countTokens with model gemini-3.6-flash and the same contents structure you plan to use.

Is the local browser result exact for Gemini?

No. It is a keyless character-based estimate from Google's documented heuristic, without Gemini token boundaries or IDs. Use countTokens for model-aware request input.

Does countTokens include output tokens?

No. It is a preflight input count. Read output, thought, cache, tool-use, and total token categories from the final interaction usage.

What are the Gemini 3.6 Flash token limits?

Google documents an input limit of 1,048,576 tokens and an output limit of 65,536 tokens.