# Format JSON > Free JSON and XML tools that run entirely in the browser: format, validate, view (tree, table, graph), compare, repair and convert JSON, XML, YAML, CSV and TOML, generate types for ten languages, and decode JWTs. Nothing is uploaded; there is no server step. Facts worth knowing: JSON formatting keeps numbers exactly as written (no rounding of integers above 2^53); error messages are the same in every browser and include line, column and a fix; the source is at https://github.com/bashir2004/format-json. ## JSON tools - [JSON Formatter](https://www.format-json.net/): Beautify and validate JSON - [JSON Validator](https://www.format-json.net/json-validator/): Find syntax errors with line and column - [JSON Viewer](https://www.format-json.net/json-viewer/): Browse JSON as a collapsible tree - [JSON Visualizer](https://www.format-json.net/json-visualizer/): See JSON as a graph of nodes - [JSON to Table](https://www.format-json.net/json-to-table/): View JSON arrays as a table - [JSON Prettier](https://www.format-json.net/json-prettier/): Pretty print with your indent - [JSON Repair](https://www.format-json.net/json-repair/): Fix broken JSON automatically - [JSON Diff](https://www.format-json.net/json-diff/): Compare two JSON documents - [JSON Minifier](https://www.format-json.net/json-minify/): Strip whitespace from JSON - [Sort JSON Keys](https://www.format-json.net/json-sort/): Order keys alphabetically - [JSON Schema Validator](https://www.format-json.net/json-schema-validator/): Check JSON against a schema - [JSON Schema Generator](https://www.format-json.net/json-schema-generator/): Infer a schema from sample JSON - [JSONPath Tester](https://www.format-json.net/jsonpath-tester/): Query JSON with JSONPath ## XML tools - [XML Formatter](https://www.format-json.net/xml-formatter/): Beautify and indent XML - [XML Validator](https://www.format-json.net/xml-validator/): Check XML is well-formed - [XML Minifier](https://www.format-json.net/xml-minify/): Strip whitespace and comments - [XML to JSON](https://www.format-json.net/xml-to-json/): Convert XML to JSON - [JSON to XML](https://www.format-json.net/json-to-xml/): Convert JSON to XML - [XPath Tester](https://www.format-json.net/xpath-tester/): Run XPath queries on XML ## Convert tools - [JSON to YAML](https://www.format-json.net/json-to-yaml/): Convert JSON to YAML - [YAML to JSON](https://www.format-json.net/yaml-to-json/): Convert YAML to JSON - [YAML Validator](https://www.format-json.net/yaml-validator/): Check and format YAML - [JSON to CSV](https://www.format-json.net/json-to-csv/): Export JSON arrays as CSV - [CSV to JSON](https://www.format-json.net/csv-to-json/): Turn CSV rows into JSON - [JSON to TOML](https://www.format-json.net/json-to-toml/): Convert JSON to TOML - [TOML to JSON](https://www.format-json.net/toml-to-json/): Convert TOML to JSON ## Code tools - [JSON to TypeScript](https://www.format-json.net/json-to-typescript/): Interfaces from JSON - [JSON to Zod](https://www.format-json.net/json-to-zod/): Zod schemas from JSON - [JSON to Go](https://www.format-json.net/json-to-go/): Go structs with json tags - [JSON to Python](https://www.format-json.net/json-to-python/): Dataclasses, Pydantic or TypedDict - [JSON to C#](https://www.format-json.net/json-to-csharp/): C# classes from JSON - [JSON to Java](https://www.format-json.net/json-to-java/): Java records or POJOs - [JSON to Kotlin](https://www.format-json.net/json-to-kotlin/): Kotlin data classes - [JSON to Swift](https://www.format-json.net/json-to-swift/): Codable structs - [JSON to Rust](https://www.format-json.net/json-to-rust/): Serde structs - [JSON to Dart](https://www.format-json.net/json-to-dart/): Dart classes with fromJson ## Encode tools - [JWT Decoder](https://www.format-json.net/json-web-token/): Decode and verify JSON Web Tokens - [JSON Escape](https://www.format-json.net/json-escape/): Escape and unescape JSON strings - [Base64 to JSON](https://www.format-json.net/base64-to-json/): Decode Base64 into JSON ## JSON errors explained - [Common JSON errors and how to fix them](https://www.format-json.net/blog/common-json-errors/) - [Bad control character in string literal in JSON at position N](https://www.format-json.net/errors/bad-control-character-in-string-literal/): JSON.parse reports Bad control character in string literal when a string holds a raw line break, tab or other control character that should have been escaped. - [Comments are not permitted in JSON. (521)](https://www.format-json.net/errors/comments-are-not-permitted-in-json/): VS Code is validating the file as standard JSON, which has no comment syntax, so every // or /* */ comment is an error. - [Content is not allowed in prolog](https://www.format-json.net/errors/content-is-not-allowed-in-prolog/): The Java XML parser found characters before the root element that are neither markup nor whitespace. - [Expected double-quoted property name in JSON at position N](https://www.format-json.net/errors/expected-double-quoted-property-name/): Expected double-quoted property name in JSON appears when a comma inside an object is followed by } or anything other than another "key". - [Expected property name or '}' in JSON at position 1 (line 1 column 2)](https://www.format-json.net/errors/expected-property-name-in-json/): Expected property name or '}' in JSON means the parser found something other than a double-quoted key or a closing } right after an opening {. - [invalid character '<' looking for beginning of value](https://www.format-json.net/errors/invalid-character-looking-for-beginning-of-value/): encoding/json expected the start of a JSON value and found the character in quotes instead; < means the input is HTML or XML. - [JSON Parse error: Unrecognized token '<'](https://www.format-json.net/errors/json-parse-error-unrecognized-token/): JavaScriptCore, the engine in Safari and Bun, met a character that cannot start any JSON value; the < is the first character of an HTML page. - [JSON.parse: unexpected character at line 1 column 1 of the JSON data](https://www.format-json.net/errors/json-parse-unexpected-character/): Firefox throws JSON.parse: unexpected character at line 1 column 1 of the JSON data when the text is not JSON at all, usually an HTML page or a PHP warning. - [JSON standard does not allow such tokens](https://www.format-json.net/errors/json-standard-does-not-allow-such-tokens/): The IDE found a bare word without quotes where standard JSON only allows a string, a number, true, false or null. - [JSONDecodeError: Expecting value: line 1 column 1 (char 0)](https://www.format-json.net/errors/jsondecodeerror-expecting-value/): Python looked for a JSON value at the first character and found nothing it could use: the text is empty or starts with something that is not JSON. - ["[object Object]" is not valid JSON](https://www.format-json.net/errors/object-object-is-not-valid-json/): You get "[object Object]" is not valid JSON when you pass an object to JSON.parse(), which turns it into that text before parsing. - ["undefined" is not valid JSON](https://www.format-json.net/errors/undefined-is-not-valid-json/): "undefined" is not valid JSON means JSON.parse() received undefined, or the text "undefined" saved from it. - [Unexpected end of JSON input](https://www.format-json.net/errors/unexpected-end-of-json-input/): The parser reached the end of the text while it still expected more: a value, a closing quote, or a closing bracket. - [Unexpected non-whitespace character after JSON at position N](https://www.format-json.net/errors/unexpected-non-whitespace-character-after-json/): JSON.parse throws Unexpected non-whitespace character after JSON when it finishes one complete value and then finds more text, where only whitespace may follow. - [Unexpected token '<', "