YAML and the Norway Problem (Why 'no' Becomes false)
The hard part of YAML is not indentation. It is that a value which looks obviously like a string is sometimes a boolean, a number or a sexagesimal integer, depending on which parser reads it.
Paste YAML. It is re-indented through a real parser, and the ambiguous scalars are flagged.

Workflow Lifecycle & Pipeline
Visual execution flow showing how YAML Formatter processes data directly in your local browser sandbox.
YAML Formatter Interactive Process Pipeline
Fast, zero-latency execution directly in your browser memory.
Before You Start
Ensure your source assets and browser environment meet the verified execution requirements.
Step-by-Step Instructions
Follow these verified steps to execute the task with YAML Formatter.
Paste your yaml
Type or paste into the yaml box on the page. YAML Formatter works on what is in it — there is no file to choose.
Paste a YAML document — a CI config, a Kubernetes manifest, an OpenAPI fileYAML read as you typeChoose your 4 settings
Indent (spaces) takes a number from 2 to 8, Sort keys alphabetically takes on or off and Wrap long lines at takes a number from 40 to 240, in steps of 10. 1 more sit below. Leave them alone and YAML Formatter uses 2, off and 120.
Indent (spaces) 2 · Sort keys alphabetically off · Wrap long lines at 120Watch the result change
There is no button on YAML Formatter: the result follows the input as you change it.
Updates as you typeYAML Formatter runs on your deviceCopy the answer
The answer sits at the top of the result panel with a copy button beside it. It never left your browser.
Copy the figureOn your clipboardUnder the Hood: Sandboxed WASM Execution & Isolated Web Workers
Development tools and code sandboxes execute inside sandboxed Web Workers with isolated thread runtimes. Code scripts cannot access DOM scopes, cookies, or local network interfaces, providing high security and bare-metal performance.
Real-Time Stdin Stream
Interactive inputs pipe directly into std::cin, sys.stdin, and ReadLine buffers via simulated virtual teletypes.
Zero Egress Guarantee
Algorithm logic, API keys, and test queries remain confined to the client virtual machine.
Near-Native CPU Performance
Precompiled WebAssembly modules execute with near-native JIT performance on V8 and SpiderMonkey engines.
Settings & Options Explained
Fine-tune quality, format, and compression parameters for your exact workflow.
Settings & Configuration Guide
| Setting | Recommended Value | How It Works & Impact |
|---|---|---|
| Indent (spaces) | 2 | Takes a number from 2 to 8. Impact: The control runs from 2 to 8; 8 is as far as it goes. |
| Sort keys alphabetically | off | Useful for diffing two configs; destroys a deliberate ordering. Takes on or off. Impact: Left off, which is what the tool does when you change nothing. |
| Wrap long lines at | 120 | Takes a number from 40 to 240, in steps of 10. Impact: The control runs from 40 to 240; 240 is as far as it goes. |
| Switch to inline style at depth | -1 | -1 keeps block style everywhere, which is what a config file wants. Takes a number from -1 to 6. Impact: The control runs from -1 to 6; 6 is as far as it goes. |
Best Practices & Key Considerations
Avoid common quality pitfalls and maximize output performance.
Expert Recommendations
- YAML 1.1 reads y, yes, n, no, on and off as booleans; YAML 1.2 reads them as strings. Both parsers are correct for their version, and a lot of tooling is still on 1.1 — which is why this is a live problem and not history.
- An unquoted number is already damaged before the formatter sees it. version: 1.10 is the float 1.1, perms: 0755 is octal 493, window: 22:22 is the integer 1342. Those are warned about, not corrected, because correcting them would mean guessing.
- YAML forbids tabs for indentation outright, and an editor shows a tab and four spaces identically. It is the commonest reason a file that looks right will not parse.
- A duplicate key is an error, but many parsers silently keep the LAST one — which is how an edit at the top of a file is overridden by a forgotten copy two hundred lines down.
- A round trip through a parser loses comments and blank lines. That is YAML round-tripping in general, so run this on a file you will review rather than blind in a pipeline.
Common Mistakes to Avoid
- Expecting Indent (spaces) to go past 8 — 2 to 8 is the range the control offers.
- Expecting Wrap long lines at to go past 240 — 40 to 240 is the range the control offers.
- Not noticing that Sort keys alphabetically starts off.
- Assuming the input is sent somewhere — YAML Formatter runs in this tab, and nothing you enter leaves it.
Troubleshooting & Fixes
Quick solutions for common browser constraints, format issues, and edge cases.
Troubleshooting & Common Issues
Indent (spaces) will not go above 8
Possible Cause: The control runs from 2 to 8.
Wrap long lines at will not go above 240
Possible Cause: The control runs from 40 to 240.
The result area stays empty
Possible Cause: YAML Formatter has nothing to work on until the input is filled.
Frequently Asked Questions
Everything you need to know about formats, privacy, and browser support.
Related Step-by-Step Guides
Explore companion workflows, optimization techniques, and verified tutorials.