Skip to main content
Turns a piece of structured data, such as an object or a list, into a single YAML text string. Use this when a system or file you produce expects YAML, a plain-text format that lays out fields one per line. There is nothing to configure: hand it your data and it returns the YAML text.

Sample data

This example formats one object into YAML. Each field becomes its own line, and the price keeps its number form. Input:
{
    "product": {
        "sku": "SCARF-01",
        "name": "Wool scarf",
        "price": 24.95
    }
}
Output:
{
    "product": "sku: SCARF-01\nname: 'Wool scarf'\nprice: 24.95\n"
}