JSON Formatter
Format, validate, and beautify JSON instantly in your browser.
Use on any page (bookmarklet)
Want JSON Formatter without leaving the page you're on? Drag the button below to your bookmarks bar, then click it on any website to open JSON Formatter right there — it runs entirely in your browser.
Use responsibly: a bookmarklet runs on whatever page you click it on. Avoid sensitive sites such as online banking, payment, or healthcare pages — you run it at your own risk. Everything is processed locally and no data is sent anywhere. See our Terms.
- Show your bookmarks bar if it's hidden — Ctrl+Shift+B (⌘+Shift+B on Mac).
- Drag the button above onto the bookmarks bar.
- Open any website and click the bookmark — the JSON Formatter panel appears in the top-right corner. Use ✛ to move it between corners, or ›/‹ to tuck it against the edge and pull it back out.
- Click the bookmark again (or the ✕) to close it.
Note: a few sites with strict security policies may block bookmarklets.
Examples
Pretty-print minified JSON
Input
{"name":"RunWebTools","tags":["json","free"],"ok":true}Output
{
"name": "RunWebTools",
"tags": [
"json",
"free"
],
"ok": true
}Minify formatted JSON
Input
{
"id": 42,
"active": true
}Output
{"id":42,"active":true}Spot a syntax error
Input
{ "a": 1, }Output
Invalid JSON: trailing comma (line 1, column 11)
About this tool
This free online JSON formatter cleans up messy or minified JSON into neatly indented, readable text — a fast JSON beautifier and pretty-print tool that validates as it goes. Paste your JSON, choose an indentation style, and click Format. Everything runs in your browser with no upload, so your data never leaves your device.
How to use
- Paste your JSON into the input box (or click Sample to try it).
- Pick an indent of 2 spaces, 4 spaces, or a tab.
- Click Format to beautify and pretty-print, or Minify to collapse it to a single line.
- Copy the result with the Copy button.
Why validation matters
If your JSON has a syntax error — a trailing comma, a missing bracket, an unquoted key — the formatter points to the exact line and column so you can fix it fast. Valid JSON requires double-quoted keys and strings, no trailing commas, and no comments. For a full rundown of the rules and the errors people hit most, see our guide to JSON and common errors.
Common uses
- Make an API response readable so you can find the field you need.
- Validate a config file before deploying, catching a stray comma early.
- Minify JSON to shrink a payload for production or embedding.
- Reformat a one-line blob copied from a log into a diff-friendly shape.
Working with other formats? The same live formatting is available for YAML and XML.
Frequently asked questions
Is this JSON formatter free?
Yes — it's a completely free online JSON formatter with no sign-up and no limits. Format, pretty-print, and validate as much JSON as you like.
Is my JSON uploaded to a server?
No. This is a no-upload tool — your JSON is formatted entirely in your browser using your device's own JSON engine, so the data never leaves your computer. It's safe for private or sensitive data.
What's the difference between Format and Minify?
Format (beautify / pretty print) adds indentation and line breaks to make JSON readable. Minify removes all unnecessary whitespace to produce the smallest possible single-line output, ideal for production or APIs.
Does it validate my JSON?
Yes. The tool validates as it formats: if the JSON is invalid it shows the exact error message with the line and column so you can fix it fast.
Why does it say my JSON is invalid?
Common causes are trailing commas, single quotes instead of double quotes, unquoted keys, or comments — none of which are allowed in valid JSON. The tool points to the exact location of the problem.
Can I choose the indentation?
Yes — pick 2 spaces, 4 spaces, or tabs. Your choice is remembered in your browser for next time.
Does it work offline and on mobile?
Once the page has loaded it runs locally, so it keeps working with a flaky connection, and it's fully responsive on phones and tablets.
Learn more
What Is JSON? A Plain-English Guide (and How to Fix Common Errors)
GuideYAML Explained — and How It Compares to JSON
GuideWhat Is XML? Tags, Attributes, and How It Works
GuideThe CSV Format Explained (and How to Fix Common Problems)
ReferenceEscape Sequences Reference: \n, \t, \\ and String Escapes
Related tools