Highlight, check, and share YAML

This YAML syntax highlighter turns plain configuration files into color-coded code you can read at a glance or paste into documentation, blog posts, slides, and emails. At the same time it checks the YAML with a full parser, so you'll know immediately if a stray tab or a missing colon will break your deployment. It works with GitHub Actions workflows, Docker Compose files, Kubernetes manifests, Ansible playbooks, OpenAPI specs, and any other YAML.

Everything runs in your browser. Your configuration, which may include server names or secrets, is never uploaded.

How to use it

  1. Paste YAML, open a .yaml or .yml file, or drag one onto the tool.
  2. Check the validation bar. If there's an error, click the line number to jump straight to it.
  3. Pick a theme and options like line numbers, a file name label, or highlighted lines.
  4. Copy the HTML for a web page, copy it formatted for Word, Google Docs, or email, or download a complete HTML page.

What gets colored

PartExample
Keys, including quoted keys and ? complex keysruns-on:, "quoted key":
Strings, with escape sequences highlighted"line\n", 'it''s'
Numbers, dates, and timestamps42, 0x1F, .inf, 2026-10-02
Booleans and nulltrue, no, ~, null
Anchors, aliases, and merge keys&defaults, *defaults, <<:
Tags!!str, !Ref, !custom
Block scalars, the multi-line text after | or >Shell scripts in a workflow's run: step
Comments, directives, and document markers# note, %YAML 1.2, ---

The highlighter understands YAML's tricky spots. A # inside a URL isn't a comment, and a line starting with - inside a block of text isn't a list item. Multi-line quoted strings and flow collections like [a, b] and {k: v} are colored correctly too. During development, keys were detected at exactly the positions a full YAML parser (PyYAML) reports, across real-world files including GitHub workflows, issue forms, and documentation configs.

Built-in YAML validation

The tool also parses your YAML with js-yaml, a widely used YAML parser, and reports the first problem with its exact line and column. The most common errors it catches:

  • Tabs in indentation. YAML only allows spaces for indentation. A single tab, often pasted from an editor, breaks the whole file.
  • Duplicate keys. Two env: blocks in the same place. Many tools silently keep only the last one, which hides bugs. The YAML specification forbids it.
  • Bad indentation. A key that's indented one space too far or too little.
  • Unclosed quotes and brackets, and missing spaces after colons.

Valid YAML can also be downloaded as JSON, with anchors and aliases expanded. Files with several documents become a JSON array.

Pasting highlighted YAML elsewhere

  • Websites and blogs: use Copy HTML with inline styles, and paste into an HTML block, such as WordPress's Custom HTML block. The colors travel with the code.
  • Your own site's stylesheet: choose "CSS classes + stylesheet" for clean markup with one shared style block.
  • Word, Google Docs, Outlook, Gmail, and slides: use Copy formatted, then paste normally.

Frequently asked questions

Is my YAML uploaded anywhere?

No. Highlighting, validation, and conversion all happen in your browser. That matters for config files that contain hostnames, keys, or passwords.

Which YAML version does it check?

YAML 1.2, the current version, which Kubernetes, GitHub Actions, and most modern tools use. Words like yes, no, on, and off are still colored as booleans, because older YAML 1.1 tools such as Ansible and PyYAML treat them that way. Quote them if you mean the text.

Why does it say my file is invalid when my tool accepts it?

Some tools are more forgiving than the YAML specification. Duplicate keys are the usual reason: most parsers silently keep the last value, but the standard doesn't allow duplicates, so they're flagged here. Removing them makes your file portable.

Does it support custom tags like CloudFormation’s !Ref?

Tags are highlighted. For validation and JSON conversion, unknown tags are read as plain values, so CloudFormation and Home Assistant files can still be checked.

Can it fix or reformat my YAML?

It points to the exact problem but doesn't rewrite your file, because reformatting would remove your comments. The JSON download gives you a clean, normalized copy of the data.

Our Full Dev Tool Library

Flipper File