Workflow & Usage
- Paste or drop JSON into the left editor (or click Open to load a
.jsonfile). - Choose output: JSON to validate/format/minify, or YAML to convert.
- Adjust options:
- Minify → one-line compact JSON (disabled in YAML mode).
- Sort keys → alphabetically order object keys.
- Indent → 2 spaces, 4 spaces, or tabs (disabled when Minify or YAML is selected).
- Live validation: If invalid, the status shows Invalid JSON with line and column.
- Copy / Download: Use the Copy button above the right editor or Download to save the result.
Below each editor you’ll see size in bytes and line counts (as plain text, not badges) for quick comparison.
Use Cases
- API development - Inspect and validate payloads and responses.
- Config hygiene - Re-indent, sort keys, or minify app/server config files.
- Data conversion - Switch between JSON and YAML without external tools.
- Version control - Sorted keys make diffs readable and stable.
- Offline & private - Safely work with sensitive data; nothing leaves your device.
Tips for Best Results
- Sort keys before committing to get clean, repeatable diffs.
- Pretty format while editing, then Minify for final export.
- Validate YAML in your editor/CI before deployment - indentation matters.
- Drag & drop downloaded API responses straight into the left editor.
How It Works
- Validation - Parses input with
JSON.parse. On error, the tool extracts the character position and maps it to line/column for precise feedback. - Formatting - Uses
JSON.stringify(value, null, space)for human-readable output or nospacefor minified JSON. - Sorting - Recursively sorts object keys for deterministic structure.
- Conversion - Converts to YAML in-browser; no servers involved.
- Editing UX - CodeMirror editors with line wrapping, gutters, and auto-pairing of
[](){}and quotes for faster typing.