About JSON BFF
JSON BFF — Beautify · Format · Fix — is a free, in-browser tool for developers and data people who copy-paste JSON all day. Paste whatever you have, clean or broken: it comes back validated, pretty-printed, repaired, or compressed — without installing anything and without your data leaving the page.
What is JSON?
JSON (JavaScript Object Notation) is a lightweight text format for structured data — objects, arrays, strings, numbers, booleans, and null. It is the lingua franca of web APIs, configuration files, and log output; if you touch HTTP, databases, or cloud tooling, you read and write JSON constantly. The catch is that JSON is strict: one missing comma, an unquoted key, or a trailing comma makes a document invalid, and most tools then refuse to show anything useful.
What does BFF stand for?
Three letters, three jobs. Beautify and Format are the same primary action — the Format button re-indents valid JSON at 2 spaces, 4 spaces, or tabs so nested structures can be read. Fix is the repair engine, the part of the name that matters for broken input: it turns near-JSON from APIs, logs, docs, and other languages back into real JSON.
The buttons, in plain terms
- Validate — parses your input and reports valid, or the exact line and column where a parser trips. It never changes your text.
- Format — pretty-prints valid JSON at the indent you choose (2 spaces by default). Keyboard shortcut: Ctrl/Cmd+Enter.
- Fix — runs the repair pipeline below on broken input and reports exactly what it changed, for example “removed 2 trailing commas”. If it cannot fully repair the document, it shows the closest result it reached plus the remaining error.
- Compact — strips all whitespace so the document fits one line, with the byte-size delta in the status bar.
The output pane adds Copy, Download .json, and Share — Share copies a link that opens JSON BFF with your input already prefilled, so you can hand someone your exact JSON without a file.
What the Fix engine repairs
A string-aware scanner walks your text first, so anything inside a quoted string — URLs containing //, brackets inside values, quotes inside strings — is never touched. Then these passes run in order until the document parses:
- strips a UTF-8 BOM and normalizes Windows line endings (CRLF → LF)
- removes
//and/* … */comments copied from code samples - converts single-quoted strings to double-quoted ones
- wraps unquoted object keys in double quotes (JavaScript-object style:
{ name: "x" }) - deletes trailing commas before
}or] - replaces JavaScript literals (
NaN,Infinity,-Infinity,undefined) withnull - replaces Python-style literals (
True,False,None) with their JSON equivalents - closes missing
}/]brackets and removes stray closers
Every pass is safe on already-valid input: Fix is idempotent, so running it on good JSON reports 0 changes.
Privacy
Everything runs in your browser. Your JSON is never uploaded, logged, or stored — the page keeps no history and uses no local storage. The only things that can leave your machine are ad requests to Google once ads are enabled (see the privacy policy) and, if you deliberately hit Share, the URL itself: share links encode your JSON into the address bar, so never put secrets in one.
Frequently asked questions
I get “Unexpected token ',' in JSON” — what is wrong?
Almost always a trailing comma: a comma after the last item before a } or ]. JSON forbids them (JavaScript object literals allow them, which is why pasting from code breaks). Fix removes them and tells you how many it removed.
The parser says “Unexpected end of JSON input” — what does that mean?
The document ended before all brackets were closed, usually a missing closing brace or bracket at the bottom — common with truncated logs and pager copy-pastes. Fix closes the open brackets and reports how many it added.
My data is valid in Python or JavaScript but not in JSON BFF.
You likely pasted a language object instead of serialized JSON: single quotes, unquoted keys, True/None (Python) or NaN/undefined (JavaScript). Fix handles all of these; in general, serialize first (json.dumps(obj) in Python) and you will not hit it.
Sample code copied from the docs will not validate.
Documentation examples often include comments or placeholder ellipses that are not valid JSON. Fix strips line and block comments automatically; for … placeholders, substitute real values first — no tool can invent your data.
Can I share a link to my JSON?
Yes — the Share button copies a URL containing your JSON. Opening it anywhere prefills the input and runs Format, or Fix if that fails. The JSON lives in the URL itself, so keep shares under about 50 KB and never put sensitive data in a share link.
Does JSON BFF upload my data anywhere?
No. All parsing, formatting, and repair happen inside your browser; there is no server involved at all. See the privacy policy for the full story, including how ads work once enabled.
Browser support
JSON BFF is a static page with zero dependencies. It works in any current browser — Chrome, Edge, Firefox, and Safari, on desktop and mobile — and keeps working offline once loaded. No account, no install, no extension.