JSON formatter and validator
Paste JSON to make it readable, shrink it, or check that it is valid. If it is wrong you are told the line, the column and the reason. Fold it into levels, open files of tens of megabytes without freezing the tab. It runs in your browser and your JSON is not sent anywhere.
This tool needs JavaScript. If you still see this after a few seconds, JavaScript is switched off in your browser or the page did not load completely: turn JavaScript on or reload the page.
A big file, kept out of the box:
Path:
How to use it
- Paste your JSON in the left box, press "Open file", or drop a file on it. The result appears on the right at once.
- Choose the indent (2 spaces, 4 spaces, tab) or "Minify" for a single line. Choose "Sort keys" to compare it with other JSON.
- Press the arrow before a { or [ to fold it, press a line to see its path (like
$.items[0].id), then "Copy" or "Download" the result.
Frequently asked questions
Where is my JSON wrong, and why does it show an error?
The tool gives the line, the column and the reason. The usual causes are a , before a closing } or ], ' instead of ", keys without quotes, a // comment, a missing , between items, or values such as undefined and NaN, which JSON does not have. If the JSON was copied from code, switch on "Repair common mistakes": it fixes what it can and tells you what it changed.
Can it open a file of tens of megabytes without freezing?
Up to 50 MB. The checking and formatting run in a background worker of the browser, so the page does not freeze, and the result box draws only the lines in sight, so it scrolls smoothly even with a million lines. If a job takes more than a minute it is stopped and you are asked to try something smaller.
Why does it not change big numbers or key order the way JSON.parse does?
This tool does not use JSON.parse and then JSON.stringify, because those cut numbers longer than 15 to 17 digits (like 12345678901234567890), turn 1.10 into 1.1 and move numeric keys ("2", "10") to the front. Here numbers and key order stay exactly as written, unless you choose "Sort keys" yourself.
Good to know
- It accepts standard JSON (RFC 8259). Values that are not JSON, such as
NaNorundefined, are reported as errors. - If an object has a repeated key, you get a warning and every copy stays in the result.
- It copes with nesting up to 2,000 levels deep.
- "Show \uXXXX as characters" turns
\u0e01intoกinside strings. The meaning of the JSON does not change.
Your data stays on your device
Everything runs in your browser. What you type, paste or open is not sent to freesabai's servers or anyone else's, and is not kept in the browser: close the page and it is gone. The site only counts how many times this page was opened and how many times someone copied or saved a result (never what was pasted or the result, and you can switch the counting off in the footer; see the privacy policy).
Report a problem or suggest an idea
Found a bug, or want this tool to do more? Tell us on the feedback page. No sign-up.
Other developer tools
JSON and data
- JSON formatter and validatorFormat, minify and validate JSON, find the error, fold it into levels
- JSON to YAML converterTurn JSON into YAML, key order kept, nothing leaves your device
- YAML to JSON converterTurn YAML into JSON, and find the line where the YAML is wrong
- JSON to CSV converterTurn a JSON list into CSV for Excel, Thai text included
- CSV to JSON converterTurn CSV into JSON, any separator, quoted fields handled
- CSV viewerOpen a CSV file as a table, sort a column, search, no spreadsheet needed
- Text and JSON diff checkerSee what changed between two texts, side by side or unified, with word highlights
Encoding, hashes and tokens
- Base64 encode and decodeBase64 for text (Thai and UTF-8), URL-safe, and files to and from Base64
- Hash generator: MD5, SHA-256, HMACHash text or files with MD5, SHA-1, SHA-256, SHA-512 and HMAC, and verify a checksum
- JWT decoderRead the header and payload of a JWT, with times you can read (decode only, no signature check)
- URL encode and decodePercent-encode or decode a link, Thai in URLs included, and take a URL apart
- HTML entities encode and decodeTurn special characters into & < > " and back
Generators
Time, numbers and colour
- Unix timestamp converterConvert a timestamp (seconds or milliseconds) to a date and back, with time zones
- Cron expression explainerRead a cron expression in plain words and see its next 5 runs
- Number base converterConvert between binary, octal, decimal and hex, and do bitwise AND, OR, XOR and shifts
- Colour converter: HEX, RGB, HSLConvert a colour between HEX, RGB and HSL, or pick one by eye
- Colour contrast checker (WCAG)Check the contrast between text and background colours for WCAG AA and AAA
Text and code
- Regex testerTry a regular expression, see matches and groups, protected from regexes that never finish
- Markdown previewType Markdown and see it rendered at once, safely, with embedded scripts never run
- Character, word and line counterCount characters, words (Thai too), lines, sentences, paragraphs and reading time