JSON Formatter & Validator
Paste messy JSON and get it back neatly indented, or find the exact spot where it breaks. Your payloads, tokens and configs are processed on your device and never uploaded.
- No account needed
- Nothing uploaded
- Exact line and column errors
- Large numbers kept as written
- Runs on your device. Files are never uploaded.
- Free and unlimited. No sign-up, no watermark.
JSON formatter in three steps
No account, no email, no waiting for an upload.
- STEP 01
Paste or open your JSON
Type or paste into the box, or open a .json, .geojson or .txt file.
- STEP 02
Choose your layout
Pick 2 spaces, 4 spaces or tabs. Optionally sort the keys or escape non-ASCII characters as \u codes.
- STEP 03
Copy or download
Copy the formatted result, or download it as a .json file. If the JSON is broken, you get the line and column of the problem instead.
What JSON formatter does, and what it doesn't
We'd rather tell you up front than surprise you after the download.
What you get
- Strict, readable errorsThe parser follows RFC 8259, so you get messages like 'Strings must use double quotes' with the line and column, not a vague 'unexpected token'.
- Numbers stay exactly as writtenAn ID like 12345678901234567890 is not rounded, and 1.0 stays 1.0. Many formatters silently change these.
- Key sortingSort keys A to Z, Z to A, or A to Z ignoring case, at every level, so two files line up when you compare them.
- Duplicate keys are reportedIf a key appears twice in the same object, the last value wins, and you see which keys were repeated.
- Private by designParsing and printing happen in your browser, so private API responses never touch a server.
Good to know
- JSON only, not JSON5Comments, trailing commas and single-quoted strings are errors, because they are not valid JSON. Remove them, then format.
- Only valid JSON gets formattedIf the input is broken, you get an error report rather than a guess. To see the full document facts, try the JSON validator.
- Very large filesFiles of many megabytes depend on your device's memory. For a quick look at structure instead, use the JSON tree viewer.
Your data never leave your device
The tool runs inside your browser instead of on our servers, so there is nothing to upload, store or delete afterwards.
Typical online tool upload
Your file travels over the internet, sits on someone else's computer for a while, and you wait for the upload and the download.
Mediaextractr no upload
The tool loads into your browser once, then works on your file locally. Nothing is sent, so nothing can leak.
When people use JSON formatter
Read an API response
Turn a one-line response from curl or your network tab into something you can scan.
Tidy a config before commit
Keep package.json-style files consistently indented so diffs stay small.
Prepare two files to compare
Sort keys in both, then check them with JSON compare or JSON diff.
Handle sensitive payloads
Format a response containing tokens or customer data without pasting it into a website that uploads it.
Mediaextractr vs typical upload tools
| MediaextractrPrivate | Typical upload tools | |
|---|---|---|
| Your file is uploaded | Never | Yes |
| Sign-up needed | No | Often, after a few files |
| Daily file limit | None | Often 1–2 free files |
| Watermark | Never | Sometimes |
| Wait for upload & download | No | Yes |
| Speed on very large files | Depends on your device | Depends on their servers |
What formatting actually changes
Formatting only changes whitespace. Keys, values and array order stay as they were, unless you choose to sort the keys. That means a formatted file is equal to the original in every parser.
Indent is a team choice: 2 spaces is common in JavaScript projects, 4 spaces in many Python and Java repos, and tabs let each reader pick their own width.
Fix the usual JSON mistakes
When the tool stops with an error, the line and column point at the first thing the parser could not accept. The same few mistakes cause most failures:
- A trailing comma after the last item.
- Single quotes around keys or strings. JSON needs double quotes.
- A comment, which JSON does not allow.
- A missing comma between two items, or an unquoted key.
- Text pasted after the closing bracket, such as a second object. For several records on separate lines, see JSON Lines to JSON.
Privacy and large payloads
Production responses often hold tokens, emails or order details. Because nothing is uploaded, you can format them without sending them to a third party. Open your browser's network tab while you use the page if you want to confirm that no request carries your data.
Questions, answered
Is this JSON formatter really free?
Yes. There is no sign-up, no daily limit and nothing to install.
Could my API keys end up on someone else's server?
No. Formatting is plain JavaScript running in this tab. There is no request carrying your text, so tokens and customer fields in a payload stay on your machine.
Why does it say my JSON is invalid?
The message names the line and column of the first problem, such as a trailing comma, single quotes or a missing bracket. Fix that spot and run it again.
Will it change my big numbers?
No. Numbers are printed exactly as you wrote them, so very long IDs are not rounded to something like 12345678901234567000.
Can I sort the keys alphabetically?
Yes. Choose A to Z, Z to A, or A to Z ignoring case. Sorting applies to every nested object.
Can I format JSON on my phone?
Yes. Current Safari, Chrome, Edge and Firefox on iOS and Android handle it, though pasting a very large file on a small device can feel slow.