NEW Formatter, converters, code generator and .env studio in one place

JSON StudioYour complete workspace for structured data

Format, validate, compare and query JSON; convert between JSON, CSV, YAML, XML and .env; generate typed models in seven languages; and turn environment variables into Kubernetes, Docker, GitHub Actions, ECS or Spring Boot config. Everything runs on your device: your data never leaves this tab.

  • Runs in your browser
  • Your input is never uploaded
  • No sign-up
  • Works offline after first visit
Local only

Input

Output

Waiting for JSON Ln 1, Col 1

About JSON Studio

JSON (JavaScript Object Notation) is the standard text format for web APIs, configuration files and log events. It has only six kinds of value: objects, arrays, strings, numbers, true/false and null. The grammar (RFC 8259) is deliberately strict, so one missing comma or a stray quote makes a whole document unreadable, and minified JSON from an API is hard for a person to read.

JSON Studio is a complete workspace for structured data, organised in four workspaces you switch between at the top: Editor (format, validate, tree, compare, JSONPath, statistics, string escaping), Convert (JSON, CSV, YAML, XML and .env in any direction), Generate (typed models in seven languages) and Environment (deployment configuration from environment variables). They share one editor with syntax colours, line numbers, undo, find and replace, file opening, drag and drop and downloads. Validity is checked with the browser's own JSON.parse, the same parser your front-end code uses; when parsing fails, JSON Studio walks the text itself to report the line, the column and a plain-language reason.

It replaces five earlier DevToolbox pages: the JSON Formatter, JSON ⇄ CSV, JSON to Types, YAML ⇄ JSON (Config Studio) and the .env converter. Their old addresses open the matching workspace here.

How to use it

  1. Add your JSON. Paste or type it into Input, drop a .json file anywhere on the workspace, press Open a file, or pick one of the Samples (API response, user object, config file, nested data, a broken document and a 5 MB dataset).
  2. Read the status. The status bar turns green for valid JSON. For invalid JSON a red bar under the editor names the problem, its line and column and how to fix it; Go to error puts the cursor on it. Amber warnings flag duplicate keys and integers too large for JavaScript.
  3. Format, minify or sort. With Auto-format on, the output follows your typing. Choose 2 spaces, 4 spaces or tabs. Sort keys orders object keys at every level. Copy, download, or send the output back to the input.
  4. Explore. Switch the output to Tree to expand and collapse objects and arrays, search keys and values, and copy any value or its path. The JSONPath and Stats tabs work on the same document.
  5. Compare, query or escape. The Editor workspace also has Compare (diff two documents with key order ignored, copy a report or a JSON Patch), JSONPath, Stats and Escape (text ⇄ JSON string literal).
  6. Convert, generate or configure. Switch to Convert to turn any of JSON, CSV, YAML, XML and .env into another, Generate for TypeScript, Java, Kotlin, Go, Python, C# or Rust types, and Environment for Kubernetes, Docker, GitHub Actions, ECS and Spring Boot configuration. The ? button explains the workspace you are in.

Examples

Pretty-printing a minified API response

Input

{"id":42,"name":"DevToolbox","active":true,"tags":["json","tools"],"owner":{"email":"dev@example.com","plan":null},"score":9.5}

Output (Format, 2 spaces)

{
  "id": 42,
  "name": "DevToolbox",
  "active": true,
  "tags": [
    "json",
    "tools"
  ],
  "owner": {
    "email": "dev@example.com",
    "plan": null
  },
  "score": 9.5
}

Minified, this is 127 bytes. Formatting only changes the whitespace between values; the values themselves are copied exactly as written.

A trailing comma

Input

{
  "name": "api",
  "port": 8080,
}

What JSON Studio reports

Line 3, column 15
Trailing comma: the last property in an object
cannot be followed by a comma.
Remove this comma.

The position points at the comma itself, not at the } where a parser first notices the problem. The comma is also underlined in the editor.

Sorting keys

Input

{"zeta":1,"Alpha":2,"beta":{"y":true,"x":false},"10":"ten","2":"two"}

Output (Sort keys)

{
  "10": "ten",
  "2": "two",
  "Alpha": 2,
  "beta": {
    "x": false,
    "y": true
  },
  "zeta": 1
}

Keys are compared character by character (code-point order) at every level, so "10" comes before "2" and capitals before lower case. Array order is never changed, because in JSON it is meaningful.

Comparing two documents

A and B

A: {"user":"ana","roles":["editor"],"plan":{"tier":"free","seats":1}}
B: {"user":"ana","roles":["editor","admin"],"plan":{"tier":"pro","seats":1},"active":true}

Report (Copy report)

JSON comparison: 2 added, 0 removed, 1 changed

+ $.roles[1]: "admin"
~ $.plan.tier: "free" → "pro"
+ $.active: true

