How to use the json formatter
- Paste JSON into the input, drop a .json file on it, or load it from a URL.
- It formats as you type (after a short pause); press Format or Ctrl/Cmd+Enter to re-run with a different indent.
- If the status turns red, read the line and column, then press Auto-fix (Ctrl/Cmd+Alt+F) to review proposed repairs.
- Toggle the tree view with Ctrl/Cmd+Alt+T to browse nested objects and copy a value's path.
- Copy the result with Ctrl/Cmd+Alt+C or download it as a file.
Features
- Format and validate in one pass: Every edit is parsed under RFC 8259, so you never format JSON that is secretly broken.
- Lossless numbers: Values such as 12345678901234567890 or 0.10000000000000000001 are printed exactly as entered, never rounded to a 64-bit float.
- Order preserved: Keys stay in your order; sorting is an explicit opt-in.
- Secret detection: Flags likely API keys, tokens and private keys before you copy or share.
- Large files: Input over 5 MB moves to a background worker with a virtualized view.
- Offline: After the first visit the page keeps working without a network connection.
Example
Minified API response with a 64-bit ID → formatted (2 spaces)
Input
{"id":9007199254740993,"tags":["a","b"],"owner":{"name":"Ada"}}Output
{
"id": 9007199254740993,
"tags": [
"a",
"b"
],
"owner": {
"name": "Ada"
}
}JSON.parse followed by JSON.stringify would print the id as 9007199254740992, because it exceeds 2^53. This formatter works on the original text, so the last digit survives.
Keyboard shortcuts
Use Ctrl on Windows and Linux, Cmd on macOS. Press ? (outside the editor) to open the full list.
| Action | Shortcut |
|---|---|
| Format | Ctrl/Cmd + Enter |
| Minify | Ctrl/Cmd + Alt + M |
| Copy output | Ctrl/Cmd + Alt + C |
| Auto-fix | Ctrl/Cmd + Alt + F |
| Toggle tree / code view | Ctrl/Cmd + Alt + T |
| Show shortcut help | ? |
Which JSON tool do you need?
This page is the all-in-one workspace. The other pages open the same editor tuned for a single job: the validator focuses on explaining errors, the beautifier on indent and key-order styles, the viewer on navigating nested data, and the minifier on shrinking payloads.
If your JSON came from a chatbot, start with the LLM repair page; if it may contain credentials, run the secret scanner before pasting it anywhere else; and if the file is tens of megabytes, use the large file viewer, which parses in a background worker and shows a lightweight read-only preview.
What formatting changes, and what it never touches
Formatting only adds or removes whitespace between tokens: after { and [, after commas, and around colons. String contents, escape sequences such as \u00e9, number spellings such as 1.0 or 1e3, and key order are left exactly as they were.
That matters when you compare output against the original or commit it to Git: a reformat produces a whitespace-only diff, and nothing downstream sees a different value.
How this formatter compares
Most online JSON tools do the formatting well. The differences are in where your data goes and what happens with awkward input.
| Feature | This tool | Typical online formatter |
|---|---|---|
| Where JSON is processed | In your browser | Often sent to a server |
| Works offline | Yes, after first visit | Usually no |
| Secret detection and redaction | Yes | Rarely |
| 100 MB+ files | Yes, worker + virtual scrolling | Often limited to a few MB |
| Auto-fix with review | Yes, diff before apply | Sometimes, often silent |
| Fix LLM / ChatGPT output | Yes | Rarely |
| Public "recent links" of pastes | Never | Some sites have had them |
Why "never leaves your browser" matters
In November 2025, security researchers at watchTowr Labs reported that popular online code formatters had exposed tens of thousands of saved JSON and code snippets through public "recent links" pages, including passwords, cloud keys and other credentials (coverage of the research). This tool has no save-to-server feature and no recent links. Share links keep the data in the URL fragment (after the #), which browsers do not send to the server.
You can check this yourself: open DevTools, go to the Network tab and format some JSON. No request carries your data. Our security page walks through the test step by step.
JSON Formatter FAQ
Is my JSON safe here?
Yes. Parsing, formatting, fixing and secret scanning all run in your browser. Your JSON is not sent in any request, analytics event or log, and nothing is saved to our servers. You can confirm this in your browser's DevTools Network tab, as explained on our Security page.
Does it work offline?
Yes. After the page has loaded once, it is cached by your browser and keeps working with no connection. Loading JSON from a URL is the only feature that needs the network.
What is the difference between a JSON formatter and a validator?
A validator answers one question: is this valid JSON, and if not, where does it fail? A formatter also rewrites valid JSON with consistent indentation so it is readable. This tool does both on every paste.
Why did my long ID number change in another formatter?
JavaScript numbers are 64-bit floats, so integers above 9,007,199,254,740,991 cannot all be represented. Tools that use JSON.parse round them. This formatter keeps the original digits.
Does formatting JSON change the data?
No. Only whitespace between tokens changes. Values, escapes and key order are identical unless you turn on Sort keys.
What are the keyboard shortcuts?
Format is Ctrl/Cmd+Enter, Minify is Ctrl/Cmd+Alt+M, Copy output is Ctrl/Cmd+Alt+C, Auto-fix is Ctrl/Cmd+Alt+F and Ctrl/Cmd+Alt+T toggles tree and code view. Press ? to see them in the app.
Can it convert JSON to TypeScript or CSV?
Not yet. TypeScript type generation and CSV conversion are planned but not available today.
Related tools
- JSON validator – explains each error – line, column and cause for each parser message.
- JSON beautifier – indent styles and sorted keys – pretty print with the layout you want.
- JSON minifier – compact to one line – see the bytes saved.
- JSON viewer – collapsible tree – browse nested data and copy paths.
- JSON fixer – repair broken JSON automatically – the full list of auto-fixes.
- JSON secret scanner – find leaked API keys – before sharing a payload.
- Large JSON viewer – open 100 MB files – parsed in a background worker.

