Skip to content
Tejo Tools
Menu
Data toolsProcessed on your device

JSON formatter

Paste your JSON. It’s tidied up and checked as you type, on your device.

0 characters · 0 lines
Indent
Result

Your result will appear here.

0 characters · 0 lines

What it does

JSON from an API, a log or a config file often arrives on one long line, or with a mistake that’s hard to spot. This tool reads it as strict JSON and gives it back tidied up:

How to use it

  1. Paste or type JSON into “Your text”. Select “Try a sample” to see an example order record.
  2. Choose an indent, or Minify, and turn on Sort keys A–Z if you want it. The result updates as you type.
  3. Select Copy to put the result on your clipboard, or Download JSON to save it as a .json file.

Good to know

Privacy

Your JSON is processed on your device: formatting and checking run in your browser, and nothing you paste is uploaded or saved.

Frequently asked questions

What makes JSON invalid?

The usual causes are a missing comma between two values, a missing or extra bracket, a key without double quotes, a string in single quotes, or a stray character after the end. When the JSON isn't valid, the tool shows the line and column of the first character that doesn't fit, so you know where to look.

Can I use comments or trailing commas?

Not in JSON. The JSON standard (RFC 8259) has no comments, and a comma after the last item of an object or array isn't allowed. Some tools accept them as JSON5 or JSONC, but most programs reading JSON don't, so this tool reports them as errors. Remove the comment or the last comma and the JSON is valid.

Does sorting the keys change my data?

No. Sort keys A–Z only changes the order of the keys inside each object, which JSON doesn't give any meaning to. Values, arrays and the order of array items stay exactly as they were. Sorting makes two versions of a file easier to compare.

Are large numbers kept exactly?

Yes. Many JSON tools read numbers with JavaScript's number type, which rounds whole numbers above 9,007,199,254,740,991 and drops digits from long decimals. This tool keeps every number, string escape and duplicate key exactly as written; only the spaces and line breaks change.

Is my JSON sent anywhere?

No. Formatting and checking run in your browser, on your device. Nothing you paste is uploaded or saved, so the tool is safe to use with API responses and config files.