Installera ZYBERMART

Öppna alla verktyg från hemskärmen eller Dock, i ett eget fönster. Verktyg du har använt fungerar även offline.

JSON-formaterare och validerare

Formatera, validera och minifiera JSON. Fel visas med exakt rad och kolumn.

How to format and validate JSON

  1. Paste your JSON into the input box.
  2. Click Format to pretty-print it, or Minify to compress it.
  3. If the JSON is invalid, you'll see what's wrong and the exact line and column.

JSON syntax rules

  • Data is written as "name": value pairs, and property names must be in double quotes.
  • Values can be strings (in double quotes), numbers, true, false, null, objects { } or arrays [ ].
  • Items are separated by commas, with no comma after the last item.
  • Comments are not allowed.

Example

This compact JSON:

{"name":"Ada","languages":["English","French"]}

becomes, after formatting:

{
  "name": "Ada",
  "languages": [
    "English",
    "French"
  ]
}

Frequently asked questions

What does a JSON formatter do?

It takes compact or messy JSON and adds consistent indentation and line breaks so it's easy to read. It also checks that the JSON is valid and points to the exact location of any error.

What are the most common JSON errors?

Trailing commas after the last item, single quotes instead of double quotes, unquoted property names, and comments. All of these are allowed in JavaScript but not in strict JSON.

What does minify do?

Minifying removes all unnecessary whitespace, making the JSON as small as possible. That's useful for sending data over a network or storing it compactly.

Is my JSON sent to a server?

No. Formatting and validation run entirely in your browser, so it's safe to use with API keys, tokens or private data.

Logga in på ZYBERMART

Ha dina CV:n, fakturor, flashcards, anteckningar och sparade verktyg på alla dina enheter. Det är gratis, och verktygen fungerar likadant utan konto.

eller

Inget lösenord behövs. Genom att logga in godkänner du villkoren. Läs hur vi hanterar dina data i integritetspolicyn.

Ditt konto

När du loggar ut finns en kopia av ditt arbete kvar i den här webbläsaren. På en delad dator bör du rensa webbläsardata efteråt.

Vad vill du skapa?

Designer

Sociala medier

Dokument

Studier

Redigera

Visa alla 282 verktyg