How to Use Private JSON Formatter Step by Step
Reviewed by the OnlineFree.app team · Updated
Key points
- Private JSON Formatter formats and validates JSON, YAML and SQL entirely in the browser tab, with no uploads or storage.
- Inputs are capped at 2 MB; the tool stops and warns instead of silently truncating a large paste.
- Choose 2 spaces, 4 spaces or Tab; the indentation setting only affects pretty-printed output.
- JSON validation uses the browser's native parser, so error line and column numbers match what your runtime reports.
- YAML and SQL checks are lightweight structural checks, not full specification or dialect validation.
What is Private JSON Formatter?
Private JSON Formatter is a free browser tool that pretty-prints, minifies and syntax-checks JSON, YAML and SQL without sending your code anywhere. The text you paste is read into the tab's memory, parsed locally, and never uploaded, stored or transmitted in a network request.
We built it after watching too many people paste a config fragment containing a live token or a database connection string into a cloud formatter, just to get it indented. The formatting step is trivial; handing a credential to a third-party server is not. So the whole pipeline here runs client-side: no account, no history list, no share links, nothing written to localStorage.
The tool covers five modes in one screen: JSON beautify and validate, JSON minify, YAML beautify and validate, YAML to JSON conversion, and SQL pretty print. Input is capped at 2 MB of text, and you can choose 2 spaces, 4 spaces or a tab for indentation. You can open it at Private JSON Formatter and start pasting immediately.
Format a JSON snippet in four steps
Start with the smallest snippet that still shows the problem, not your entire 900-line config. Paste it into the textarea at the top of the page. Leave the Format dropdown on JSON beautify, leave Indent on 2 spaces, and press Format. The result appears in the card below with line numbers and a horizontal scrollbar, so long values stay on one line instead of wrapping and confusing you.
As a concrete example, pasting {"name":"demo","token":"***","retries":3} with 2-space indentation gives you a five-line block with three keys, and the status strip confirms 5 lines, 3 top-level keys and a character count. Those three numbers are the quickest way to notice that a paste was cut off mid-file.
Step four is getting the text out. The copy button puts the formatted code on your clipboard; if the browser blocks clipboard access, the tool falls back to selecting the whole block so you can copy manually. Alternatively, download it as a .json, .yaml or .sql file generated locally as a Blob — no round trip to a server is involved in either path.
For minification, switch the Format dropdown to JSON minify. Indentation then has no visible effect on the input side; the output collapses to a single line, which is what you want when embedding a config blob inside an environment variable or a CI secret.
How do you read a JSON validation error?
The validation panel reports the line number, the column and the parser's own message, and clicking an error scrolls the input to that line. JSON is checked with the browser's native parser, so the message you see is the same one your runtime would throw — the behaviour described in RFC 8259.
Most failures come from four habits: a trailing comma after the last item, single quotes around keys or strings, unquoted keys, and // comments pasted in from a JavaScript file or a JSONC config. Smart quotes are the sneakiest one — text copied out of a chat app or a document often carries curly quotes that look identical at a glance and are rejected instantly.
Read the position with a small margin for error. Messages like "Unexpected token }" usually point at the character after the real mistake, so glance one token back. When the file is valid you get a green syntax-valid state plus the line count, character count and top-level key count, which doubles as a sanity check that the document you pasted is the one you meant to paste.
Converting YAML to JSON and pretty-printing SQL
The YAML to JSON mode is the one we reach for most often internally: take a Kubernetes manifest or a CI job fragment, convert it to a JSON fixture, and drop it straight into a test. In this mode the indent setting applies to the JSON output rather than the input, so choosing 4 spaces gives you a readable fixture you can commit.
Be aware of the difference in rigour between modes. JSON validation is authoritative because it uses the platform parser. YAML and SQL checks are lighter structural checks — they catch unbalanced brackets, broken quoting and obviously malformed indentation, but they are not a full implementation of the YAML specification, and unusual features such as anchors, multi-document streams or custom tags may not behave the way your production parser does.
SQL pretty print reformats only. It does not understand dialects, so it will not warn you about a MySQL-ism in a PostgreSQL query, and a clean result here does not mean the statement will run. Use it to make a long WHERE clause readable before pasting it into a ticket, then run it against a real database to confirm.
What Private JSON Formatter does not do
There is no history, no shareable link and no account — deliberately. A share link would mean your config lives on a server, which contradicts the point of the tool. The trade-off is that a refresh loses your paste, so copy or download the result before you navigate away. The 2 MB input cap is a hard stop: past it, the tool says so and stops rather than silently truncating.
It also does not validate against a JSON Schema, does not handle CSV or XML, and does not offer syntax highlighting themes or multi-file tabs. If you need schema validation, run it locally in your own toolchain after checking syntax here. If you need placeholder IDs for a fixture, the UUID Bulk Generator also runs entirely in the browser.
Two honest cautions. First, treat the clipboard as the weak link: once you copy a formatted snippet containing a live secret, it may sit in your OS clipboard history, so clear it or copy something harmless over it. Second, verify anything important — re-check formatted connection strings and tokens against your source of truth before deploying. OnlineFree.app lists the other browser-only utilities we maintain the same way, as of 2026 all free and without sign-up.
Frequently asked questions
Is Private JSON Formatter free to use?
Yes. Private JSON Formatter is free, needs no account and has no paid tier or usage quota beyond the 2 MB input cap. There is nothing to install: open the page, paste, format. Because parsing runs in your own browser, there is no per-request cost to meter, which is why we can keep it open to everyone.
Can I safely paste tokens and connection strings into Private JSON Formatter?
The pasted text is parsed in browser memory and is never uploaded, written to localStorage or sent in a network request. That said, the clipboard is the weak link: after copying a result containing a live secret, clear your clipboard, and avoid pasting production credentials at all unless you genuinely need to format them.
What is the largest JSON file Private JSON Formatter accepts?
The textarea accepts up to 2 MB of text. Beyond that the tool stops parsing and displays a message instead of silently truncating, so a large paste fails loudly rather than producing misleading output. For multi-megabyte logs, split the file first or use a command-line formatter such as jq.
Does Private JSON Formatter validate against a JSON Schema?
No. It checks syntax only — whether the document parses under the browser's native JSON parser, consistent with RFC 8259. Rules such as required fields, types or enum values belong to a JSON Schema validator. If you need both, fix the syntax here, then run your schema validator locally before committing the file.
Why does Private JSON Formatter reject JSON that another tool accepted?
Usually because the input is JSONC or JavaScript rather than strict JSON. Trailing commas, single quotes, unquoted keys, // comments and smart quotes copied from chat apps are all rejected by the native parser. Remove them and re-format; the reported line and column tell you where the parser gave up.