Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>JsonToonCraftNew to Visual Studio Code? Get it now.
JsonToonCraft

JsonToonCraft

Krish

|
1 install
| (0) | Free
Convert JSON to TypeScript, Zod, OpenAPI & TOON format. Reduce LLM token usage by 60%.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

JsonToonCraft for VS Code

Transform JSON to TypeScript, Zod, OpenAPI & TOON format instantly - right in your editor!

VS Code Marketplace Website

Features

🚀 Instant Conversion: Convert JSON with a single command 🎯 Multiple Formats: TypeScript, Zod, OpenAPI, TOON 💾 Flexible Output: Replace, insert, copy, or open in new file ⌨️ Keyboard Shortcuts: Fast workflow with keybindings 🔒 100% Local: All processing happens in your editor 📦 Zero Config: Works out of the box

Supported Conversions

  • JSON → TypeScript Interfaces - Type-safe interfaces with nested support
  • JSON → Zod Schemas - Runtime validation schemas
  • JSON → OpenAPI 3.1 - API specification schemas
  • JSON → TOON Format - Compact format (30-60% fewer tokens for LLMs)
  • TOON → JSON - Bidirectional TOON support

Usage

Command Palette

  1. Select JSON text in your editor
  2. Open Command Palette (Cmd/Ctrl + Shift + P)
  3. Type "JsonToonCraft" and choose your conversion:
    • JsonToonCraft: Convert to TypeScript Interface
    • JsonToonCraft: Convert to Zod Schema
    • JsonToonCraft: Convert to OpenAPI Schema
    • JsonToonCraft: Convert to TOON Format
    • JsonToonCraft: Convert TOON to JSON

Right-Click Menu

  1. Select JSON text
  2. Right-click
  3. Choose "JsonToonCraft: Convert to..."

Keyboard Shortcuts

  • Cmd/Ctrl + Shift + T - Convert to TypeScript
  • Cmd/Ctrl + Shift + Z - Convert to Zod
  • Cmd/Ctrl + Shift + N - Convert to TOON

Example

Input (JSON):

{
  "name": "John",
  "age": 30,
  "email": "john@example.com"
}

Output (TypeScript):

interface Root {
  name: string;
  age: number;
  email: string;
}

Output (Zod):

import { z } from 'zod';

const RootSchema = z.object({
  name: z.string(),
  age: z.number(),
  email: z.string(),
});

Output (TOON - 42% smaller!):

name: "John"
age: 30
email: "john@example.com"

What is TOON Format?

TOON is a compact, human-readable data format designed to reduce LLM token usage by 30-60%. Perfect for:

  • Reducing AI API costs
  • Optimizing prompts
  • Faster LLM processing
  • Smaller context windows

Learn more about TOON format

Output Options

After conversion, choose what to do with the result:

  • Replace selection - Replace selected text with output
  • Insert below - Insert output below selection
  • Copy to clipboard - Copy to clipboard for pasting elsewhere
  • Open in new file - Open output in a new editor tab

Requirements

  • VS Code version 1.85.0 or higher

Privacy

All conversions happen locally in your editor. Your data never leaves your computer.

Web Version

Prefer a web interface? Try JsonToonCraft Web App

Contributing

Found a bug or have a feature request? Report an issue

License

MIT - Free and Open Source


Made with ❤️ by Krish Follow on Twitter/X • GitHub

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft