JSON-prettify

    YAML to JSON Converter

    Turn YAML into formatted JSON, right in your browser.

    YAML

    JSON

    Your JSON will appear here

    How to convert YAML to JSON

    1. Paste YAML into the input box, or upload or drop a .yaml or .yml file.
    2. The JSON appears as you type. Errors show the line and column.
    3. Copy the JSON or download it as a .json file. Use Swap to convert it back.

    Frequently asked questions

    Is my data uploaded?

    No. The conversion runs entirely in your browser; nothing is sent to a server.

    Why do "no" and "on" stay strings?

    The converter follows YAML 1.2, where only true and false are booleans. Older YAML 1.1 tools turn values like no, yes, on and off into booleans, which is a common source of bugs.

    What happens to anchors and aliases?

    They're resolved, so each alias is replaced by a copy of the value it points to. Extremely large alias expansions are rejected to protect your browser.

    What about files with several documents?

    Documents separated by --- become a JSON array with one item per document.

    Why did some values become null?

    JSON has no equivalent for YAML's .inf and .nan, so they become null and a warning lists them.