YAML Validator Online
Check, Format And View YAML
This web-based tool validates your uploaded YAML file, gives the specific location of each validation failure, formats the YAML, creates a tree representation, and allows you to download the validated YAML as a JSON formatted file. Our servers never get any of your data.
- FreePrice
- 5Modes
- NoneSign-up
- NoneUploads
YAML Validator and Formatter
Check, tidy, view and convert YAML in your browser
- Lines
- 0
- Keys
- 0
- Depth
- 0
Ready. Paste YAML and it is checked at once.
Guides for this tool
Articles with worked examples, tables and a short video that help you get more from this tool.
YAML or JSON: Which One Fits Your Project?YAML vs JSON compared: the differences, strengths, the same data in both, and when to use which.
9 minutes of reading · video guide inside
What A YAML Validator Online Does For You
YAML is used to run much of today’s internet. This includes configuration files, deployment processes (build pipelines) and cluster configurations. But a single misplaced space can cause an entire deployment to fail and the error message given by YAML is typically unhelpful.
The tool will give you exactly what’s wrong with your YAML file. First, simply paste your YAML file into the tool, and it will check it right away. If there is a problem, you will get a message with the location of the issue. You can then quickly go to the correct line in your file by clicking on it.
It also finds errors that a parser cannot detect. As an example, a string such as ’no’ without quotation marks may be interpreted as ’false.’ A number with a leading zero may be converted to an octal value. The identification of these types of issues saves developers valuable time when trying to resolve them.
Besides checking, the page has four more modes. It formats and sorts the file, draws a tree, parses it to JSON, and encodes it as Base64. All of them share one box.
The work will stay on your end, in your browser. The YAML that you enter into the form is kept locally on your machine and is never sent off-site. This is important as most configuration files contain private data such as host names, access tokens, etc.
YAML Checker With Clear Errors
First, the validator will parse your file exactly like a real parser. When the validator detects an error in your file, it will indicate what line the error occurred on. It will also give you a clear description of the issue using everyday language, for example, "a tab was used for indenting," or "there is a missing closing bracket."
Every error comes with a button called Show me where. It selects the spot in your text. So you fix it in seconds, not minutes. Then the check runs again on its own.
When the file is valid, you still get notes. The notes list risks, such as unquoted yes and no, anchors, comments and trailing spaces.
For more detail, see: YAML 1.2 specification.
YAML Formatter Online
First, run Format to clean up the file. The formatter will rewrite the file using either two or four spaces for indentation. The formatter will also enclose in quotes those values which need them, and it will maintain block text as a block.

You may arrange the keys in alphabetical order (from A to Z). Arranging the files in this manner makes them simple to check and review. In addition, the tabs and trailing spaces will disappear. You will then be able to copy the modified file back into your project.
The online YAML format tool processes your entire document before writing anything. As a result, there will be no incomplete or broken output. Instead, if there is a mistake in the YAML, you will get an error message.
YAML Viewer Online As A Tree
Long YAML is hard to read. So the tree mode shows it as branches. After that, expand only the section you need. Each key opens and closes, and the number of items shows beside it.

You’ll find that strings, numbers, and booleans each have a different color. This means you can easily tell what the parser believes every single value represents.
Parse YAML To JSON
Many tools want JSON, not YAML. So parse mode converts the file at once. The tool expands anchors and merge keys, so the JSON holds the final values.

Then you can copy the JSON or save it as a file. Sorting works here too.
YAML To Base64 And Back
Kubernetes secrets and many CI tools store files as Base64. So this mode encodes your YAML, and it decodes Base64 back to YAML. Also, it works with Unicode text, such as accents and emoji. With the URL-safe option, the plus and slash characters are replaced.

The decoded text will be checked by the tool. A message will appear if the text isn’t in a valid format of YAML.
The Yes And No Gotcha
YAML 1.1 treats “yes,” “no,” “on,” and “off” as booleans (true/false). YAML 1.2 treats these words as text. As a result, the same document may be interpreted differently by two different programs. This difference in interpretation can cause one deployment to succeed and another to fail.
The typical example of this problem is the country code NO that becomes FALSE when parsed. The validation tool will inform you and recommend using quotes around all your input. In every parser, using quotes around inputs guarantees that they will be treated as text.
Indentation Rules
YAML relies on spaces to show its structure. YAML forbids tabs. Every child must sit deeper than its parent, and siblings must line up exactly.
The tool will find both errors and give the line number where they occur. So, you do not have to manually find a stray space.
Also, a key and its value must be separated by a space after the colon. A list item must be separated by a space after the dash. These simple rules result in many mistakes, and the tool finds each of them.
Watch the YAML Validator in Use
This brief video shows each step from start to finish. Choose your language below, and switch on captions if they help.
Using The YAML Validator Online, Step By Step
Four steps take you from raw YAML to a clean, checked file.
Paste your YAML
Paste it, open a file, or load the sample. The validator checks it the moment you paste.
Read the verdict
It tells you straight away whether the YAML is valid. Errors show the line, and notes list risks.
Pick a mode
Format it, view a tree, parse to JSON, or encode as Base64.
Copy or save
Copy the output here, or save it as a file with the right extension.
What This YAML Validator Does Differently
Many validators only say valid or invalid. These are the extras.
Exact lines
Every error names the line, and a button selects it in your text.
Smart notes
Warns about yes and no, leading zeros, tabs, anchors and comments.
Five modes
Validate, format, view a tree, parse to JSON, and Base64.
Several documents
A file with several documents gets a picker, so you check each one.
Safe by design
No eval and no remote tags. Aliases expand, and nothing runs.
Nothing leaves your tab
The work will occur within your own web browser. Your YAML files are private to you, and we store none of your data.
Habits For Writing Safer YAML
Small habits keep config files readable and safe.
- Use spaces, never tabs. Make sure that your editor uses spaces rather than tabs when you enter text. A common setting for this is two spaces per indent.
- Keep one indent size. Mixed indents cause the most confusing errors. Pick two or four and stay with it.
- Quote ambiguous values. Quote yes, no, on, off, and codes such as NO. Then every parser agrees.
- Quote numbers that are codes. ZIP codes, versions and phone numbers lose zeros as plain numbers.
- Always put a space after every colon in YAML. The text key:value is one string. The text key: value is a pair.
- Use block text for long strings. A pipe keeps the line breaks. A greater-than sign joins lines into one.
- Avoid duplicate keys. Most parsers keep the last one and hide the first. The tool warns you.
- Comment the why. A short comment saves the next person an hour. Remember that formatting drops comments.
- Validate before you deploy. A one second check beats a failed pipeline.
- Sort keys in shared files. Sorted keys make diffs short and reviews easy.
- Keep secrets out. Never paste real passwords or tokens into any tool. Use test values.
Common YAML Mistakes This Tool Catches
Each of these breaks a deploy or changes your data. The validator finds them.
Tabs in the indent
YAML forbids tabs. The validator points to the exact line with the problem.
Uneven indentation
A key that sits one space off breaks the structure. The tool shows where.
Unquoted yes and no
They may turn into true and false. Quotes fix it.
Leading zeros
The value "0755" could be an octal. Please use quotation marks around the value if you intend for the value to represent a code.
Unclosed brackets
A bracket or quote that never closes hides the rest of the file.
Forgetting the space that should follow a colon
Without the space, the line is plain text and not a key.
YAML Validator Questions People Ask
Is this YAML validator online free?
Yes. There are no costs, no accounts to create, and there are no limitations. Since your computer’s browser is doing most of the work for us, we do not need to charge you for using our servers.
Does the YAML I paste ever reach a server?
No. Your browser reads and checks the file. Nothing reaches this site, and we keep nothing. Shut the tab, and every trace of it is gone.
Which YAML version does it read?
It reads the common core of YAML 1.2, with anchors, aliases, block text and flow lists. Notes warn you where YAML 1.1 tools may read a value differently.
How are errors shown?
You will get a simple message along with the number of the line. The Show Me Where button selects that location in your document.
What changes does the formatter make?
The file will be re-indented, values which need quotation marks will have them added, and any trailing spaces will be removed. In addition, you can choose to sort your keys alphabetically.
Why did the comments in my YAML disappear?
Formatting will create a new file based on the info in the original file, which contains no comments. You’ll get a message letting you know when that occurs.
Can it check Kubernetes or Docker Compose files?
This tool will verify that the syntax of your YAML files are correct. But this tool will not verify the validity of your fields within the context of Kubernetes (i.e. whether they exist or not).
How does it handle several documents?
A document separated by three hyphens shows you a list of choices. You select which document you wish to verify, reformat, or transform.
What is the yes and no warning?
In YAML 1.1, an unquoted yes or no means true or false. In YAML 1.2, it is text. The tool warns you so you can add quotes.
Does it understand anchors and aliases?
Yes. The tool will expand all of the variables in both the formatted output and in the JSON format. A notice will let you know if the file contains any variables.
How does the Base64 mode work?
It turns your YAML into Base64 text, or decodes Base64 back into YAML. A URL-safe option is there for tokens and URLs.
Can I safely paste a real config file here?
The program will save it on your computer. But always use test data instead of actual secret info when entering data into a website.
What is the largest file it can check?
Files that are only a couple of MB will pass through easily. Larger files can sometimes take longer to load on a mobile device.
Why does the tool quote some values when it formats?
Some basic values like "y" or "null" may be interpreted differently depending on what parser is used. Quotes help make sure that these are treated as text and so will be processed identically by all parsers.
Can I validate a YAML file with only comments?
Yes, a file containing only comments is acceptable, has no content, and will be identified by the program as being empty.
Does it run on phones too, or only on desktops?
Yes. Panels stack and lists scroll. A keyboard will continue to be used for long files.
Handy Companions For Config Files
Checking is one step. These three tools handle the steps around it.
- YAML to JSON Converter
Turn YAML into typed JSON with a list of checks.
- JSON to YAML Converter
Write clean YAML from any JSON.
- Base64 Encoder and Decoder
Encode text, files and images, or decode them back.
Ready To Check Some YAML?
Just paste your file and find out what the verdict is. The validator is for free, needs no user account, and processes all of your data locally on your computer.