.YML

YML File

YAML Ain't Markup Language file
Ask a question
QUICK ANSWER

A .yml file is a plain-text configuration or data file written in YAML (YAML Ain't Markup Language). Open it with any code editor - VS Code with the YAML extension is the best choice on any platform. The main thing to watch: YAML uses spaces for indentation and forbids tabs, so a whitespace-aware editor prevents the most common errors.

Developer: Clark Evans, Ingy döt Net, Oren Ben-Kiki (YAML spec) Category: Developer Files Open standard MIME: application/yaml
OPENS ON Windows macOS Linux Web
Related: .DO · .MD · .HEX · .XSD

On this page

19k+ extensions indexed
Last reviewed Jul 17, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the YML file format?

.yml is a plain-text file and a data interchange format. It is a standardized, platform-independent format that stores data as human-readable text, organized through an indentation-based key: value structure. .yml files can be read and written using YAML libraries available for virtually every major programming language. .yml and .yaml identify the same format - .yml is the older three-letter form retained by many tools such as docker-compose.yml, .gitlab-ci.yml, and GitHub Actions workflows. The format is most commonly used for data serialization and application configuration.

Serialization is a term used in computer science and refers to the concept of exchanging data between programs or applications using well-defined objects. An object can be understood as a data container. For example, database records are a form of data serialization as they can be easily exchanged between various databases. Serialized data can also take the form of structured files which can be sent between applications. Among the most widely used serialization formats are .yml, XML, JSON, and TOML.

A distinctive feature of .yml is its use of significant whitespace: indentation defines the document structure, and only spaces are permitted - tabs are explicitly forbidden by the specification. Documents may optionally open with --- (document start) and close with .... YAML also supports inline # comments, multi-line block scalars using | or >, and anchors (&) with aliases (*) for reusing repeated values.

Security & safety

RISK: MEDIUM

A .yml file is plain text and doesn't execute on its own, so reading one is safe. Two real risks: (1) config YAML (CI pipelines, Compose, K8s, Ansible) frequently contains secrets - tokens, passwords, keys - so don't paste it into untrusted online validators or commit it publicly. (2) Programmatic danger: loading untrusted YAML with an unsafe parser (e.g. PyYAML's yaml.load instead of yaml.safe_load) can execute arbitrary objects/code - always use the safe loader for files you don't trust. Editing risk: a tab or misaligned space silently changes meaning, so validate after editing.

Format details

in a nutshell
FULL NAMEYAML Ain't Markup Language fileaka YAML document, YAML file
DEVELOPERClark Evans, Ingy döt Net, Oren Ben-Kiki (YAML spec)since 2001 (YAML 1.0); YAML 1.1 (2005); current YAML 1.2 (2009, revised 1.2.2 in 2021)
MIME TYPEapplication/yaml
TYPEHuman-readable data-serialization text (indentation-based, UTF-8)
STANDARDOpen · royalty-free
This extension is also used by…
  • Strangereal IFL camera-map (rare) - A few legacy apps reused .yml for non-YAML data, but today the extension is virtually always YAML text.

Programs that open YML files

Windows3 apps
Windows Notepad Built-in Opens .yml as text for a quick look - but it doesn't show whitespace/tabs, so it's risky for editing indentation-sensitive YAML.
Notepad Open-source Open with YAML highlighting; enable View > Show Symbol > Show White Space to keep indentation correct.
Visual Studio Code Free Open the file; the Red Hat YAML extension gives highlighting, indentation guides and schema validation. Best choice for YAML.
macOS3 apps
TextEdit Built-in Format > Make Plain Text first and disable smart quotes - but it won't show whitespace, so prefer a code editor for editing.
Visual Studio Code Free Open and edit with the YAML extension (highlighting, schema validation). Recommended over TextEdit.
TextMate / BBEdit Open-source Open the .yml in a code editor for proper YAML highlighting and space-based indentation.
Linux3 apps
Vim Open-source Edit in the terminal; use ':set expandtab' so indentation uses spaces. Standard for server config.
Visual Studio Code Free Open and edit with the YAML extension; available as .deb/.rpm/flatpak.
GNOME Text Editor / gedit Open-source Open with YAML highlighting; set it to insert spaces (not tabs) before editing.
Web1 app
YAML Lint / online YAML validators Free Paste the file to validate syntax and pretty-print it. Don't paste secrets - config YAML often holds credentials.

Technical details

deep spec
MIME typeapplication/yaml (IANA-registered); legacy variants include text/yaml, text/x-yaml, application/x-yaml
EncodingUTF-8 (default and most common); UTF-16 and UTF-32 with BOM are permitted by the spec but rarely used in practice
File structureIndentation-based mappings (key: value), sequences (- item), and scalars; nesting is expressed purely by indentation level
Significant whitespaceIndentation defines structure; only spaces are allowed - tabs are explicitly forbidden by the YAML specification
Document markersOptional --- marks document start; ... marks document end; a single .yml file may contain multiple YAML documents separated by ---
Comment supportInline and full-line comments introduced by # - absent from JSON and most binary serialization formats
Native data typesString, integer, float, boolean, null, timestamp, and binary (base64-encoded via the !!binary tag)
Anchors and aliases& declares a reusable anchor; * references (aliases) it - eliminates copy-paste repetition in complex configuration files
Block scalars| (literal block scalar) preserves newlines as-is; > (folded block scalar) collapses newlines into spaces
JSON supersetSince YAML 1.2 (2009) every valid JSON file is also valid YAML, so YAML parsers can read JSON natively
Magic bytes / signatureNone - no binary header or magic number; identified by its indentation-based key: value structure and the .yml or .yaml extension
File size (typical)Bytes to tens of KB for configuration and CI/CD pipeline files; rarely exceeds a few hundred KB
Extension equivalence.yml and .yaml are identical in format; .yml is the three-letter DOS-era form adopted by docker-compose.yml, .gitlab-ci.yml, and GitHub Actions
Spec version directiveOptional %YAML 1.2 pragma at file start declares the spec version; most files omit it and rely on parser defaults
Released2001 (YAML 1.0); YAML 1.1 (2005); current YAML 1.2 (2009, revised 1.2.2 in 2021)
Latest versionYAML 1.2.2 (2021)
Open standardYes · royalty-free
Specificationyaml.org

YML conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with YML files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about YML files.

Frequently asked questions

What's the difference between .yml and .yaml?
None - they're the same YAML format with two extensions. .yml is the older 3-letter form. Use whichever the tool expects; you can simply rename the file.
How do I open a .yml file?
With any code/text editor. VS Code (with the YAML extension) is best because it highlights structure and flags indentation errors; Notepad++ and Sublime work too. Notepad opens it as text but won't show whitespace, which YAML cares about.
Why is my .yml giving an indentation/parse error?
YAML uses spaces for structure and forbids tabs, so a stray tab or misaligned line breaks it. Open it in a YAML-aware editor (show whitespace, convert tabs to spaces) or paste it into an online validator to find the line.
How do I convert .yml to JSON?
Use 'yq -o=json file.yml', a VS Code command, or an online converter. It's essentially lossless since JSON is a subset of YAML - only comments are dropped.
Can I use tabs in a .yml file?
No. YAML only allows spaces for indentation; tabs cause a parse error. Set your editor to insert spaces (':set expandtab' in Vim, 'translate tabs to spaces' in Sublime).
Is YAML only for Ruby/Python?
No - that's a misconception. YAML is language-independent and is used everywhere: Docker Compose, Kubernetes, GitHub Actions, Ansible, and apps in many languages. Ruby/Python just have popular YAML libraries.

References

1YAML 1.2.2 Specification (yaml.org)yaml.org
2yaml.org - official site & resourcesyaml.org

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.PARTPartial Download File
4.DATProgram Data File (generic)
5.EXEWindows Executable (Portable Executable)
6.BINCD/DVD Disc Image (BIN/CUE)
7.RPMSGRestricted Permission Message
8.NOMEDIAAndroid No-Media Marker File
9.MDMarkdown Document
10.TMPTemporary File

Related extensions

.DOStata Do-File
.MDMarkdown Document
.HEXIntel HEX File
.XSDXML Schema Definition
.MAPSource Map (JavaScript / CSS)
.CONFIGConfiguration File

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z