Mindket

Claude Tokenizer

Newversion 1 · updated

Overview

Shows how Claude, OpenAI and Hugging Face tokenizers split your text, with token counts and characters per token side by side. Built for developers comparing token costs across models.

Claude Tokenizer is a kit in the Developer category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page, a zip of its files. Nothing in it runs by itself.

At a glance

You need
  • Python 3.12 and pip
  • A Hugging Face token set as a secret named HF_TOKEN, only for gated tokenizer repos
  • Nothing at all if you use the Space in a browser
Runs in
  • A web browser, on the Space's page at Hugging Face with nothing to install
  • Windows, macOS or Linux, as a local copy that needs Python 3.12
Start with
pip install -U huggingface_hub
hf download sanderland/claude-tokenizer --repo-type space --local-dir claude-tokenizer
cd claude-tokenizer

Platform

WindowsOperating system
macOSOperating system
LinuxOperating system

About

What it is

This Space shows how the Claude tokenizer splits text into tokens and sets the result beside OpenAI and open model tokenizers. You paste text or point at a public dataset, and it reports each token count plus how many characters one token covers.

Who it suits

Developers and researchers who want to know what a prompt or a language costs in tokens on Claude compared with other models.

IndustryWho uses itHow they use itExample
AI productsEngineers planning prompt sizeEstimate token use before choosing a modelPaste a system prompt and compare counts across tokenizers
LocalizationTeams translating contentSee which languages need more tokensRun a translation dataset and compare the cost per language
ResearchTokenizer researchersInspect how words break into piecesRead the notation for one sentence in the Claude rows
EducationStudents of language modelsWatch text turn into tokensPaste a short paragraph and view the pieces

If you never think about token counts or how models read text, you can skip it.

Where to use it

It runs in two places.

  • A web browser, on the Space's page at Hugging Face with nothing to install
  • Windows, macOS or Linux, as a local copy that needs Python 3.12
Use caseWhoWhat they get back
Compare one textDevelopersToken counts and characters per token for each tokenizer
Compare a datasetResearchersCounts over the first rows of a public dataset
Check a Hub modelModel buildersThe same numbers for any repo that ships a tokenizer file

How to set it up

You need a few things before a local run.

  • Python 3.12 and pip
  • A Hugging Face token set as a secret named HF_TOKEN, only for gated tokenizer repos
  • Nothing at all if you use the Space in a browser
  1. Install the Hugging Face tools.
  2. Download the Space into a folder.
  3. Move into that folder.
  4. Install Gradio and the packages from requirements.txt.
  5. Start the app.
pip install -U huggingface_hub
hf download sanderland/claude-tokenizer --repo-type space --local-dir claude-tokenizer
cd claude-tokenizer
pip install gradio==6.24.0
pip install -r requirements.txt
python app.py

How to use it

Open the app and paste your text. Each tokenizer shows its pieces, its count and its characters per token. For a dataset, give its id, name the config and the column that holds the text, and set how many rows to compare. The author also publishes a small package that counts one string offline.

uvx ctok "your text"
ToolWhat it does
Text comparisonSplits pasted text with each chosen tokenizer
Tokenizer dropdownTakes a Hub repo id to add another tokenizer
Dataset tabStreams rows from a public dataset and compares them
ctokCounts a string offline with no API call

Example

You paste a paragraph in French and leave the defaults. The page shows Claude v5, o200k_base and DeepSeek V4 Flash side by side. Each has its token count and its characters per token, so you see which one splits the paragraph into fewer pieces.

For newcomers and experts

A token is a chunk of text that a model reads instead of single letters. Paste one sentence and watch where each tokenizer places its cuts. Fewer tokens for the same text usually means a lower cost.

If you work on tokenizers, the Claude side is rebuilt by the ctok package rather than read from a published list, so its vocab figure counts pieces with a membership witness. Claude v3 and v5 are compared, and the v4.7 vocabulary is shared with v5. Notation marks word starts, capitals and raw bytes.

  1. You paste text or choose a dataset
  2. Each tokenizer splits it into pieces
  3. The app counts tokens and characters per token
  4. You compare the rows side by side

Good to know

Counts cover the text alone and leave out the extra tokens an API request wraps around one message.

  • License: MIT
  • Cost to run: no paid service is named, a Hugging Face token is needed only for gated repos
  • Data it reaches: public datasets, streamed row by row and never downloaded whole
  • Not for: matching a real API request token for token

README and files

README

Claude Tokenizer

Shows how Claude, OpenAI and Hugging Face tokenizers split your text, with token counts and characters per token side by side. Built for developers comparing token costs across models.

Made by sanderland on Hugging Face. These notes are Mindket's, written from its Space page and README; the app's own files and license are on Hugging Face.

About

What it is: This Space shows how the Claude tokenizer splits text into tokens and sets the result beside OpenAI and open model tokenizers. You paste text or point at a public dataset, and it reports each token count plus how many characters one token covers.

Who it suits: Developers and researchers who want to know what a prompt or a language costs in tokens on Claude compared with other models.

