Code Beautifier

JSON & Data Interchange

JSON is the default wire format, but the moment data crosses a boundary it becomes YAML in a CI file, TOML in a config, XML in an enterprise API, or CSV in a spreadsheet. These tools cover that whole surface: validating a payload, converting between formats without a round trip through a server, generating types for seven languages, and repairing the malformed JSON that language models emit. Everything runs in your browser tab, so production payloads never leave the machine.

Tools (39)

JSON Formatter
Format, validate, and explore JSON with a collapsible tree view.
JSON Minifier
Compress and minify JSON data by stripping all whitespace and line breaks to minimize payload size.
JSON Validator
Instantly validate JSON syntax, identify errors with exact line and column locations, and fix formatting bugs.
JSON to CSV
Convert JSON arrays and nested objects into clean, downloadable CSV spreadsheets in seconds.
JSON to XML
Convert JSON documents into clean, structured, and customizable XML markup instantly.
JSON to TypeScript
Generate strongly typed TypeScript interfaces and type aliases from sample JSON documents instantly.
JSONPath & JQ Query Evaluator
Test JSONPath expressions ($.store.book[*].author) against complex JSON payloads with instant match filtering.
JSON Schema Validator
Validate JSON documents against JSON Schema definitions using Ajv. Path-accurate structural error reports.
JSON Schema → Example
Generate sample JSON documents from a JSON Schema using defaults, enums, formats, and property heuristics.
CSV to JSON
Convert CSV tabular data into structured JSON objects or arrays with automatic type detection.
CSV/TSV Column Aligner
Turn raw CSV or TSV data into a plain-text table with aligned columns, like the Unix `column -t` command.
XML to JSON
Convert XML documents into readable, valid JSON objects with automatic type parsing and attribute preservation.
XML Formatter
Format, beautify, and validate messy XML files with custom indentation and instant syntax error detection.
YAML to JSON
Convert YAML configuration files into structured JSON documents (or JSON to YAML) instantly.
YAML to TOML Converter
Convert configuration files seamlessly between YAML and TOML formats with full data type preservation.
TOML to JSON
Convert TOML configuration files (Cargo.toml, pyproject.toml, Wrangler) into structured JSON documents.
TypeScript to JSON Schema Converter
Convert TypeScript interfaces and type definitions directly to valid Draft-07 JSON Schema specifications.
GraphQL Formatter & Minifier
Format, beautify, validate AST, and minify GraphQL queries, mutations, subscriptions, and SDL schemas.
GraphQL to TypeScript
Generate readable TypeScript interfaces, enums, unions, and scalar types from GraphQL SDL.
GraphQL to cURL
Turn a GraphQL operation (plus optional variables) into a ready-to-run curl command — entirely in-browser.
OpenAPI Formatter & Validator
Validate OpenAPI 3 and Swagger 2 documents, then format them as readable JSON or YAML.
Markdown Table Generator
Convert CSV, TSV, or JSON data into perfectly aligned GitHub-Flavored Markdown tables.
JSON to YAML
Convert JSON into clean, correctly quoted YAML for Kubernetes manifests, Docker Compose files, and CI configs.
JSON Diff
Compare two JSON documents structurally and see every added, removed, and changed value by path, ignoring key order.
JSON Repair
Fix broken JSON automatically: trailing commas, single quotes, unquoted keys, comments, Python literals, code fences, and truncated LLM output.
JSON Key Sorter
Sort JSON object keys alphabetically or naturally, at every level or just the top, and sort arrays of objects by a field.
JSON Stringify & Unstringify
Escape text into a JSON string, unescape it back, stringify a document for embedding, or decode double-encoded JSON.
JSONL to JSON Converter
Convert JSON Lines (NDJSON) to a JSON array and back, with the exact line number of any bad record.
YAML Validator
Validate YAML syntax with exact line and column errors, multi-document support, and warnings for values YAML 1.1 parsers read differently.
XML Validator
Check that XML is well-formed and get the error code, line, and column, plus document stats when it passes.
JSON to Zod
Generate Zod schemas and inferred TypeScript types from a JSON sample, with optional, nullable, and union fields detected across array items.
JSON to Go
Generate Go structs with json tags from a JSON sample: int64 and float64 detection, pointers and omitempty for optional fields, and Go-style initialisms.
JSON to Python (Pydantic)
Generate Pydantic v2 models, dataclasses, or TypedDicts from JSON, with snake_case fields, aliases for the original keys, and Optional where data can be missing.
JSON to Java
Generate Java records or POJOs from JSON with Jackson or Gson annotations, boxed types for nullable fields, and valid names for keys like class.
JSON to C#
Generate C# classes or records from JSON with System.Text.Json or Newtonsoft attributes, nullable types like long?, and required members.
JSON to Rust
Generate Rust structs with serde derives from JSON: Option<T> for optional fields, rename_all for camelCase APIs, and raw identifiers for keywords like type.
JSON to Kotlin
Generate Kotlin data classes from JSON for kotlinx.serialization, Moshi, or Gson, with nullable defaults for optional fields and backticks for keywords.
JSON to JSON Schema
Generate a JSON Schema from a JSON sample, with required fields, nullable types, and formats like email and date-time inferred from the data.
JSON Schema to TypeScript
Convert a JSON Schema into TypeScript interfaces and types, including $defs references, recursive schemas, enums, and nullable unions.

