---
title: JSON Formatter & Validator: Free Online Tool | Relic
description: Free JSON formatter, validator and beautifier. Paste JSON to pretty-print or minify it, get the line and column of any error, and count the keys and items in a valid document. All client-side, nothing uploaded.
canonical: https://relic.space/tools/json-formatter
source: https://relic.space/llms.txt
---
# JSON Formatter & Validator

Pretty-print, minify and validate JSON in your browser. Instant, with the line and column of any error.

Runs entirely in your browser. Nothing you type is uploaded.

indent

Input

Output

Formatted JSON appears here…

## Format and validate JSON instantly

Paste raw JSON to **beautify** it with 2- or 4-space indentation, or **minify**it to the smallest valid form. If it won’t parse, you get the exact error so you can find the stray comma or missing quote. It’s a strict parser (the same one your browser ships), so “valid” here means valid everywhere. Nothing is uploaded; your payloads stay on your machine.

## Find the broken comma fast

When the parse fails, the panel under the output prints the parser’s own message plus the **line and column** where it gave up, so you can jump straight to the stray comma, the single quote, the unquoted key or the bracket that never closed. Browsers word that error differently, and some report only a character position, so the position is turned back into a line and a column here.

## What is actually in this payload?

A valid parse also gets you a count of every **object key** and every **array item** in the document, counted all the way down through the nesting, not just at the top level. It is a quick way to see whether a response really came back with 250 records or 25, or to compare two payloads that look the same at a glance.

## For the things you copy a hundred times a day

Tokens, config blobs, API responses, that one curl command. Developers copy more than anyone, and lose it just as fast. **Relic** is an encrypted, searchable memory for everything you copy: it auto-tags JSON, code, URLs and secrets on-device, keeps them forever, and syncs across machines, all end-to-end encrypted, open source, self-hostable. The free plan holds 250 MB and 100 saved items across 3 devices.

## Frequently asked questions

How do I format or pretty-print JSON?+

Paste your JSON and it is instantly re-indented with consistent spacing so nesting is easy to follow. Minify does the reverse, stripping whitespace for compact payloads.

Why is my JSON invalid?+

The usual culprits: a trailing comma after the last item, single quotes instead of double quotes, unquoted keys, or a missing bracket. The validator points at the exact spot where parsing failed.

Is it safe to paste API responses with real data in here?+

Yes. Formatting and validation run entirely in your browser, nothing is uploaded, so tokens and customer data in a payload never leave your machine.

What is the difference between JSON formatting and validation?+

Formatting rearranges whitespace for readability. Validation checks the text is legal JSON at all. This tool does both at once: if it cannot parse, you get the error with the line and column it gave up on; if it can, you get pretty output.

Where exactly does my JSON break?+

The panel under the output prints the parser's own message plus the line and column where it stopped, so you can jump straight to the spot. Browsers word that error differently and some report only a character position, so a bare position is turned back into a line and a column here.

Does JSON allow comments or trailing commas?+

No. Strict JSON, which is what browsers and most APIs use, forbids both comments and a comma after the final element. Relaxed variants like JSON5 or JSONC allow them, but they are not standard JSON and will fail here, which is correct behavior.

How many keys and items are in my JSON?+

A valid parse prints a count of every object key and every array item in the document, counted all the way down through the nesting rather than only at the top level. It is a quick way to check whether a response really came back with 250 records or 25.

You just copied that. What if you never lost it?

**Relic** remembers everything you copy, forever, searchable on every device, and  end-to-end encrypted so only you can read it.

 250 MB free

[Download forWindows](https://relic.space/download/windows)[Download formacOS](https://relic.space/download/macos)[Download forLinux](https://relic.space/download/linux)[Download forAndroid](https://play.google.com/store/apps/details?id=relic.space.app&referrer=utm%5Fsource%3Drelic.space%26utm%5Fmedium%3Dwebsite%26utm%5Fcampaign%3Dcontent)[Download foriPhone](https://apps.apple.com/us/app/relic-clipboard-vault/id6800556025)

More free tools

[XML Formatterxml formatter](https://relic.space/tools/xml-formatter)[SQL Formattersql formatter](https://relic.space/tools/sql-formatter)[HTML Formatterhtml formatter](https://relic.space/tools/html-formatter)[JSON Diffjson diff](https://relic.space/tools/json-diff)[JWT Decoderjwt decoder](https://relic.space/tools/jwt-decoder)[Base64 Encode / Decodebase64 decode](https://relic.space/tools/base64)[All tools](https://relic.space/tools)