Industry | Who uses it | How they use it | Example
AI products | Engineers planning prompt size | Estimate token use before choosing a model | Paste a system prompt and compare counts across tokenizers
Localization | Teams translating content | See which languages need more tokens | Run a translation dataset and compare the cost per language
Research | Tokenizer researchers | Inspect how words break into pieces | Read the notation for one sentence in the Claude rows
Education | Students of language models | Watch text turn into tokens | Paste a short paragraph and view the pieces

If you never think about token counts or how models read text, you can skip it.

Where to use it: It runs in two places.

  • A web browser, on the Space's page at Hugging Face with nothing to install
  • Windows, macOS or Linux, as a local copy that needs Python 3.12
Use case | Who | What they get back
Compare one text | Developers | Token counts and characters per token for each tokenizer
Compare a dataset | Researchers | Counts over the first rows of a public dataset
Check a Hub model | Model builders | The same numbers for any repo that ships a tokenizer file

How to set it up: You need a few things before a local run.

  • Python 3.12 and pip
  • A Hugging Face token set as a secret named HF_TOKEN, only for gated tokenizer repos
  • Nothing at all if you use the Space in a browser
  1. Install the Hugging Face tools.
  2. Download the Space into a folder.
  3. Move into that folder.
  4. Install Gradio and the packages from requirements.txt.
  5. Start the app.
pip install -U huggingface_hub
hf download sanderland/claude-tokenizer --repo-type space --local-dir claude-tokenizer
cd claude-tokenizer
pip install gradio==6.24.0
pip install -r requirements.txt
python app.py

How to use it: Open the app and paste your text. Each tokenizer shows its pieces, its count and its characters per token. For a dataset, give its id, name the config and the column that holds the text, and set how many rows to compare. The author also publishes a small package that counts one string offline.

uvx ctok "your text"
Tool | What it does
Text comparison | Splits pasted text with each chosen tokenizer
Tokenizer dropdown | Takes a Hub repo id to add another tokenizer
Dataset tab | Streams rows from a public dataset and compares them
ctok | Counts a string offline with no API call

Example: You paste a paragraph in French and leave the defaults. The page shows Claude v5, o200k_base and DeepSeek V4 Flash side by side. Each has its token count and its characters per token, so you see which one splits the paragraph into fewer pieces.

For newcomers and experts: A token is a chunk of text that a model reads instead of single letters. Paste one sentence and watch where each tokenizer places its cuts. Fewer tokens for the same text usually means a lower cost.

If you work on tokenizers, the Claude side is rebuilt by the ctok package rather than read from a published list, so its vocab figure counts pieces with a membership witness. Claude v3 and v5 are compared, and the v4.7 vocabulary is shared with v5. Notation marks word starts, capitals and raw bytes.

You paste text or choose a dataset
Each tokenizer splits it into pieces
The app counts tokens and characters per token
You compare the rows side by side

Good to know: Counts cover the text alone and leave out the extra tokens an API request wraps around one message.

  • License: MIT
  • Cost to run: no paid service is named, a Hugging Face token is needed only for gated repos
  • Data it reaches: public datasets, streamed row by row and never downloaded whole
  • Not for: matching a real API request token for token

On Hugging Face, 13 November 2026

  • Likes: 2
  • Built with: gradio
  • License: mit

Links

Try it

Open the Space in your browser, or copy it to your own Hugging Face account from its page. Nothing in this kit runs by itself.

Files
README.md  5 KB

1 file, 5 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-12

Compare with similar

Listed Hugging Face Spaces in the same category that share the most tags with this one.

ProductLikesBuilt withLicenseLast change
Claude Tokenizer This page2gradiomit
Z Image TurboShares mcp-server · gradio1,940gradioapache-2.0
TRELLISShares mcp-server · gradio817gradiomit
SAM3 DemoShares mcp-server · gradio91gradioapache-2.0
TRELLIS.2-Text-to-3D (Rerun)Shares mcp-server · gradio58gradioapache-2.0
Multi-Agent AI - CodingShares mcp-server · gradio39gradioapache-2.0
Numbers as Mindket last read them, on 2026-11-12.

Reviews

No ratings yet

Write a review

No reviews yet.

What people say

Posts and comments that name this project on Hacker News, Bluesky, X, Reddit, Facebook and YouTube, found by a weekly search and on Trendshift. Mindket doesn’t write or check them. Open one to read it where it was posted.

Searched

More from Mindket

See all from Mindket

Nanosaur2-670M

well9472 · Kit

Makes illustrations from text prompts with a small 670M-parameter diffusion model, run through ComfyUI. Built as a low-budget research model for people who wan…

New

Reads handwritten Arabic text from images and returns it as text. A fine-tuned PaddleOCR-VL model for people digitizing Arabic handwriting.

New

Makes video clips from a text prompt or an image plus text, at up to 720P and 24 frames per second, in the Diffusers format for a single consumer GPU.

New

Similar in Developer

See all in Developer

Wan2.2-S2V-14B

Wan-AI · Kit

Generates cinematic video of a character driven by an audio track, and can also lip-sync existing video. For video creators, animators and researchers with a l…

New

Wan2.2-Animate-14B

Wan-AI · Kit

Animates a character or swaps one into a video by copying a performer's movement and expressions, as one model from the Wan2.2 video family. Use only faces and…

New

d3-turbo

vllm-sr · Kit

Answers choice, yes-or-no, score, box and tracking questions about text, images or video in one call, with a probability for each answer. For people building r…

New