User Guide

Online JSON & YAML Formatter and Validator

Format or minify JSON and YAML online, choose 2- or 4-space indentation, sort keys and locate syntax errors.

How to use

  1. Paste JSON or YAML. Auto prefers valid JSON and reports JSON-like syntax errors; choose JSON or YAML manually to override.
  2. Choose Format or Minify, 2 or 4 spaces, and optional Sort keys. Options work independently of input line count.
  3. Errors show line, column and an excerpt. Go to error selects the offending input. Expanded results offer the same formatting controls.

Input and output example

Sort keys · 2

Example input

{"b":2,"a":1}

Example result

{
  "a": 1,
  "b": 2
}

Background knowledge

JSON / YAML
JSON and YAML represent data such as key/value pairs and lists. JSON uses braces, brackets, commas and double quotes; YAML can express structure through indentation. YAML indentation affects the data structure.
Formatter / Validator
A formatter organizes presentation such as indentation; a validator checks syntax. Valid syntax can still contain missing fields or values that violate business rules. Syntax checking and content validation are separate.

Notes

Frequently asked questions

What can I use this online tool for?

Format or minify JSON and YAML online, choose 2- or 4-space indentation, sort keys and locate syntax errors.

Can I change indentation or sort keys without toggling line count?

Yes. Format/Minify, 2/4 spaces and Sort keys are independent options. Sorting is recursive and preserves array order. The expanded view offers the same controls.

How do I find a syntax error in the input?

The result shows a line, column and excerpt. Go to error selects the input location. Invalid JSON-like input is not silently accepted as YAML; choose an input format manually if needed.

Baro Work is a collection of tools with no login. Inputs and results are not stored on the site server or in browser storage. See the translation and DNS guides for external transfers.

Use all tools on the home page →