JSON Token Calculator

Paste your JSON to count tokens, estimate costs, and analyze token distribution across keys, values, and structural characters.

Common JSON Patterns & Token Costs

Simple User Object

~15-25 tokens for basic user data (name, email, id)

API Error Response

~20-40 tokens for error code, message, and details

Paginated List Response

~50-100 tokens per item + ~30 tokens for pagination metadata

Chat Completion Request

~25 tokens overhead for the messages array structure alone