SilentCanoe / JSON & YAML Formatter
🔒 All formatting and validation runs locally in your browser. Your JSON, YAML, and schema data is never transmitted.

JSON & YAML Formatter / Validator

Pretty-print, minify, validate, convert, and sort. Works entirely in your browser — no server, no uploads.

Input: — Unknown
Override:
Indent:
Input Unknown
0 chars 0 lines
Output
Output will appear here...
JSON Schema Validation (draft-07)

Frequently Asked Questions

When should I use JSON vs YAML?
JSON is best for APIs, machine-to-machine communication, and web services. It's strict, unambiguous, and natively supported by JavaScript. YAML is preferred for configuration files (Docker Compose, Kubernetes, CI/CD pipelines) because it's more human-readable, supports comments, and allows multi-line strings without escaping. Choose YAML when humans write the config; choose JSON when machines consume it.
What does "Sort Keys" do?
Sort Keys alphabetically rearranges all object/mapping keys at every level of nesting. This is useful for diffing two JSON/YAML blobs (so key order doesn't affect the diff), ensuring consistent output regardless of the source order, and making large configs easier to scan visually. The operation is recursive — nested objects are sorted too.
Which JSON Schema keywords are supported by the validator?
The built-in schema validator supports the most common draft-07 keywords: type, required, properties (recursive), minimum, maximum, minLength, maxLength, pattern, and enum. More advanced keywords like $ref, anyOf, allOf are not yet supported in this lightweight implementation.
Is there a file size limit?
There is no hard limit — the formatter will process files of any size. However, inputs larger than 1 MB will display a warning because formatting very large files (several MB) may cause the browser tab to become temporarily unresponsive. Syntax highlighting is disabled for inputs over 500 KB to keep performance acceptable; plain text output is shown instead.
How does drag and drop work?
You can drag any .json, .yaml, or .yml file directly onto the Input panel. The file contents are read locally using the browser's FileReader API — the file is never uploaded to any server. The format is auto-detected and the stats (character count, line count) update immediately.