Validate before you convert

A failed conversion is almost always a syntax error upstream. JSON Validator reports the exact line and column of a trailing comma or an unquoted key, YAML Validator catches the indentation mistakes that make a manifest silently parse as a string, and XML Validator names the unclosed tag. When the input came from a language model and is bent rather than broken, JSON Repair fixes trailing commas, single quotes, Python literals and stray code fences in a single pass. When the document parses and you only need one value out of it, JSON Path Tester evaluates an expression against the payload instead.

Choosing between JSON, YAML and TOML

JSON has no comments and no trailing commas, which makes it precise for machines and awkward for humans editing config by hand. YAML adds comments and readability but inherits YAML 1.1 ambiguity: 22:22 can parse as a sexagesimal number, NO as a boolean, and 0123 as octal. That is why JSON to YAML quotes those values instead of trusting the reader. TOML avoids most of the ambiguity at the cost of awkward deep nesting. Convert either way with YAML to JSON or TOML to JSON.

Generating types from a payload

There are two routes from data to types. Sample-first takes a representative payload and infers the structure: JSON to TypeScript, JSON to Go and JSON to Zod merge every item in an array, mark a field optional when it is missing from any sample, and widen integers to floats as soon as one value is fractional. The same inference drives JSON to Python and JSON to C#, each emitting the idioms of its target rather than a transliteration. Schema-first starts from a contract instead, with JSON to JSON Schema and JSON Schema to TypeScript.

Cheat sheets

Guides

FAQ

Which data format should I pick for application config?

Use TOML or YAML when a human edits the file and needs comments, and JSON when only machines read it. If the file feeds a system that parses with YAML 1.1 rules, quote anything that looks like a number, a time, or a boolean.

Why did my YAML file turn a version number into something else?

YAML 1.1 interprets unquoted scalars aggressively: 22:22 becomes a sexagesimal number, 0123 is read as octal, and NO becomes false. Quote the value, which is what the JSON to YAML converter does automatically for ambiguous strings.

Should I generate types from a sample payload or from a schema?

A schema is authoritative and should win when one exists, because it encodes optionality and constraints the sample cannot show. Generate from a sample when there is no schema, and feed it several representative records so optional fields are detected correctly.

Do these converters send my payload anywhere?

No. Every transform in this pillar executes in your browser tab, and large inputs are handed to a local Web Worker rather than a server. Nothing is uploaded, which is what makes it safe to paste a production response.