Folders

How to open .YAML files (YAML config files) on Android, Windows and Linux

What .yaml, .yml and .toml files are and how to open and edit Docker Compose, GitHub Actions and Cargo config files for free on Android, Windows and Linux.

Cover: Folders' text editor on two phones, labelled .YAML

You need to change one line in a docker-compose.yml, check a GitHub Actions workflow, or bump a version in Cargo.toml, and you’re not at your usual computer. The phone doesn’t know these files, and Windows may suggest searching the Store for an app.

YAML and TOML files are plain text. Folders opens .yaml, .yml and .toml files in its text editor on Android, Windows and Linux, with colours for keys, values and comments, so you can read them and make careful edits.

What is a .yaml file?

YAML is a format for configuration and data that relies on indentation instead of brackets. Its name is a joke acronym, “YAML Ain’t Markup Language”. A YAML file is a set of keys and values, nested by indenting with spaces, with lists marked by dashes:

services:
  web:
    image: nginx:stable
    ports:
      - "8080:80"

You’ll find YAML behind a lot of modern tools: Docker Compose files, Kubernetes manifests, GitHub Actions workflows in .github/workflows/, Ansible playbooks, OpenAPI descriptions and Home Assistant’s configuration.yaml.

TOML (Tom’s Obvious, Minimal Language) was created by Tom Preston-Werner, a co-founder of GitHub, as a config format with fewer surprises. It looks like an INI file, with [sections] and key = value lines, but values have clear types: strings in quotes, numbers, booleans, dates, lists and tables.

Extension Language or format What it’s for
.yaml YAML Configuration and data; the spelling YAML’s own site recommends
.yml YAML Exactly the same format with a three-letter extension, common in Docker and CI files
.toml TOML Configuration: Rust’s Cargo.toml, Python’s pyproject.toml, Hugo and Netlify settings

How to open a .yaml file with Folders

On Android

  1. Download Folders from the download section and install it on Android 7.0 or newer.
  2. On first launch, tap Allow access and allow All files access.
  3. Browse to the file, or search for it by name.
  4. Tap it to open it in the text editor.

A config file attached to an email or message opens through Open with → Folders. Folders shows files whose names start with a dot on Android, so a project’s .github folder is visible straight away.

On Windows and Linux

  1. Install Folders with the Windows installer, or as a deb, rpm, AppImage, Flatpak, Snap or tar.gz package on Linux.
  2. Browse to the file in Folders and double-click it.
  3. On Windows, right-click the file in File Explorer and choose Open with → Folders. The installer adds Folders there for the types it opens.

On computers, folders such as .github are hidden at first. Turn on Show hidden files in Folders’ options to see them.

What you can do with it in Folders

  • YAML highlighting. Keys, # comments, quoted strings, numbers, and values like true, false, null, yes, no, on and off get their own colours. Anchors and aliases (&defaults, *defaults) and tags like !!str stand out too.
  • TOML highlighting. [section] headers, # comments, strings and numbers are coloured.
  • Watch the indentation. Document info shows the cursor’s column, which helps line a new key up exactly under its neighbours. It also shows the encoding and line endings.
  • Jump to an error. YAML parsers say things like “mapping values are not allowed here, line 14, column 9”. Go to line takes you to line 14.
  • Find and Find and replace, with Match case, to change an image tag, a port or a version everywhere at once.
  • Edit and Save with undo and redo, plus tabs for keeping a Compose file and its .env settings open together.

Folders doesn’t validate YAML or TOML or check them against a schema, so test the file with the tool that uses it.

Other ways to open .yaml files

  • Visual Studio Code with Red Hat’s YAML extension, which checks files against schemas for Compose, Kubernetes and GitHub Actions; for TOML, the Even Better TOML extension.
  • JetBrains IDEs such as IntelliJ IDEA or PyCharm, which understand both formats.
  • yamllint, a command-line checker for YAML mistakes and style.
  • Any plain text editor, as long as it inserts spaces rather than tabs.

Problems opening a .yaml file?

  • “found character that cannot start any token”. Often a tab. YAML doesn’t allow tabs for indentation, only spaces. Replace the tab with spaces matching the lines around it.
  • A value changes meaning. YAML guesses types for unquoted values. In older YAML 1.1 parsers, no and off become false (so the country code NO for Norway turns into false), and a version like 1.10 becomes the number 1.1. Put such values in quotes.
  • TOML complains about a duplicate key or table. A [table] can only be defined once, and so can each key in it. Find the name to see where it appears twice.

Questions people ask

.yaml vs .yml: what’s the difference? None. They’re the same format; .yaml is the official recommendation and .yml is a common shorter spelling.

How do I convert YAML to JSON? A tool such as yq does it from the command line (yq -o=json file.yaml), and many programming languages can load YAML and write JSON in a few lines. Folders doesn’t convert files.

Can I edit a docker-compose.yml on Android? Yes, if the file is on the phone. Open it in Folders, make the change, keep the indentation exact, and save. Then copy it back to the machine that runs Docker, for example over Wi-Fi.

YAML vs TOML: which should I use? It’s usually decided for you: Compose and Kubernetes use YAML, Cargo and pyproject.toml use TOML. TOML has fewer surprises; YAML handles deeply nested data more neatly.

For JSON, which YAML is closely related to, see how to open JSON files. For INI and .env files, read how to open INI and CONF files. Or see all 382 file types Folders opens.

Keep reading