BriskFile

JSON formatter

Paste JSON and get it formatted, minified, or told exactly where it breaks. Errors are reported as a line and column rather than a character offset, and nothing is sent anywhere.

The JSON people paste into a formatter is usually an API response — which routinely means customer records, tokens or internal identifiers. This one parses it in your tab and works with the network off.

Formatted
{
  "name": "BriskFile",
  "tools": 30,
  "uploads": 0,
  "formats": [
    "jpeg",
    "png",
    "webp"
  ],
  "nested": {
    "works": true
  }
}

Nothing is uploaded. Parsed and re-printed by this page.

"Position 428" is not an error message

Every browser reports a JSON syntax error as a character offset into the string. That is a perfectly precise answer to a question nobody asked: the document you are debugging is almost always minified onto one line, because that is the shape JSON arrives in and the reason you reached for a formatter in the first place.

Counting to character 428 by hand is not debugging. This converts the offset into a line and column against the text as you pasted it, which is the thing you can actually act on.

The five errors that account for nearly all of them

MistakeWhy it happens
{ "a": 1, } — trailing commaJavaScript permits it, JSON does not
{ 'a': 1 } — single quotesValid JavaScript, invalid JSON
{ a: 1 } — unquoted keySame reason: this is not JavaScript
// a commentJSON has no comments at all, by design
A raw newline inside a stringMust be escaped as \n

The common thread is that JSON looks like JavaScript and is far stricter than it. Most of what a JavaScript engine forgives, a JSON parser refuses.

When JSON is valid and still will not parse

Occasionally a document is correct and fails anyway, and the cause is always something invisible. A byte order mark at the start of a file saved from a Windows editor. A non-breaking space pasted out of a web page or a Word document. Curly quotes substituted for straight ones by autocorrect.

All three are characters that look exactly like the thing they replaced and are not it. If the document looks perfect and refuses to parse at position 0 or 1, a byte order mark is the first suspect.

Sorting keys, and why it is safe

JSON objects are explicitly unordered — the specification says so — which means sorting keys alphabetically produces an equivalent document. That makes it a useful trick for comparing two API responses that differ only in the order the server happened to serialise them.

Arrays are the opposite: their order is data, and it is never touched here. If two documents differ only in array order, they genuinely differ.

Questions

How do I find the error in my JSON?

Paste it in and the line and column are reported directly. Browsers describe a syntax error as a character offset — "position 428" — which is no help at all against a minified document that is one enormous line, and that is exactly the shape of JSON people need a formatter for.

Is my JSON sent anywhere?

No. It is parsed and re-printed by JavaScript in this tab, and no request is made when you use it. That matters because the JSON people paste into formatters is routinely an API response containing customer records, tokens or internal identifiers.

What are the most common JSON syntax errors?

A trailing comma before a closing bracket, which JavaScript allows and JSON does not. Single quotes instead of double. Unquoted keys. A comment — JSON has none. And an unescaped newline or quote inside a string. Between them these account for almost every error you will meet.

Does sorting the keys change the data?

No. Object keys in JSON are unordered by specification, so sorting them alphabetically produces an equivalent document — useful for comparing two responses that differ only in key order. Array order is meaningful and is never touched.

Should I minify JSON?

For anything sent over a network, yes — the whitespace is pure overhead and typically 15–25% of the file. For anything a person edits or that lives in version control, no: formatted JSON produces readable diffs, and compression on the wire recovers most of the difference anyway.

Why does my JSON fail when it looks fine?

Usually an invisible character. A byte order mark at the start of the file, a non-breaking space pasted from a document, or smart quotes substituted by a word processor all look identical to the real thing and none of them parse.

What BriskFile will not do to you

  • Your files never leave your device

    Every conversion runs in your browser. Open DevTools, watch the Network tab, and you will see no upload — because there is not one.

  • No account, no email, no watermark

    Nothing to sign up for and nothing stamped on your images. There is no step between choosing a file and getting it back.

  • No limits at the download button

    No daily cap, no file counter, no "upgrade to download". If the tool starts a job, it finishes it.

  • Checkable, not just claimed

    Open the Network tab and convert something — nothing goes out. Or load the page, disconnect, and watch it keep working: the tool is already on your machine, and your file never leaves it.