JSON Patch copies the same differences as RFC 6902 operations: [{"op":"add","path":"/roles/1","value":"admin"},{"op":"replace","path":"/plan/tier","value":"pro"},{"op":"add","path":"/active","value":true}].

A JSONPath filter

Document and query

{"store":{"book":[{"title":"Dune","price":8.99},
  {"title":"Neuromancer","price":12.5},
  {"title":"Snow Crash","price":9.75}]}}

$.store.book[?(@.price < 10)].title

Results

$.store.book[0].title  "Dune"
$.store.book[2].title  "Snow Crash"

JSON to CSV with nested fields

Input

[{"id":1,"name":"Ana","address":{"city":"Lisbon"},"tags":["a","b"]},
 {"id":2,"name":"Li, Wei","address":{"city":"Kyoto"},"tags":["c"]}]

Output (flatten nested)

id,name,address.city,tags.0,tags.1
1,Ana,Lisbon,a,b
2,"Li, Wei",Kyoto,c,

Nested objects and arrays become dotted column names, and a value containing a comma is quoted. CSV → JSON with Nest dotted columns turns these columns back into the original structure.

Convert: JSON, CSV, YAML, XML and .env

Choose a source and a target format, paste or drop a file, and the output follows your typing. Every conversion goes through the same lossless data model (key order kept, integers beyond 253 kept exactly), so the only changes are the ones the target format forces, and each one is listed under Diagnostics.

From ↓ / To →JSONYAMLCSVXML.env
JSONreformat✓ lossless✓ flattened✓ text only✓ objects only
YAML✓ comments dropped✓ re-indent, keeps comments✓ flattened✓ text only✓ objects only
CSV✓ types inferred✓ types inferredreformat✓✓
XML✓ attributes as @keys✓✓ flattenedreformat✓
.env✓ strings (or typed)✓✓✓reformat
  • CSV: RFC 4180 quoting (commas, quotes and line breaks inside fields), delimiter detection or comma, semicolon, tab and pipe, single or double quotes, doubled or backslash-escaped quotes, header row on or off. Duplicate headers are renamed (name, name_2) instead of overwriting each other, and rows with extra cells get extra columns. Columns like address.city or tags.0 rebuild nested objects and arrays; the separator is configurable.
  • Types are never guessed: 007, +5, 1e5, 16-digit IDs, TRUE, yes and N/A stay text, and a column that contains a code like 01100 stays text as a whole. Each case is reported with its line.
  • YAML: several --- documents become an array, anchors and aliases are expanded, merge keys (<<: *defaults) are applied, duplicate keys are errors, and strings such as yes, no or 0123 are quoted in the output so YAML 1.1 readers do not change them. YAML → YAML re-indents and keeps comments, anchors and tags.
  • XML: attributes become @name keys, mixed text goes into #text, repeated elements become arrays (or always, for names you list), CDATA and entities are decoded, comments and DOCTYPEs are reported and ignored (entities are never expanded).
  • .env: read with dotenv rules (see the Environment section); written with UPPER_CASE names joined by _ and quoting that every common loader reads back unchanged.

Generate: types from JSON

