---
title: "Discussion on \"YAML vs JSON for LLMs: Real Token Counts, Real Gotchas\" | Hashnode"
description: "Discussion on \"YAML vs JSON for LLMs: Real Token Counts, Real Gotchas\". Originally published on DevToolHub.\n\nYAML vs JSON for LLMs isn't just a style preference — it changes how many tokens you pay for on every request. I ran both formats through a real tokenizer on ident"
url: "https://hashnode.com/posts/yaml-vs-json-for-llms-real-token-counts-real-gotchas/6ace1b8a42b627744ad22902"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [YAML vs JSON for LLMs: Real Token Counts, Real Gotchas](https://devtoolhub.hashnode.dev/yaml-vs-json-for-llms-real-token-counts-real-gotchas?utm_source=hashnode&utm_medium=feed)

Originally published on DevToolHub. YAML vs JSON for LLMs isn't just a style preference — it changes how many tokens you pay for on every request. I ran both formats through a real tokenizer on ident

Oct 13 · 7 min read · devtoolhub.hashnode.dev  
Read the article

-   [#yaml](https://hashnode.com/tag/yaml)
-   [#json](https://hashnode.com/tag/json)
-   [#llm](https://hashnode.com/tag/llm)

## Written by

[Amaresh Pelleti](https://hashnode.com/@amareswer)

@amareswer

  
[View profile](https://hashnode.com/@amareswer)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
