Convert YAML Between Versions & Formats
Standardize your YAML files by converting between different YAML specifications and formatting styles. Ensure compatibility and consistency across tools and teams with this free version converter.
YAML Version Converter
Convert YAML between version 1.1 and 1.2
Version Differences
- YAML 1.1: Supports octal (0777), sexagesimal numbers, more implicit types
- YAML 1.2: Based on JSON, stricter parsing, octal must use 0o prefix
How YAML Version and Format Conversion Works
YAML version conversion handles differences between YAML 1.1 and YAML 1.2 specifications. While mostly compatible, there are subtle differences in type inference, boolean values, and octal number handling that this tool manages.
Format conversion also includes style transformations: changing indentation, adjusting quoting rules, converting between flow and block style, and normalizing line endings for consistent output.
Key differences handled:
- YAML 1.1: yes/no, on/off are booleans; 1.2: only true/false
- YAML 1.1: leading zero means octal; 1.2: requires 0o prefix
- YAML 1.1: ~ means null; 1.2: also supports null and Null
- Indentation style and width normalization
Recommendation: YAML 1.2 is the current standard (ISO/IEC 19322). Use 1.2 for new projects unless you have specific compatibility requirements.
When You'd Actually Use This
Version compatibility
Ensure YAML works across tools. Some tools require specific YAML versions—convert to match your toolchain requirements.
Standardization
Standardize on YAML 1.2. Convert legacy YAML 1.1 files to current standard for consistency across projects.
Format normalization
Normalize formatting across team. Convert all YAML to consistent indentation, quoting, and style regardless of author.
Legacy system support
Support older YAML parsers. Some legacy systems only support YAML 1.1—convert modern YAML for compatibility.
CI/CD pipeline consistency
Ensure consistent YAML in pipelines. Normalize format to prevent spurious diffs and ensure predictable parsing.
Cross-platform sharing
Share YAML across platforms. Normalize line endings (CRLF vs LF) for clean cross-platform version control.
What to Know About YAML Versions
YAML 1.2 is the ISO standard. YAML 1.2 was published as ISO/IEC 19322 in 2014. It's the current standard and recommended for new projects.
Boolean values differ. YAML 1.1 accepts yes/no, on/off, true/false as booleans. YAML 1.2 only recognizes true/false as booleans.
Octal numbers changed. YAML 1.1: 0666 is octal. YAML 1.2: 0o666 is octal, 0666 is decimal. This affects file permission configs.
Most YAML is compatible. The vast majority of YAML works identically in both versions. Only edge cases with specific values differ.
Pro tip: Add %YAML 1.2 directive at the top of files to explicitly declare version. This helps parsers handle your YAML correctly.
Common Questions
What's the main difference between 1.1 and 1.2?
Main differences: boolean recognition (yes/no), octal number syntax (0666 vs 0o666), and some Unicode handling. Most YAML works in both.
Which version should I use?
Use YAML 1.2 for new projects—it's the ISO standard. Only use 1.1 if you have legacy tool compatibility requirements.
Does version affect my data?
Only for specific edge cases: values like "yes", "no", "on", "off", and numbers with leading zeros. Regular strings and structures are unaffected.
Can I change indentation style?
Yes. Convert between 2-space, 4-space, or tab indentation. Choose based on your project's style guide or team preferences.
What about line endings?
Convert between Unix (LF) and Windows (CRLF) line endings. Use LF for cross-platform projects, CRLF for Windows-only environments.
Does this validate my YAML?
Yes. The converter validates YAML during processing. Syntax errors are reported before conversion attempts.
Is my data secure?
Yes. All conversion happens locally in your browser. Your YAML content never leaves your computer.
Other Free Tools
YAML Validator
Free Online YAML Validator
YAML to JSON Converter
Convert YAML to JSON Online
JSON to YAML Converter
Convert JSON to YAML Online
YAML Formatter & Beautifier
YAML Formatter and Beautifier
YAML Minifier & Compressor
YAML Minifier and Compressor
ASCII to Hex Converter
ASCII to Hex Converter: Text to Hexadecimal Translator
Barcode Generator
Free Barcode Generator
Binary to Text Converter
Binary to Text Converter
Free Printable Calendar Maker
Create & Print Your Custom Calendar
Pie Chart Maker
Free Pie Chart Maker Online