Modern Niche World MNW

JSON Formatter and Validator

Paste JSON to check it against the standard and lay it out cleanly. Errors show their line and column, and numbers stay exactly as typed.

Paste or type JSON, or open a .json file, up to 10 MB. It stays on this page: nothing is sent anywhere or saved.

Paste JSON above to check and format it.

Everything happens on this page, on your device: your JSON is never sent anywhere or saved.

Check JSON and make it readable

JSON is the text format most web services and config files use. One missing comma or stray quote makes a whole file unreadable to a program, and a long minified line is hard for a person to read. This tool checks the text against the JSON standard (RFC 8259) and lays it out cleanly, or squeezes it onto one line.

How to use it

  1. Paste or type your JSON, or open a .json file of up to 10 MB.
  2. Read the line under the options: a summary of what the JSON holds, or the first error, with its line and column.
  3. Choose a layout: 2 or 4 spaces, tabs, or minified onto one line. Tick Sort keys to put every object’s keys in order.
  4. Copy the result, or download it as a .json file.

Reading an error

The message names the line and column, says what should have come next, and shows the line with a caret (^) under the spot. “Show the error in the text” selects it in your text. The usual causes:

  • a comma after the last item, as in [1, 2,];
  • a missing comma between two items;
  • single quotes, or curly quotes from a word processor, instead of straight double quotes;
  • comments, which JSON doesn’t allow;
  • True, None or NaN instead of true, null or a number.

Exact numbers and text

Many formatters read JSON with JavaScript’s JSON.parse and write it back out. That rounds whole numbers beyond about 9 quadrillion, so 12345678901234567890 becomes 12345678901234567000, and it rewrites escapes such as é. This tool keeps every number and string exactly as you typed it, and warns you when JavaScript code would round a number. It also points out keys repeated in the same object, which many programs quietly drop.

Good to know

  • It doesn’t repair JSON for you, and it doesn’t check data against a JSON Schema.
  • Sort keys orders keys by character code, so capitals come before lowercase letters. Arrays keep their order.
  • Sizes are counted in bytes, as the text would be saved in a UTF-8 file.
  • Everything runs on this page, on your device. Tokens, keys and customer data you paste aren’t sent anywhere or saved.
  • Need a spreadsheet? JSON to CSV turns an array of objects into a table, and CSV to JSON goes the other way.

Frequently asked questions

Why do big numbers stay the same here but change in other tools?
Many tools read JSON with JavaScript, which holds whole numbers exactly only up to 9,007,199,254,740,991. Past that they’re rounded, so 12345678901234567890 comes back as 12345678901234567000. This tool reads the text itself and writes every number exactly as you typed it, and it tells you when JavaScript code would round one.
Can it fix my JSON for me?
No. It finds the first error and tells you where it is, what was expected and what it found, so you can fix it yourself and see the next one. Guessing a repair could change your data without you noticing.
Does it accept comments or trailing commas?
No. It checks strict JSON, as RFC 8259 defines it, because that’s what most programs accept. Comments, trailing commas and single quotes belong to looser formats such as JSON5 and JSONC; the error message points to each one so you can remove it.
Is my JSON sent anywhere?
No. It’s checked and formatted by this page’s own code, on your device, and nothing is sent, logged or saved. That makes it safe for API responses, config files and anything with tokens or keys in it.