JSON tools

Format, validate and convert JSON in VS Code

API responses, config files, logs and model output are all JSON or close to it. Instead of pasting a production payload into a website, format, check and convert it in the editor, where nothing leaves your machine.

Install DevSnip Pro — freeRead the docs

On this page 6 sections

Format and validate

  • JSON / YAML / XML Formatter: format, minify, validate and convert between the three.
  • JSON Schema Validator: every violation with its path, or a schema inferred from the JSON when you have none.
  • Diff Checker: compare two texts, or two JSON documents structurally, so reordered keys are not reported as changes.
  • JSON Lines Inspector: read .jsonl files record by record.

Convert

  • XML → JSON Converter: strict validation, namespaces, CDATA, a lossless mode and large files.
  • JSON to Types: TypeScript interfaces or types, Zod, Pydantic, dataclasses, Go, Java, Kotlin, Dart and Swift from a sample.
  • Data Converter: CSV/TSV, JSON, JSON Lines, YAML, Markdown tables and SQL INSERT statements.
  • Encode / Decode: Base64, URL, HTML entities, hex and Unicode.
  • LLM Output Cleaner: extract and repair the JSON in a model reply.

Example: types from a JSON sample

Paste a response sample:

JSON
{ "id": 42, "email": "ada@example.com", "roles": ["admin"], "profile": { "name": "Ada", "verified": true } }

JSON to Types gives a nested interface for each object:

TypeScript
export interface User {
  id: number;
  email: string;
  roles: string[];
  profile: Profile;
}

export interface Profile {
  name: string;
  verified: boolean;
}

Pick Zod instead and you get schemas that check the data at runtime, including z.number().int() for whole numbers and z.string().email() for an email address:

TypeScript · Zod
export const userSchema = z.object({
  id: z.number().int(),
  email: z.string().email(),
  roles: z.array(z.string()),
  profile: profileSchema,
});
export type User = z.infer<typeof userSchema>;

Get started

  1. Open the DevSnip Pro sidebar and press Ctrl/Cmd+K to search the tools.
  2. Type "json" and pick a tool. Most tools can read the active editor or the selection.
  3. Use Copy, Insert at cursor, Open in editor or Save on the result.

Tools in this area

Text & Formatters 5 tools

  • JSON / YAML / XML Formatter
  • XML → JSON Converter
  • Diff Checker
  • Regex Tester & Library
  • Case Converter & Text Tools

Encoders & Converters 5 tools

  • Encode / Decode
  • Timestamp Converter
  • UUID & ID Generator
  • JSON to Types
  • Data Converter

Search all the developer tools →

Questions

Is my JSON sent to a server?
No. The formatter, validators and converters run locally in VS Code, which matters when the data is a production payload or contains tokens.
Can it decode a JWT?
Yes. JWT Decoder & Signer shows the header and payload as formatted JSON, checks the expiry, and verifies or signs test tokens.

Try it in your own editor

Free, no account, runs locally. Requires VS Code 1.93+ on Windows, macOS or Linux.

code --install-extension sayaib.hue-console