JSON Formatter and Validator
Pretty-print messy or minified JSON and find errors with line and column details.
Make JSON readable
API responses, logs and config files often arrive as JSON squeezed onto one line. The JSON Formatter re-indents the data so its hierarchy is obvious, letting you inspect nested objects and arrays in seconds.
Validation and error finding
When you paste invalid JSON, the tool reports exactly which line and column the problem is on. Missing commas, trailing commas, single quotes and unclosed brackets are found quickly.
Indentation options
Choose 2 spaces, 4 spaces or tabs. Parsing happens entirely in your browser, so you can safely format API responses containing tokens, customer data or other secrets.
The most common syntax errors
Most invalid JSON comes down to a few causes: a trailing comma after the last item, single quotes in place of double quotes, keys without quotes, or comments copied from a configuration file. When an error points at a line, look at the end of the line before it too.
Valid does not mean correct
A formatter confirms that the text can be parsed. It cannot tell you that a field is missing or holds the wrong type for your application. Inspect one complete record, and note which values may be null.
Large numbers and dates
Very large integers can lose precision in JavaScript-based tools and applications, so identifiers of 16 digits or more are safer as strings. JSON has no date type, which means dates are normally carried as strings, preferably in ISO 8601 format.
How to use JSON Formatter and Validator
- Paste your JSON into the input.
- Choose the indentation.
- See the formatted JSON or the error message.
- Copy the result or download it as a file.
Why use this tool?
Handles the JSON tidying developers need every day without sending data anywhere.
FAQ
Is my JSON sent anywhere?
No. Parsing and formatting happen in your browser; it's safe even for API responses with secrets.
Why is JSON with single quotes invalid?
The JSON standard only allows double quotes for strings and keys. Single quotes are valid in JavaScript objects but not in JSON.
How do I minify JSON?
Use the JSON Minifier to remove whitespace.
Related tools
JSON Minifier
Remove all unnecessary whitespace from JSON for smaller, faster-to-transfer data.
Open toolJSON to CSV Converter
Convert a JSON array of objects into an Excel-friendly CSV with automatic column headers.
Open toolBase64 Encoder / Decoder
Encode text to Base64 and decode it back with full UTF-8 support, including URL-safe Base64.
Open toolURL Encoder / Decoder
Encode or decode URLs and query parameters with percent-encoding.
Open tool