JSON Formatter & Validator
Beautify, minify and validate JSON — with the exact line and column of any error.
- Runs in your browser — nothing uploaded
- Instant, no waiting in a queue
- Free, no watermark, no daily limits
Paste JSON and it is validated as you type. Invalid JSON shows the line and column of the problem with a pointer to it; valid JSON can be pretty-printed with 2 spaces, 4 spaces or tabs, minified to one line, sorted alphabetically by key, or explored as a collapsible tree.
How to Format and Validate JSON Online
- 1
Paste your JSON
Paste JSON into the input box or open a .json file. It is validated instantly.
- 2
Fix any errors
If it is invalid, the error message shows the exact line and column.
- 3
Format, minify or sort
Click Format, Minify or Sort keys, then copy or save the result.
Why use ToolzBank JSON Formatter & Validator?
- Live validation with line and column of errors
- Beautify with 2 spaces, 4 spaces or tabs
- Minify to a single line
- Recursively sort object keys
- Collapsible tree view
- Size, key count and depth statistics
Frequently asked questions
How do I find the error in my JSON?
What is the difference between formatting and minifying JSON?
Does sorting keys change my data?
Is my JSON sent to a server?
More free developer tools
JSON to CSV
Flatten JSON arrays into CSV/Excel
XML Formatter
Pretty-print & validate XML
JWT Decoder
Decode & verify JSON Web Tokens locally
Regex Tester
Test regular expressions live
Timestamp Converter
Unix epoch ⇄ human-readable dates
Diff Checker
Compare two texts line by line
Base64 Encoder / Decoder
Encode & decode Base64 text and files
URL Encoder / Decoder
Percent-encode, decode & parse URLs
HTML, CSS & JS Formatter
Beautify HTML, CSS & JS; minify HTML & CSS
Hash Generator
MD5, SHA-1, SHA-256 & SHA-512 for text or files
Number Base Converter
Binary, octal, decimal & hex conversion
PX to REM Converter
Convert px ⇄ rem, or a whole stylesheet
Color Converter
HEX, RGB, HSL, HSV & CMYK with contrast check
YAML to JSON Converter
Convert YAML ⇄ JSON with error lines
SQL Formatter
Beautify SQL for MySQL, PostgreSQL & more
Markdown Editor
Write visually, download a .md file
From Our Blog
How to Convert CSV or Excel to JSON for APIs and Apps
Turn a CSV or Excel sheet into clean JSON for an API, config file or database seed — with numbers, booleans and nested fields handled correctly.
How to Convert JSON to CSV or Excel (Including Nested JSON)
Turn a JSON API response into a spreadsheet — with nested objects flattened into columns like address.city and arrays handled the way you choose.
How to Beautify and Minify HTML, CSS and JavaScript Code
When to beautify code and when to minify it, what each really changes, and how to format HTML, CSS and JavaScript or shrink HTML and CSS in one click.
