Blog
Wild & Free Tools

Home Assistant YAML to JSON — Convert Config Files Online Free

Last updated: March 2026 5 min read
Quick Answer

Table of Contents

  1. Validate Home Assistant YAML Before Restarting HA
  2. Common Home Assistant YAML File Types
  3. Lovelace YAML Dashboard Config
  4. HA YAML Anchors and Includes
  5. Frequently Asked Questions

Home Assistant configuration files are YAML. When something breaks after editing a config, the fastest way to check whether the problem is a YAML syntax error is to paste the config into a YAML-to-JSON converter. If it parses successfully, the YAML is valid and the issue is in Home Assistant's semantic validation. If it throws an error, you have a syntax problem to fix before HA will even read the file.

This guide covers converting and validating the most common Home Assistant YAML file types — automations, scripts, sensors, lovelace dashboard configs — using the free browser converter.

Validate Home Assistant YAML Before Restarting HA

Home Assistant refuses to load if configuration.yaml or any included file has a YAML syntax error. The HA UI shows an error on restart and logs the problem, but the error message can be hard to read without direct server access.

Faster approach: Before restarting HA, copy the changed YAML section and paste it into the browser converter. Click Convert. If it succeeds, the YAML syntax is valid and the restart should not fail from a syntax error. If it fails, fix the reported error first.

This takes 30 seconds and avoids a failed restart cycle, especially on Home Assistant OS where recovering from a bad config requires SSH access or a USB drive.

Note: the browser converter checks YAML syntax only. It cannot validate Home Assistant's schema (whether platform: template is a valid sensor type, whether an entity ID exists). Use the HA Config Validator in the UI (Settings > System > Repair > Check Configuration) for full HA semantic validation.

Which Home Assistant YAML Files to Validate

The files most likely to have YAML syntax errors in a Home Assistant setup:

configuration.yaml — the main config file. Any syntax error here prevents HA from starting. Validate after every edit.

automations.yaml — automation definitions. Large files with many automations are prone to indentation errors when you add a new automation manually.

scripts.yaml — HA scripts. Similar structure to automations; same risk profile.

lovelace dashboard files — Lovelace UI dashboards written in YAML (raw config mode). Especially prone to errors when copy-pasting card configurations from the HA community forums.

custom_components/** YAML — configuration files for third-party integrations. These vary widely in structure. When an integration fails to load, validate its config YAML first.

blueprints/*.yaml — automation blueprint definitions. These use a HA-specific YAML extension with !input tags — the browser converter may flag these as errors (they are not standard YAML). Ignore errors on !input lines specifically.

Sell Custom Apparel — We Handle Printing & Free Shipping

Validating Lovelace YAML Dashboard Configurations

Lovelace dashboards in raw YAML mode are one of the most common sources of HA config breakage for users who paste card configurations from community forums.

The typical issue: a card config copied from a forum post has extra indentation, wrong quote types (curly quotes from a word processor), or trailing commas (JSON syntax accidentally pasted as YAML).

To validate a Lovelace card config:

  1. In HA UI, go to the dashboard, click the three-dot menu, Edit Dashboard
  2. Click the three-dot menu on the card you want to check, pick Edit
  3. Switch to YAML mode (the code view)
  4. Copy the entire card YAML
  5. Paste into the browser converter and click Convert

If it converts successfully, the card YAML is syntactically valid YAML. If not, the error message tells you where the problem is. Fix it and paste the corrected YAML back into the HA card editor.

HA YAML Anchors and !include Tags

Home Assistant uses two YAML features that require special handling when validating in the browser converter:

YAML anchors and aliases (&anchor and *alias): These are standard YAML features and the browser converter handles them correctly. If your automation uses anchors for DRY config, the conversion will work fine.

HA custom tags (!include, !input, !secret): These are Home Assistant-specific YAML extensions that are not standard YAML. The browser converter will throw an error on these tags because it cannot resolve custom tag handlers.

Workaround for !include: substitute the actual file content where the !include tag appears, then validate the merged content.

Workaround for !input (blueprints): remove the !input tags and replace them with placeholder values before validating, just to check the structural YAML.

For full HA-aware validation including custom tags, the built-in HA Check Configuration tool is the right choice.

Validate Your Home Assistant YAML Right Now

Paste your HA config YAML, click Convert. If it succeeds, the syntax is valid. Fix errors before restarting Home Assistant.

Open Free YAML to JSON Converter

Frequently Asked Questions

Can I use the browser YAML to JSON converter to validate my Home Assistant config?

Yes, for YAML syntax validation. Paste your HA YAML config into the converter and click Convert. If it succeeds, the syntax is valid. If it fails, fix the error shown. Note: the converter cannot validate HA-specific schema (entity IDs, platform names). Use HA Check Configuration for full semantic validation.

Why does my Home Assistant automation YAML fail to convert?

Common causes: tabs instead of spaces for indentation, a colon in an unquoted string value, copy-paste formatting issues from the HA UI or forums, or HA-specific tags like !include or !secret that are not standard YAML.

What is the fastest way to check if my Home Assistant YAML config has errors?

Two options: (1) paste the changed section into the free browser converter to check syntax in 10 seconds. (2) In the HA UI, go to Settings > System > Repair > Check Configuration — this runs HA full validation including schema checks. Use the browser tool for a quick syntax check before the full HA validator.

Does the browser YAML converter handle Home Assistant anchors?

Yes — standard YAML anchors (&anchor) and aliases (*alias) are supported. Home Assistant-specific tags like !include, !input, and !secret are not standard YAML and will cause errors. Substitute their values before validating these sections.

Andrew Walsh
Andrew Walsh Developer Tools & API Writer

Andrew worked as a developer advocate at two SaaS startups writing API documentation used by thousands of engineers.

More articles by Andrew →
Launch Your Own Clothing Brand — No Inventory, No Risk