Original JSON

ASON Format

Tip: Hover over parts of the compressed format to see what each element represents.

How ASON 2.0 Compresses Your Data

Document Structure

$def:

Definitions section where repeated values are declared once and referenced later using semantic variables ($var).

$data:

Data section containing the actual compressed content using the definitions from above.

Tabular Arrays

CSV-like format with pipe delimiter

// Instead of repeating keys:
[{id:1,name:"Alice"},{id:2,name:"Bob"}]
// ASON 2.0 uses:
[2]{id,name}
1|Alice
2|Bob

Semantic References

Human-readable variable names

// Define in $def:
$email:user@example.com
// Use in $data:
customer.email:$email
billing.email:$email

Sections

Organize related data with @section

// Group object properties:
@customer
name:Alice
email:alice@ex.com
// Or tabular arrays:
@users [2]{id,name}
1|Alice

Path Flattening

Collapse nested single properties

// Instead of:
user:{profile:{settings:{theme:"dark"}}}
// ASON flattens to:
user.profile.settings.theme:dark
Complete Example: All Techniques Combined
JSON 184 tokens
{
  "company": {
    "name": "TechCorp Inc",
    "headquarters": {
      "street": "123 Innovation Drive",
      "city": "San Francisco",
      "zip": "94105"
    }
  },
  "offices": [
    {
      "location": "West Coast",
      "address": {
        "street": "123 Innovation Drive",
        "city": "San Francisco",
        "zip": "94105"
      }
    },
    {
      "location": "Branch Office",
      "address": {
        "street": "123 Innovation Drive",
        "city": "San Francisco",
        "zip": "94105"
      }
    }
  ],
  "contacts": [
    {"name": "John Doe", "email": "john@techcorp.com", "office": "123 Innovation Drive"},
    {"name": "Jane Smith", "email": "jane@techcorp.com", "office": "123 Innovation Drive"}
  ]
}
ASON 2.0 107 tokens (42.0% reduction)
$def:
 $street:"123 Innovation Drive"
 $city:"San Francisco"

$data:
offices:[2]{location,address.street,address.city,address.zip}
"West Coast"|$street|$city|"94105"
"Branch Office"|$street|$city|"94105"
contacts:[2]{name,email,office}
"John Doe"|"john@techcorp.com"|$street
"Jane Smith"|"jane@techcorp.com"|$street

@company
 name:"TechCorp Inc"
 headquarters:{street:"123 Innovation Drive",city:"San Francisco",zip:"94105"}
Components: $def/$data - Sections $var - References [N]{a.b.c} - Tabular + Dot Notation @section - Named Section {k:v} - Inline Objects

Why Choose ASON 2.0?

Zero Configuration

No setup required. ASON 2.0 automatically detects patterns and optimizes compression without any manual configuration.

Perfect Fidelity

100% lossless round-trip guaranteed. Your data structure and values remain exactly as they were after decompression.

Proven Results

20-60% token reduction with 35.9% average savings. Up to 60% on uniform data. Significantly reduces LLM API costs.

Universal Support

Full TypeScript definitions. Works seamlessly in Node.js and browsers. Available on NPM and all major CDNs.

Human Readable

Unlike binary formats, ASON output remains readable and debuggable while achieving significant compression ratios.

Smart Patterns

Combines sections, tabular arrays, semantic references, and dot notation automatically. Pipe delimiter for maximum efficiency.

Lower Costs, Better Results

Every token saved is money saved. ASON's design makes it easier for LLMs to parse correctly—reducing errors and improving response quality while cutting your API bills by 20-60%.

Fewer hallucinations
More context in prompts
Faster responses

Frequently Asked Questions

How much token reduction can I expect?
Token reduction varies by data structure. For uniform arrays (like lists of users or products), expect 40-60% reduction. For mixed structures, 20-40%. For deeply nested non-uniform data, 10-20%. The playground lets you test with your actual data.
Is ASON lossless? Will I get my exact data back?
Yes, ASON is 100% lossless. All values, types, and structure are perfectly preserved. Round-trip compression and decompression guarantees your data remains identical.
How does ASON compare to TOON format?
ASON consistently beats TOON by 5-15% on average. Key advantages: semantic references ($def), pipe delimiters for clarity, and smarter detection of repeated values. See the benchmarks page for detailed comparisons.
Why use pipes (|) instead of commas?
Pipes are unambiguous. Commas appear in numbers (1,000), dates (Jan 1, 2024), and natural text. This creates parsing confusion for LLMs. Pipes rarely appear in data, making field boundaries crystal clear.
Can LLMs generate valid ASON format?
Yes! ASON's clear structure (pipe delimiters, quoted strings, explicit sections) makes it easy for LLMs to learn and generate. Provide examples in your prompt and models like GPT-4 and Claude can produce valid ASON output.
Can I use ASON with any LLM provider?
Yes! ASON is just a text format. It works with OpenAI (GPT-3.5, GPT-4), Anthropic (Claude), Google (Gemini), local models (Llama), and any other LLM. Compress before sending, decompress after receiving.

Tools & Extensions

View all