All Tools Store
Runs in your browser

JSON formatter and validator

Paste JSON to make it readable and, if it is broken, see exactly where. Everything runs in your browser.

JSON is processed in your browser and never sent to a server. For very large inputs (several MB) syntax colouring is turned off for speed.

How to use

  1. Paste the JSON into the box; it is validated as you type.
  2. If it is valid, choose an indent and format, or minify it to one line.
  3. If it is not, go to the line and column shown; the pointer marks the exact spot.
  4. If comments or trailing commas are the problem, press “Repair and format”.

JSON's strict rules

JSON looks like JavaScript but is much stricter. Most parsers stop at the first violation, so a single stray comma invalidates the whole file.

RuleValidInvalid
Keys in double quotes{"name": 1}{name: 1}, {'name': 1}
Strings in double quotes"hello"'hello'
No comma after the last item[1, 2][1, 2,]
No comments—// note, /* note */
Limited value typesstring, number, true, false, null, object, arrayundefined, NaN, Infinity, date objects

There is no date type: dates travel as strings (usually ISO 8601) or as Unix timestamps. The timestamp converter turns those into readable dates.

Common errors and what they mean

What you seeWhyFix
Unexpected } or ]An extra comma before the closing bracketDelete it or press “Repair”
Unexpected 'Single quotes were usedSwitch to double quotes or press “Repair”
Unexpected end of inputAn unclosed bracket or quoteFind the closer for every { [ " you opened
Unexpected letterAn unquoted key, or Python style True/NoneWrite true, false, null in lower case
Error at line 1, column 1An invisible BOM, or an HTML responseCheck the source; the API may have returned an error page instead of JSON

The reported position is sometimes after the real mistake: the parser only notices on the next character. Look just before the pointer too.

What “Repair” can and cannot do

Numbers: big ids and decimals

JSON itself puts no limit on number size, but most languages that read it do. JavaScript cannot hold integers above 2⁵³ − 1 (9,007,199,254,740,991) exactly.

Formatting, minifying and sorting

Glossary

JSON
JavaScript Object Notation, a text-based data format (RFC 8259).
Parse
Read text and turn it into a data structure.
Object
Key–value pairs inside braces: {"a": 1}.
Array
Ordered values inside brackets: [1, 2, 3].
Minify
Remove all unnecessary whitespace without changing meaning.
JSON5
A relaxed JSON variant that allows comments, trailing commas and single quotes.
BOM
An invisible byte-order mark at the start of a file; some parsers reject it.
Escape
Writing a special character inside a string, such as \" or \n.

Frequently asked questions

What does a JSON validator do?

It reads the text by the JSON rules. If it is valid, it is formatted; if not, you see the line and column of the error, that line, and a pointer to the exact spot.

What does “Repair and format” fix?

Four things JSON forbids but people write all the time: // and /* */ comments, a comma after the last item, single-quoted strings and unquoted keys. They are corrected and the result is validated again.

What is the difference between formatting and minifying?

Formatting adds indentation and line breaks to make it readable. Minifying strips all unnecessary whitespace; the data is identical, just smaller. APIs and config files usually use the compact form.

Does sorting keys change the data?

No. Key order has no meaning in a JSON object; sorting only makes two files easier to compare. Array order is kept.

Why do large numbers change?

JavaScript numbers cannot hold integers above 2⁵³ exactly. An id such as 9007199254740993 may be rounded when formatted, so such ids belong in JSON as strings (in quotes).

Is my JSON sent anywhere?

No. Parsing, formatting and repair happen in your browser. Even if it contains API keys or personal data, nothing leaves the page.

How large a JSON can it handle?

Tens of megabytes, as long as the browser has the memory. Above 300 KB of output, colouring is switched off for speed, but formatting still happens.

Text CompareLine-by-line diff of two textsJWT DecoderRead what is inside a tokenBase64 Encode & DecodeConvert text and files to Base64 and back

the Mall of Accs team Last updated:

More free tools

2FA Code GeneratorInstant codes from your secret keyPassword GeneratorStrong random passwords, one or in bulkQR Code GeneratorQR for links, text, Wi-Fi and 2FAQR Code ScannerRead a QR code from an image or cameraImage to LinkUpload an image, get a shareable linkImage CompressorCompress, resize, convert JPG/PNG/WebPImage WatermarkAdd a text watermark to images in bulkGmail Dot & Alias GeneratorHundreds of addresses from one GmailAccount Line ParserTurn messy lines into clean columnsText ToolsDedupe, sort, shuffle, find & replaceYouTube Channel IDUC channel ID from a URL or @handleFacebook UIDNumeric ID from a public profileInstagram User IDNumeric ID from a public profileTikTok User IDNumeric ID + secUid from a profileYouTube Link GeneratorTimestamp link, embed code, subscribe linkYouTube Tag ExtractorA video's tags, title and descriptionYouTube Logo & BannerDownload a channel's logo and bannerYouTube ThumbnailDownload a video cover image (HD)Earnings CalculatorYouTube/TikTok/Twitch/Spotify incomeEngagement RateEngagement % from followers + likesProfile Photo DownloaderTikTok & Instagram profile pictureWheel of NamesType names, spin the wheel, get a winnerGiveaway PickerPick a fair random winner from a listInstagram Bio Line BreakLine breaks that survive in bios and captionsFancy Text GeneratorBold, italic and fancy Unicode text stylesCharacter & Word CounterLive counts against platform limitsHash GeneratorMD5, SHA-1, SHA-256 and SHA-512 digestsUTM Link BuilderAdd campaign tags to a linkBinary ConverterText ⇄ binary, decimal ⇄ hex ⇄ octalSlug GeneratorTurn a title into an SEO-friendly URLTimestamp ConverterUnix time to date and backPassword Strength CheckerHow long would it take to crack?User-Agent ParserBrowser, OS, device and bot detectionIP LookupIP owner, ASN and reverse DNSEmail Domain CheckerMX, disposable, SPF and DMARCOutlook / Hotmail Inbox ReaderRead the inbox of an account you boughtShort Link GeneratorShorten long links in one clickUnit ConverterLength, weight, temperature, data and moreStopwatch & TimerLaps, plus a countdown with a sound alertDiscount CalculatorPercent-off price and discount rateCurrency ConverterDollar, euro, lira and 30 currencies