JSON formatter and validator for YAML, TOML, XML, INI and .properties

Format, validate, minify, and inspect JSON, YAML, TOML, XML, INI and .properties locally in your browser.

FluffyShield Protected workspace
Language
Do

Choose a configuration format and action

FluffyShield

Isolated workspace: other page scripts can't read your files. How FluffyShield works

How it works
  1. JSON in
  2. Readable or compact JSON out
  3. Copy or Download

Checks JSON syntax

Syntax problems appear beside your input.

Choose the spacing

Format JSON adds indentation; Minify JSON puts the result on one line.

JSON stays on your device

FluffyBench processes your JSON content in your browser.

Limits The steps below use JSON. The Language menu also offers YAML, TOML, XML, INI, and Properties.

Make one-line JSON readable without changing its values

A wall of JSON is hard to check. FluffyBench adds readable spacing while keeping your values as written—or puts the JSON back on one line when you need a compact result.

Choose readable JSON or one compact line

JSON is text that programs use to exchange information. Names identify fields, and lists group values in order; indentation helps you see which values belong together.

Spacing is like the gaps between folder labels: it helps you find things without changing what's inside. Here are the same list values with each JSON layout.

The JSON object with items 1, true and null, formatted with 2 spaces, with 4 spaces, and minified on one line.

One list, three layouts

  1. 2 spaces

    A compact indent for reading and reviewing JSON.

  2. 4 spaces

    A wider indent makes each nested level stand out.

  3. Minify JSON

    One line for a destination that asks for compact JSON.

The values and their order match; the whitespace between them changes. How we reviewed

Indentation doesn't affect the minified result. Spaces inside a quoted string are part of its value, so FluffyBench keeps them.

Doing it in FluffyBench's JSON formatter

On a phone, Input and Result share the same space. The marked tabs take you between your source and the live result.

  1. Keep your original, then paste your JSON in Input.
    Keep your original, then paste your JSON in Input.
    Step 1. Keep your original, then enter your JSON.
    1. Open Input.
    2. Paste your JSON.
  2. For a readable result, use Format JSON and choose 2 spaces.
    For a readable result, use Format JSON and choose 2 spaces.
    Step 2. Choose the readable layout.
    1. Choose Format JSON.
    2. Choose 2 spaces per level.
  3. The result updates automatically. Copy puts the JSON on your clipboard; Download saves a .json file.
    The result updates automatically. Copy puts the JSON on your clipboard; Download saves a .json file.
    Step 3. Open Result, then Copy or Download the JSON.
    1. Copy the result text.
    2. Download the JSON file.
    3. Open Result to see the formatted JSON.
  4. Use Minify JSON when your destination asks for one line. The destination still needs to accept JSON.
    Use Minify JSON when your destination asks for one line. The destination still needs to accept JSON.
    Step 4. For a destination that asks for compact JSON.
    1. Choose Minify JSON.
    2. Check the one-line result.

Before you use the JSON, match its names and values to your source. Here's the complete source beside FluffyBench's formatted result.

Source {"name":"Ada","active":true} beside the complete formatted object with the same name and active value.

Complete source and formatted result

  1. Source

    The name is Ada and active is true.

  2. Format JSON

    Both values match the source.

  3. Complete object

    The closing brace is present.

The same JSON used in the walkthrough, formatted with the current FluffyBench formatter.

Find JSON syntax problems

FluffyBench formats strict JSON: comments, trailing commas, and single-quoted strings need correcting in your input. Here's a trailing comma and the problem entry that takes you to it.

  1. A trailing comma stops this JSON from formatting.
    A trailing comma stops this JSON from formatting.
    Step 1. A trailing comma stops this JSON from formatting.
    1. Read the message and its position.
  2. JSON input with the trailing-comma problem selected.
    JSON input with the trailing-comma problem selected.
    Step 2. The problem entry takes you to the mistake.
    1. Select the trailing-comma problem.
    2. The comma after true is selected.
  3. Corrected JSON input with no comma after true.
    Corrected JSON input with no comma after true.
    Step 3. Correct the JSON input.
    1. Remove the comma after true.
  4. The complete corrected JSON result, including its closing brace.
    The complete corrected JSON result, including its closing brace.
    Step 4. Confirm the successful JSON result.
    1. Open Result.
    2. The corrected JSON now formats.

For help with a specific message, see common JSON syntax errors and their fixes.

What FluffyBench keeps unchanged

Compare the source ID with two formatting paths, then check the source keys beside FluffyBench's result.

Source ID 9007199254740993; JavaScript parse-and-print 9007199254740992; FluffyBench 9007199254740993. The last digit differs in the JavaScript result.

One ID through two formatting paths

Source and FluffyBench both have keys id, huge, b, 2, 1, b, with both b values retained.

Source and formatted keys

  1. Source JSON

    The original ID ends in 3.

  2. JavaScript parse-and-print

    Reading into JavaScript data and writing it back changes the final digit to 2.

  3. FluffyBench JSON formatter

    The ID still ends in 3.

  4. Source keys

    The name b appears twice in the source.

  5. Formatted keys

    The order and both b values match.

JavaScript parse-and-print rounded the final digit to 2; FluffyBench kept every digit. JSON formatting and minifying also keep key order and repeated names.

Work with YAML, TOML, XML, INI, and .properties

Language chooses your input format; Do offers the jobs shown here. Format tidies layout, Validate checks syntax, and Convert changes the representation.

JSON offers Format or minify and conversion to YAML or TOML. YAML and TOML offer Format, Validate, and Convert to JSON. XML also offers Minify. INI and Properties offer Normalize, Validate, and Convert to JSON.

Language to Do action map

  1. JSON

    Format or minify opens the JSON layout controls.

  2. XML

    XML includes a separate Minify action.

  3. INI and Properties

    Normalize produces consistent key=value text.

Each arrow connects a source language to its available actions.

Here's YAML converted to JSON in the same workspace, with the input and output labelled at each step.

  1. Language set to YAML and Do set to Convert to JSON.
    Language set to YAML and Do set to Convert to JSON.
    Step 1. Start with your source language and destination.
    1. Choose YAML under Language.
    2. Choose Convert to JSON under Do.
  2. YAML source text ready for conversion to JSON.
    YAML source text ready for conversion to JSON.
    Step 2. The conversion runs as you type.
    1. Paste the YAML you want to convert.
  3. The current YAML-to-JSON conversion result, with JSON in the output header.
    The current YAML-to-JSON conversion result, with JSON in the output header.
    Step 3. Check and save the JSON result.
    1. Check both paths and the closing brackets.
    2. Download the converted result.
    3. Copy the converted JSON text.

Other configuration jobs can change more than spacing. Here's an INI conversion and a TOML formatting result from FluffyBench.

INI input [app] with name=FluffyBench becomes JSON with an ordered sections list and an entries list. TOML input with the comment # App name formats to name = "FluffyBench" without the comment.

INI conversion and TOML formatting

  1. INI source

    The app section contains one name entry.

  2. Convert INI to JSON

    Sections and entries become ordered lists; the unnamed section is included too. Properties conversions use the same list structure.

  3. Format TOML

    The name stays; the comment is removed. INI and Properties normalization also remove comments.

Current tool outputs, with JSON spacing compacted for illustration. All values and list entries are shown.

The whitespace-preservation promise belongs to Format JSON and Minify JSON. Each conversion message explains refusals, such as values that can't be represented in the destination format.

Need to compare these formats? Read JSON vs. YAML, TOML, XML, and INI.

Search FluffyBench