MakeMyTxt

YAML Formatter

Paste YAML to reformat it with consistent indentation, minify it to flow style, or convert it to JSON. Parse errors point to the exact line and column.

Mode

Indent

How to use: format and convert YAML with MakeMyTxt

Paste YAML to clean up indentation, minify it to flow style, or convert it into JSON. Parse errors point to the exact line and column.

  1. 1

    Open the YAML Formatter

    Visit makemytxt.com/yaml-formatter. The page is static and works offline after the first visit — useful when you are editing on a plane or in a locked-down network.

  2. 2

    Paste your YAML

    Drop in a Kubernetes manifest, a GitHub Actions workflow, a docker-compose file, or any YAML snippet. Parsing runs with the js-yaml library entirely in your browser.

  3. 3

    Pick Format, Minify, or Convert to JSON

    Format re-emits your YAML with consistent indentation (2 or 4 spaces). Minify collapses everything to flow style (JSON-like braces) for tight storage. Convert to JSON produces a matching JSON document, which is useful when feeding YAML into tools that only speak JSON.

  4. 4

    Copy, download, or fix errors

    Any syntax error (a stray tab, a bad indent, a duplicate mapping key) is shown with the line and column of the failure. Clean output can be copied to the clipboard or downloaded as .yaml or .json depending on the chosen mode.

Frequently asked questions

Which YAML spec does this tool follow?
It uses js-yaml, which implements YAML 1.2 with the safe loader. That accepts standard scalars, sequences, mappings, block and flow style, anchors, and multi-document streams (--- separators). It does NOT execute custom tags like !!js/function — that would be unsafe for arbitrary input.
Why is my YAML being rejected when it "looks fine"?
The most common culprits are tabs (YAML requires spaces for indentation), trailing spaces after a colon, inconsistent indent width inside a block, and unquoted strings that happen to start with a reserved character like @, `, or %. The error message names the exact line and column so you can spot the issue fast.
Does "minify" produce valid YAML?
Yes. Minify emits flow style (inline braces and brackets), which is a valid subset of YAML and also happens to be valid JSON in most cases. It is the right choice when you need the smallest possible YAML payload, for example in a CI environment variable.
Is my YAML sent to a server?
No. Everything happens in your browser — the library, the parse, the format, and the JSON conversion. That matters when the document contains secrets, infrastructure paths, or anything covered by a confidentiality agreement.

Related tools