Paste one or more JSON samples (each sample is a tab; + adds another) and pick a target: TypeScript interfaces or type aliases, Java POJOs, records or Lombok classes, Kotlin data classes, Go structs, Python dataclasses or TypedDicts, C# classes or Rust structs. All samples, and all items of every array, are merged: a field missing from some becomes optional and a field that is null somewhere becomes nullable (both rules can be switched off).

  • Settings: root type name, package (Java, Kotlin, Go) or namespace (C#), naming convention, optional vs nullable style, nested or separate types, one file per type, serialization annotations (Jackson, Gson, Moshi, kotlinx.serialization, System.Text.Json, Newtonsoft, serde), getters and setters, Lombok style and builder, date-time mapping (OffsetDateTime, time.Time, datetime…) and numeric types (32-bit, 64-bit, big integers, decimals).
  • Correct by construction: a field whose name had to change (reserved word, invalid identifier, naming convention) keeps its JSON name through an annotation, colliding names get a suffix, and conflicting types, empty arrays and numbers too large for the chosen type are listed as warnings.
  • Output: preview each file, copy one or all, download one, or download every file as a ZIP made in the browser.

Environment: .env to Kubernetes, Docker, CI and Spring

Paste a .env file, a JSON object or a YAML mapping and choose an output: .env, JSON, YAML, a Docker Compose environment block, docker run -e flags, a Kubernetes ConfigMap or Secret (YAML or JSON, with name, namespace and labels), a GitHub Actions env block at workflow, job or step level, an AWS ECS containerDefinitions environment array, or Spring Boot application.properties / application.yml.

  • dotenv parsing: comments, export, single, double and backtick quotes, empty values, multi-line quoted values, \n and \" escapes in double quotes, Windows line endings. Duplicate keys, invalid names and unclosed quotes are reported with their lines. ${VAR} references are kept as written and explained: plain dotenv does not expand them, dotenv-expand and Docker Compose do.
  • Keys: sort, add or strip a prefix, rename (also with wildcards like OLD_*=NEW_*), change case or separators, include or exclude keys. Collisions are reported, never silent.
  • Secrets: values whose names look secret are masked on screen by default, and copying or downloading them asks first. GitHub Actions output can use ${{ secrets.NAME }} and ECS output the secrets array with SSM Parameter Store or Secrets Manager ARNs instead of plain values. Kubernetes Secret values are base64-encoded, and base64 is an encoding, not encryption: anyone who can read the manifest can decode them.
  • Spring Boot: names are mapped with relaxed binding (SPRING_DATASOURCE_URL → spring.datasource.url, MY_LIST_0_NAME → my.list[0].name). Known properties get their dashes back; other multi-word names are marked as guesses in a mapping table where you can override each one.

Common uses

  • Reading API responsesPaste a body from your browser's network tab, curl or a log line, then use the tree to find the field you need and copy its path for your code.
  • Fixing a broken config fileValidate package.json, a CloudFormation template or an IAM policy and jump straight to the line and column, with a hint for the usual causes.
  • Reviewing a changeCompare yesterday's and today's response or two environments' configs. Key order is ignored and inserted array items are matched, so only real differences show.
  • Getting data into a spreadsheetConvert an array of objects to CSV for Excel or Google Sheets, or turn an exported CSV back into JSON for a fixture.
  • Typing an API clientPaste a few responses into Generate to get TypeScript interfaces or Java DTOs with the right optional and nullable fields.
  • Shipping configurationTurn a project's .env into a Kubernetes ConfigMap and Secret, a Compose file or an ECS task definition without retyping a value.
  • Shrinking payloadsMinify fixtures, environment variables or messages with a size limit, and check the byte count in the status bar or on the Stats tab.

Features

  • Editor: syntax colours, line numbers, current-line and error-line highlights, auto-indent on Enter, Tab to indent, undo/redo history, find and replace (match case, regular expressions with $1 groups), upload, drag and drop, download.
  • Validation: live as you type, with the line, column and a plain-language explanation (trailing commas, single quotes, comments, unquoted keys, NaN, leading zeros, invisible characters, mismatched brackets, JSON Lines). Warnings for duplicate keys and for integers above 253.
  • Format and minify keep numbers and strings exactly as written (1.10 stays 1.10, large IDs keep every digit) and use 2 spaces, 4 spaces or tabs.
  • Tree: expand and collapse, expand all / collapse all, item and property counts, search over keys and values, copy a value or its JSONPath, keyboard navigation with the arrow keys. Large arrays are shown 200 items at a time.
  • Compare: added, removed and changed values with their paths, type changes, a filterable list, an annotated side-by-side document, and a copyable report or JSON Patch.
  • Escape: turn any text into a JSON string literal (optionally \uXXXX for non-ASCII) or unescape one; stringified JSON can be opened in the editor.
  • Convert, Generate, Environment: see the sections above. All three have samples, settings, diagnostics with line links, copy, download, find and replace, undo and redo, and a phone layout that switches between source and output.
  • Recent documents (opt-in in Settings): reopen the last 12 documents from any workspace; anything that looks like a password, token or key is never stored.
  • JSONPath and Stats: Goessner-style queries with wildcards, recursive descent, slices, unions and filters; counts of properties, objects, arrays and values, maximum depth, sizes and the most common keys.
  • Related tools: JSON Diff (array matching by id, ignored keys), the Kubernetes YAML generator and the Dockerfile and Compose validator.

Keyboard shortcuts

On a Mac, use ⌘ instead of Ctrl. Press ? outside a text box, or the keyboard button in the workspace, to see the full list.

  • Ctrl+Enter format (or compare, convert or generate in those tools) · Ctrl+Shift+Enter minify · Alt+Shift+S sort keys · Alt+Shift+V validate
  • Ctrl+F find · Ctrl+H replace · Ctrl+Z undo · Ctrl+Shift+Z redo
  • Ctrl+O open a file · Ctrl+S download · Alt+1…4 Editor, Convert, Generate, Environment · Alt+Shift+1…5 Editor tools · Alt+R recent · Alt+H help · Alt+T code/tree · Alt+M maximize
  • In the editor, Tab indents. Press Esc first to move focus out with Tab instead.

JSON is stricter than JavaScript

Much of what people paste as "JSON" is really a JavaScript object literal or JSON5, which allow things that standard JSON does not. A strict parser, including this one, rejects all of these:

  • Trailing commas after the last item: [1, 2, 3,].
  • Single-quoted strings or unquoted keys: {'name': 'api'}, {name: "api"}.
  • Comments, either // line or /* block */. VS Code's settings.json and tsconfig.json accept them because they are read as "JSON with comments", but a standard parser does not.
  • NaN, Infinity, undefined, hexadecimal numbers like 0x1F, and numbers with leading zeros or a leading +.
  • Raw line breaks or tabs inside a string. They must be written as \n and \t.

If your data must allow comments, keep the source in a format that supports them (YAML, JSON5 or JSONC) and convert to plain JSON before sending it to an API.

Troubleshooting

"Trailing comma: the last property in an object cannot be followed by a comma."
Delete the comma the error points at. It usually appears after removing the last line of an object or array.
"Missing comma: expected ',' or '}' after a property value."
Two items are not separated by a comma, often because a line was added in the middle of an object. Add a comma at the end of the line before the reported position.
"Property names must be in double quotes" / "Strings must use double quotes, not single quotes."
You pasted a JavaScript object rather than JSON. Put every key and text value in straight double quotes.
"Unexpected '{' after the end of the JSON value."
The input holds more than one JSON value, for example JSON Lines (one object per line) from a log file. Wrap the objects in [ … ] with commas between them, or format one line at a time.
"Invisible character U+00A0 (no-break space) …" or "Curly quote … found"
Text copied from a web page, chat app or word processor brought in look-alike characters. Delete them and type plain spaces and straight quotes.
"Unexpected character '<' at the start."
You pasted an HTML page, often an error page returned instead of the API response. Check the request's status code.
The file won't open
JSON Studio opens text files (.json, .txt, .geojson, .jsonl, and .csv, .yaml, .xml or .env, which open in Convert) up to 100 MB. Binary files such as images or ZIP archives are refused with a message.

Is my data safe?

Yes. Parsing, formatting, comparing and converting happen in this tab with JavaScript, and large documents are processed in a background worker loaded from this site. The tool makes no network requests with your data and never writes it to the console. Your settings (theme, indentation, panel sizes, chosen formats and options) are saved in this browser; your documents are not saved unless you turn on Remember my last document or Keep recent documents in Settings, and Reset workspace or the privacy page deletes them again. Environment values that look secret are masked on screen, and copying or exporting them asks first.

Questions

Can it fix my JSON automatically?

No. It reports the first error, its position and the likely fix, but does not guess, because a "repair" such as removing a quote could silently change your data. Most errors are a one-character change once you know where to look, and the find and replace bar helps with repeated ones (for example replacing ' with ").

Does formatting change my data?

Format and Minify only change whitespace: numbers, strings, escapes and even duplicate keys are copied exactly as written. Sort keys, the tree, the converters and the comparison work on the parsed value, so very large integers lose precision there and duplicate keys keep only the last value; JSON Studio warns you when your document has either.

How large a file can it handle?

Files up to 100 MB can be opened; in practice it depends on your device's memory. Documents over 1 MB are validated and formatted in a background worker so the page stays responsive, syntax colours are switched off above about 200 KB, and the tree shows big arrays 200 items at a time. The 5 MB sample is a quick way to try it.

Which JSONPath syntax is supported?

The common Goessner syntax: $, .name, ['name'], [0], [-1], [*], ..name, slices [0:5:2], unions [0,2] and filters such as [?(@.price < 10 && @.tags)] with == != < <= > >= =~. Filters are evaluated by a small built-in parser, never with eval.

Where did JSON ⇄ CSV, JSON to Types, YAML ⇄ JSON and the .env converter go?

They are now workspaces of JSON Studio, with more formats and options: CSV and YAML conversion are in Convert, type generation is Generate and the .env converter is Environment. Old links and bookmarks open the right workspace.

Will a conversion ever change my data without telling me?

No. Values are only re-typed when the meaning is unambiguous, nothing is dropped silently, and every change a format forces (comments removed, null written as an empty cell, nested keys flattened, a key renamed for XML…) is listed under Diagnostics with its line when there is one.

Is a Kubernetes Secret encrypted?

No. The values in data are base64, which anyone can decode. Protect Secrets with RBAC and encryption at rest, or keep the values in an external secret manager and reference them.

Which indentation should I use?

Two spaces is the most common choice for JSON in web projects and is what JSON.stringify(value, null, 2) and npm produce. Match whatever your project's existing files use.

Privacy and browser support

Privacy and processing

Everything you type, paste or open is processed by JavaScript in this browser tab. The tool itself makes no network requests, so your input is never sent to DevToolbox or to anyone else.

Settings and saved work stay in this browser only. The privacy policy lists everything the site stores and lets you delete it.

Browser support

Works in current versions of Chrome, Edge, Firefox and Safari, on desktop and on phones.

After your first visit the site can keep an offline copy, so this page also works without a connection.