Skip to content
cosmodev ~/tools/json-formatter

JSON-formaterare

Converters & Formatters

Försköna, minifiera och validera JSON direkt. Klistra in, formatera, kopiera – allt i din webbläsare. Dela en länk till exakt din inmatning.

Utdata
Klistra in JSON för att se den förskönad.
Send to AI
Generate TypeScript interfaces for this JSON. Infer union types for nullable fields and name the root interface after the likely domain concept. Output only the interfaces, no commentary:

```json

```

(Dokumentation på engelska)

What it does

The JSON Formatter beautifies, minifies, and validates JSON entirely in your browser. Paste any JSON - messy, minified, or broken - and it returns cleanly indented, valid JSON, or tells you exactly what’s wrong and where. Everything runs 100% client-side: nothing you paste is ever sent to a server, so it’s safe for sensitive payloads.

How to use it

  1. Paste your JSON into the Input box (or hit Sample to load a demo payload).
  2. Choose Beautify (pretty-print, 2-space indent) or Minify (compact, no whitespace).
  3. Read the formatted result in Output, or the error message if the JSON is invalid.
  4. Copy the result, or Copy share link to send the exact input to a teammate.

Examples

Beautify minified JSON

Input: {"name":"CosmoDev","free":true,"tools":["json","base64"]}

Output:

{
  "name": "CosmoDev",
  "free": true,
  "tools": ["json", "base64"]
}

Catch a syntax error

Input: {"a": 1, "b": } → Expected property name or '}' in JSON at position 12.

Good to know

  • Shareable: your input is encoded in the URL (?j=...), so a link reproduces the exact view.
  • Private: all parsing happens locally - safe for secrets and credentials.
  • Related tools: JSON ↔ CSV, Base64Base64An encoding representing binary data as 64 safe ASCII characters, so it survives transport through text-only channels. It encodes — it does not encrypt., JWTJWTA compact, URL-safe token that carries claims (like identity or expiry) between two parties, signed to prevent tampering.Learn more Decoder.
Källkod14 språk

100% på klientsidan · dina data lämnar aldrig din webbläsare. Hittade du detta användbart? Dela det med en kollega.