Skip to content

JSON formatter, validator and viewer

Format, validate and explore JSON right in your browser. Your data never leaves your device.

Input

Paste JSON or open a .json file.

Output

Nothing to show yet

Paste JSON or open a file. Formatted output appears here.

How to format and validate JSON

  1. Paste your JSON into the Input editor, or select Open file to load a .json file. Sample fills in an example.
  2. The output updates as you type. If the JSON isn’t valid, you see the line and column of the first problem, and that line is highlighted.
  3. Choose a mode: Format pretty-prints with 2 spaces, 4 spaces or tabs; Minify removes all whitespace; Tree lets you browse the structure and copy the path of any value.
  4. Copy the result, or download it as a .json file. Your last-used mode and options are remembered on this device; your JSON is not.

Options

Sort keys
Orders the properties of every object alphabetically (by character code). Arrays keep their order.
Allow comments
Accepts // line and /* block */ comments and trailing commas (JSONC, used by many configuration files). The output is always standard JSON, so comments are removed.
Tree view
Use the arrow keys to move, → and ← to open and close, and Copy path for a path like $.items[0].sku.

Exact values, including large numbers

The formatter rebuilds your JSON from its structure but copies every number and string exactly as you wrote it. That matters for large IDs: JavaScript can only represent whole numbers up to 9,007,199,254,740,991 exactly, so many tools silently change a value like 123456789012345678901. OfflineBench keeps every digit and shows a note with how many such numbers there are and the path of the first one, so you know to handle them as strings or BigInt in your code. Decimal numbers with many digits are copied exactly too, but aren’t flagged.

Formats and limits

Input
JSON text, or JSON with comments when Allow comments is on. Files: .json or plain text.
Size
Up to 50 MB. Inputs over 1 MB are processed in a background thread, so the page stays responsive; above 5 MB it may be slow.
Output
Standard JSON (RFC 8259), downloaded as formatted.json or minified.json, or named after the file you opened.

Troubleshooting

  • “Trailing comma.” Standard JSON doesn’t allow a comma after the last item. Remove it, or turn on Allow comments.
  • “Strings and property names need double quotes.” JSON keys and strings use "double quotes", not single quotes or no quotes.
  • “Unexpected text after the end of the JSON.” The input contains more than one value, for example several objects one after another (JSON Lines). Wrap them in [ ] and separate them with commas.
  • The minified output isn’t shown. Minified JSON over 1 MB is one very long line. Copy or download it instead.

How your data stays private

Everything happens in your browser, on your device. Your files and text are never uploaded, never stored, and never put in the address bar.

  • The site’s security policy (connect-src 'self') tells your browser to block any attempt by the page to send data to another server.
  • Only your preferences, such as the theme and a tool’s last-used options, are saved in your browser’s local storage. Never your content.
  • To check it yourself, open your browser’s developer tools, select the Network tab, and use the tool: no request carries your data.

There is no account, no sign-up and no watermark. After your first visit, pages open without a connection; a tool’s larger parts, such as the PDF and image engines, are saved the first time you use it, so it works offline from then on.

Frequently asked questions

Is my JSON sent anywhere?

No. Formatting and validation run in your browser, on your device. Nothing you paste or open is uploaded, stored or put in the URL, and the site’s security policy blocks the page from sending data to other servers.

How do I validate JSON?

Paste it or open a .json file. If it isn’t valid, you see the exact line and column of the first problem, and the line is highlighted in the editor. Turn on “Allow comments” to accept JSON with comments and trailing commas (JSONC), as used in many configuration files.

Can I validate JSON against a JSON Schema?

No. This tool checks that the text is valid JSON syntax; it doesn’t validate against a JSON Schema.

How large a file can it handle?

Up to 50 MB. Inputs over 1 MB are processed in a background thread so the page stays responsive, and above 5 MB you see a note that it may be slow. Very long minified output is not shown in full, but you can copy or download it.

Why does it warn about large numbers?

JavaScript stores numbers with limited precision, so integers larger than 9,007,199,254,740,991 can silently change in many tools. OfflineBench keeps the original digits in the output and shows a note with how many such numbers there are and the path of the first one, so you know to treat them carefully in your code.