> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chowder.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# tokenize

> Tokenize text columns.

`tokenize` splits each row of a text column into tokens and returns a column of `ARRAY<VARCHAR>` token strings.

By default, `tokenize` uses the same tokenizer as `infer`'s default models. To use another model's tokenizer, pass a Hugging Face repository or a local `tokenizer.json` as the second argument.

## Signature

```chowder-sql theme={"theme":"css-variables","languages":{"custom":["/languages/chowder-sql.json"]}}
tokenize(text [, tokenizer])
```

| Parameter | Type | Default | Description |
| - | - | - | - |
| `text` | `VARCHAR` | — | Text to tokenize. |
| `tokenizer` | Constant `VARCHAR` | `Qwen/Qwen3.5-0.8B` | Hugging Face repository or local `tokenizer.json` path. |

## Example

```chowder-sql theme={"theme":"css-variables","languages":{"custom":["/languages/chowder-sql.json"]}}
SELECT
    title,
    tokenize(content) AS token_strings
FROM read_parquet('hf://buckets/chowderai/chowder-demo/parquet/data/amazon-reviews/*.parquet')
LIMIT 3;
```

## Return type

`ARRAY<VARCHAR>`, or null for a null input.

Special tokens are not added. Use [`tokens`](https://docs.chowder.ai/reference/column-functions/tokens) when you need only the count.

See [Count tokens in a dataset](https://docs.chowder.ai/guides/token-profiling.md) to count conversations, total tokens, and average input size across a hosted dataset.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.