Pro Every tool, icon and stickerAll of Pro for $7.99/month

  • All 90 tools
  • Every icon style
  • Icon & sticker pack ZIPs
Go Pro
HubToolify
Text Tools

JSON Formatter & Validator Pro

Make unreadable JSON readable, find out exactly where it is broken, and get it back out in the shape you need.

Free preview · Pro required to export. Format, minify and inspect up to 3,000 characters of JSON free. Pro removes this limit and adds downloads.

Loading…

What is JSON Formatter?

HubToolify's JSON Formatter returns pasted JSON beautified with 2-space, 4-space or tab indentation, minified to one line, or turned into a filterable table of dotted paths, TypeScript interfaces, or CSV when the document is an array of objects. It is aimed at developers reading API responses, debugging logs and writing types for an endpoint. Invalid input is reported with the line and column of the fault and a caret under the character. A Repair button fixes the usual causes of broken pasted JSON: trailing commas, single-quoted strings, unquoted keys and // or /* */ comments. Keys can be sorted alphabetically, and counts of keys, nodes, depth and size are shown. Parsing and formatting run in the browser, so tokens or customer data in the JSON are not uploaded. It is a Pro tool: a free preview formats, minifies and copies up to 3,000 characters, and Pro removes the limit and adds downloads as .json, .ts, .csv or .txt.

Why use this tool?

  • An API response on one line is unreadable; indented, the structure is obvious.
  • A parser error with a character offset is not much help — seeing the invalid position highlighted is.
  • Turning a response into a CSV or a TypeScript interface saves writing either by hand.

How to use JSON Formatter

  1. Paste your JSON.
  2. Beautify to read it, or minify to ship it.
  3. If it is invalid, the error points at the position; the repair pass fixes the common causes.
  4. Export as paths, CSV or TypeScript interfaces if you need them.

Features

  • Beautify with configurable indentation, and minify
  • Validation with the failing position identified
  • Repair for trailing commas, single quotes, unquoted keys and comments, with NaN, Infinity and undefined turned into null
  • Export to dotted paths, CSV or TypeScript interfaces

Frequently asked questions

Is my JSON sent to a server?

No. Parsing, formatting and validation all happen in your browser, which matters given how often JSON being debugged contains tokens or customer data.

Why is my JSON invalid when it looks fine?

Usually a trailing comma, single quotes instead of double, or an unquoted key. All three are legal in JavaScript and illegal in JSON.

Can I try this Pro tool without an account?

Yes. Format, minify and inspect up to 3,000 characters of JSON free. Pro removes this limit and adds downloads. A guest can open the preview 5 times; after that a free account keeps it. Your input is processed in your browser and is not uploaded.

Will upgrading keep my work?

Checkout and login open in a separate tab. Keep the workspace open to retain inputs, settings and previews. Files stay in that tab only; keep the originals in case you close or reload it. Export access is checked with the server after payment.

Your files are processed directly in your browser and are not uploaded to HubToolify's servers.

Related guides