YAML to JSON converter and validator

    Convert YAML to JSON and find YAML errors by line.

    Your text stays on this device

    About the YAML to JSON tool

    This YAML to JSON converter turns YAML into JSON and tells you the exact line and column if the YAML is invalid, so it also works as a YAML validator. It reads YAML 1.2, so words like yes and no stay text instead of turning into true and false, and files with several documents separated by --- become one JSON array. Output can be pretty-printed with 2 or 4 spaces or minified. Use it to check a docker-compose.yml or CI workflow before you push it.

    At a glance

    Input
    .yaml or .yml files up to 20 MB, or pasted YAML
    Output
    JSON, pretty (2 or 4 spaces) or minified, saved as data.json
    Multi-document
    Documents split by --- become one JSON array
    Errors
    Shown with line and column; Go to line jumps there
    Price
    Free, no sign-up
    Works in
    Your browser, on phone or computer. Works offline after the first visit.
    Privacy
    What you type never leaves your device.

    How to convert YAML to JSON

    1. Paste your YAML or open a .yaml / .yml file.
    2. Choose pretty or minified JSON.
    3. Copy or download the JSON. If there is an error, the line is marked in the line numbers; press "Go to line" to jump to it.

    Private

    Your text stays in your browser and is never sent to a server.

    Instant

    Results update as you type, with nothing to install.

    Free

    No sign-up, no limits and no ads inside your writing space.

    YAML to JSON: frequently asked questions

    Why is my YAML invalid?

    Most errors come from indentation. YAML needs spaces, not tabs, and items at the same level must line up exactly. Duplicate keys and a missing space after a colon are the next most common causes.

    Does "yes" become true?

    No. This tool follows YAML 1.2, where only true and false are booleans. In older YAML 1.1 tools, yes/no/on/off were booleans, which caused many surprises.

    Can it read a file with several YAML documents?

    Yes. Documents separated by --- are converted into one JSON array, with one item per document.

    Is my text sent anywhere?

    No. Everything runs in your browser and your text never leaves your device. Nothing is stored on any server.