Skip to content
snowkitDev

YAML to JSON, instantly

Paste YAML and get clean JSON as you type.

Format converter

Pick the two formats, then paste, type or drop a file.

Examples

              

    If an indent or a tab breaks it, you'll see the exact line and can jump straight to it.

    If something won't parse, you'll see what's wrong and on which line, with a button that takes you there. Convert between JSON, YAML, TOML, XML and .env files in your browser. It is free and private.

    How to convert a file

    1. Paste your text into Input, or press Open a file. Examples loads a sample.
    2. Leave Detect automatically on, or pick the format yourself.
    3. Choose the output format: JSON, YAML, TOML, XML or .env.
    4. Pick 2 spaces or 4 spaces for the indent.
    5. Press Copy or Download.

    How values carry across

    JSON, YAML and TOML all have objects, lists, strings, numbers and true/false, so those convert cleanly. TOML has no null, so empty values are left out and you're told. Dates in YAML and TOML are kept as text in ISO format, so 2026-10-21 stays exactly as written.

    XML and .env

    XML attributes become keys starting with @, text next to child elements goes under #text, and repeated elements become a list. Going back to XML follows the same rules. A .env file is a flat list of names and values, so nested data is flattened into names like DATABASE_HOST, and lists are joined with commas. Quoted values, export lines, inline comments and multi-line values in double quotes are understood.

    Error messages that help

    Every parser reports the line and column where it got stuck, such as a missing comma in JSON, a tab or a bad indent in YAML, a duplicate key in TOML or a tag that doesn't close in XML. Press Show the line to jump straight to it.

    Supported files

    You can open .json, .yaml, .yml, .toml, .xml, .env, .ini and plain text files.

    Tips

    • Check the result before using it. Flat formats like .env lose structure when nested data is flattened.
    • Be careful with YAML indents. Use spaces, never tabs.
    • Converting from XML and back works best when the XML is simple.
    • Use the JSON tools to validate or tidy JSON, and the diff checker to compare versions of a config file.

    Common uses

    Moving a configuration between tools, turning an API response into a readable file, and reading data in a format you do not use every day. It suits developers, students and anyone who edits settings files.

    Questions

    Is my data uploaded?

    No. The conversion happens in your browser.

    Why were some values left out?

    TOML has no null value, so empty values are left out and you are told.

    Can it convert comments?

    Comments are not carried between formats, since JSON has none.

    Where to next

    Carry on with what you just made, still on your device.

    More from Snowkit