JSON Converter
Online
Convert JSON to TypeScript, Go, Rust, YAML, CSV, SQL, a string and 23 more formats, and back again.
Paste JSON, get the result as you type. Nothing leaves your browser.
{ "name": "Ada", "email": "[email protected]", "age": 30, "active": true }
interface User { name: string; email: string; age: number; active: boolean; }
All JSON converters
JSON conversion here means one of three things: generating typed code from a JSON sample, changing JSON into another data format (or back), or reshaping the JSON itself. Every converter below runs on its own page, converts as you type, and keeps your data in the browser.
| You want to | Use |
|---|---|
| Type an API response in a frontend | JSON to TypeScript |
| Validate request bodies at runtime | JSON to Zod |
| Model a payload in Python / FastAPI | JSON to Pydantic |
| Decode JSON in Go, Rust or Swift | JSON to Go / Rust / Swift |
| Embed JSON inside a string or env var | JSON to String |
| Open JSON in Excel or Sheets | JSON to CSV |
| Write a config file by hand | JSON to YAML |
| Load records into a database | JSON to SQL |
| Find a syntax error | JSON Validator |
Code Generators
Convert JSON to TypeScript interfaces instantly
Generate Zod validation schemas from JSON data
Generate Python Pydantic v2 models from JSON
Convert JSON to Go structs with json tags
Convert JSON to C# classes with properties and JsonPropertyName attributes
Convert JSON to Kotlin data classes with serialization annotations
Convert JSON to Java classes with Jackson annotations
Convert JSON to Dart classes with fromJson/toJson methods
Convert JSON to Rust structs with serde derive macros
Convert JSON to Swift Codable structs
Convert JSON to PHP classes with typed properties, constructors, and fromJson factory methods
Generate JSON Schema from sample JSON data
Utilities
Format and beautify JSON with customizable indentation
Minify JSON by removing all whitespace
Explore JSON with an interactive tree view
Compare two JSON objects and find differences
Decode JWT tokens to inspect the header, payload and signature
Query JSON data using JSONPath expressions
Validate JSON syntax instantly
Convert JSON to an escaped string literal, or parse a JSON string back into an object
Converters
Convert JSON to clean, readable YAML
Convert JSON arrays and objects to CSV format
Convert JSON to XML elements
Convert YAML to JSON format
Convert XML documents to JSON format
Convert comma-separated CSV to a JSON array of objects
Encode JSON to Base64 (UTF-8) and decode Base64 or base64url back to JSON
Convert JSON to SQL CREATE TABLE and INSERT statements
Convert JSON to Markdown tables
Convert JSON to HTML tables with proper styling
Built for developers
No bloat, no accounts, no server calls. Just fast, reliable JSON tools.
Real-time conversion
Output updates as you type. No convert button, no spinners, no waiting.
100% private
Your data never leaves your browser. No servers, no tracking, no ads, no cookies.
Auto-repair & detection
Automatically fixes trailing commas, missing quotes, and common JSON issues.
Shareable links
Share conversions via URL. Data is compressed in the hash - no server needed.
Three steps. Zero friction.
Paste your JSON
Drop in any JSON - we auto-detect and fix common issues.
Pick your output
Choose from 30 formats. Switch between them instantly.
Copy and use
Copy the result, download the file, or share a link.
FAQ
What is a JSON converter?
A JSON converter turns JSON into another format, or another format into JSON. Here that means typed code (TypeScript interfaces, Go structs, Rust structs, Pydantic models and more), data formats (YAML, CSV, XML, SQL, Markdown, HTML tables, Base64) and an escaped JSON string. Pick the target from the list above and paste your JSON.
How do I convert JSON to a string?
Use the JSON to String converter at /json-stringify. It minifies the JSON and escapes quotes, backslashes and newlines, giving the same result as JSON.stringify(JSON.stringify(obj)). The same page turns a JSON string back into an object.
How do I convert a JSON string to an object?
Open /json-stringify and switch to String to JSON. Paste the string with or without its outer quotes. It is parsed, unwrapped if it was stringified twice, and pretty-printed. In code, JSON.parse(str) does the same.
Is my JSON uploaded anywhere?
No. Every converter runs in JavaScript in your browser. There is no backend that receives your data. You can check in the Network tab of your browser DevTools while you paste.
Can it handle large JSON files?
Yes, within what your browser can hold in memory. The type inference that powers the code generators was measured at about 300 ms per generator on a 27.8 MB file with 200,000 records.
Is the generated code correct?
The code generators share one inference engine that reads every array element, keeps optional and nullable apart and names each shape once. A test suite compiles or round-trips the output for TypeScript, Zod, Pydantic, Go, Swift, Java, PHP, SQL and JSON Schema on every change.
From the blog
View allDuplicate Keys in JSON: Which Value Wins?
Duplicate keys in JSON are legal but undefined. What JSON.parse, Python, Go, jq and Jackson do with them, why it is a security bug, and how to detect them.
jq Cheat Sheet: Filters You Will Actually Use
A jq cheat sheet with tested examples: select, map, pick, group_by, |= updates, --arg, @csv output, and the precedence gotcha behind "number required".
How to Convert JSON to Excel (Power Query, CSV, Python)
Convert a JSON file to Excel with Power Query (Data > Get Data > From JSON), through CSV, or with pandas. What happens to nested data, plus Google Sheets.