Hack the Hydra

JSON formatter and validator

Paste JSON to pretty-print it, minify it or just check that it is valid. If there is a syntax error you get the line, column and the text around it. Your data stays in your browser.

🔒 Private by design: the conversion runs in this browser tab. Nothing is uploaded.

JSON formatter and validator is a free online tool by Hack the Hydra. Format, minify and validate JSON online. Shows the exact line and column of a syntax error. Free, private: your JSON never leaves your browser.

100% freeNo upload: runs in your browserNo sign-up
JSON formatter and validator: the tool with a sample file converted

Reading the error message

When parsing fails, the tool reports the line and column of the first problem and shows the text around it. The error is usually at, or just after, the character that does not belong. The most common causes are a trailing comma after the last item, single quotes instead of double quotes, unquoted keys, a missing comma between items and comments, none of which strict JSON allows.

What formatting does and does not change

Formatting re-serializes the parsed data, so whitespace changes but values do not. Key order is preserved. Be aware that numbers outside JavaScript's safe integer range (above 9,007,199,254,740,991) are rounded when parsed, so do not run IDs of that size through any browser-based formatter if they must stay exact.

Format, minify or validate?

Format when you want to read or diff JSON. Minify to shrink a payload for a request body, a config embedded in HTML or a URL parameter. Validate to just confirm the document is well-formed, for example before committing a config file. Everything runs locally, so API responses containing tokens or personal data are safe to paste.

Example

Minified JSON from an API, pretty-printed and validated.

Input

{"name":"Ada","skills":["math","code"],"active":true}

Output

{
  "name": "Ada",
  "skills": [
    "math",
    "code"
  ],
  "active": true
}

How to use

  1. Type or paste your text in the box above.
  2. The result updates as you type; change the options to switch mode.
  3. Copy the result or download it.

FAQ

Is my JSON sent to a server?

No. It is parsed with the JSON.parse function built into your browser. Nothing is uploaded or stored.

Does it accept comments or trailing commas?

No. This checks strict JSON as defined by RFC 8259. JSON with comments (JSONC) or trailing commas will be reported as an error at the first offending character.

Can it sort keys?

No, key order is kept as in your input so that diffs stay meaningful.

How big a file can I paste?

Several megabytes work fine on a recent computer. For very large files, the speed depends on your device since everything runs locally.

Guides

More free converters

PDF to Markdown converterOCR PDF: scanned PDF to textImage to text (OCR)Word (DOCX) to Markdown converterExcel & CSV to Markdown tablesHTML to Markdown converterPowerPoint (PPTX) to Markdown converterJSON to Markdown tablePDF to text converterExcel to JSON converterMarkdown to HTML converterMerge PDF filesSplit PDF: extract pagesRotate PDFJPG to PDF converterPDF to JPG converterImage converter: PNG, JPG, WebPCompress image: JPG and WebPQR code generatorWord counterCase converterBase64 encode and decodeURL encoder and decoderUUID v4 generatorStrong password generatorLorem ipsum generatorJSON to CSV converterRemove duplicate linesUnix timestamp converterJSON to YAML converterText diff checkerImage resizerPercentage calculatorAge calculatorHash generator (SHA-256, SHA-1, SHA-512)Color converter: HEX, RGB, HSLDays between dates calculatorYAML to JSON converterUnit converterJWT decoderBinary, hex, decimal and octal converterRoman numeral converterRegex testerCron expression explainerPDF to Markdown for ChatGPTPDF to Markdown for ClaudePDF to Markdown for RAG pipelinesPDF to Markdown for ObsidianPDF to Notion (via Markdown)Screenshot to textFrench OCR: image to textCSV to Markdown tableGoogle Docs to MarkdownJPG / JPEG to text (OCR)PNG to text (OCR)CSV to JSON converterPNG to JPG converterJPG to PNG converterWebP to PNG converter