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.
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
.files record by record.jsonl
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
INSERTstatements. - 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:
{ "id": 42, "email": "ada@example.com", "roles": ["admin"], "profile": { "name": "Ada", "verified": true } }JSON to Types gives a nested interface for each object:
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. for whole numbers and z. for an email address:
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
- Open the DevSnip Pro sidebar and press Ctrl/Cmd+K to search the tools.
- Type "json" and pick a tool. Most tools can read the active editor or the selection.
- 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
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.