How to Fix the YAML Norway Problem (NO/YES/OFF Preserved)
💡 Pro Tip: With YAMLforge Pro, you get unlimited conversions to handle any workload. No more daily limits!
You paste some YAML into a converter. Country code NO becomes false. Your app crashes in production. Norway didn't ask for this.
→ Related: Convert YAML to JSON Instantly (Free Online Tool)
Meet YF-kun 🤖 — I'm your guide through the weird world of YAML edge cases! I've seen the Norway Problem break everything from config files to deployment pipelines. Stick with me and I'll show you how to actually fix it.
😅 YF-kun: Config file debugging at 2am hits different. We've all been there.
😅 YF-kun: I once watched a senior dev spend three hours debugging why Norwegian users couldn't log in. Turns out the country filter was checking for the string "NO" but getting boolean false instead. The look on his face when he figured it out...
What is the YAML Norway Problem?
The Norway Problem happens when YAML parsers interpret certain strings as boolean values. Country code NO becomes false. Environment variable YES becomes true. Toggle setting OFF becomes false.
This isn't a bug—it's in the YAML 1.1 specification. The spec defines 22 different ways to write booleans, including no, NO, yes, YES, off, OFF, on, and ON. Great for flexibility, terrible for actual data.
When you convert YAML to JSON, these strings get transformed into booleans. Your API expects "country": "NO" but receives "country": false. Data validation fails. Queries break. Users in Norway, Yemen (YE... wait, that one's fine), and Oman (OM... also fine, somehow) mysteriously can't access your service.
🔗 API Access: Integrate YAML conversion into your workflow with Pro API.
🤔 YF-kun: Fun fact—this affects more than just country codes. I've seen it break feature flags (ON/OFF), survey responses (YES/NO), and even chess notation (O-O for castling). YAML 1.2 fixed this by restricting booleans to just true/false, but good luck getting every tool to upgrade.
How the Norway Problem Breaks Your Config
Let's see it in action. Here's some innocent-looking YAML:
defaults:
country: NO
consent: YES
notifications: OFF
environment: PRODUCTION
Most converters will give you this JSON:
{
"defaults": {
"country": false,
"consent": true,
"notifications": false,
"environment": "PRODUCTION"
}
}
Notice how PRODUCTION stayed as a string, but NO, YES, and OFF all got converted? That's the Norway Problem in action.
⚠️ YF-kun: This is silent data corruption. No error message. No warning. Just wrong data that looks right until it doesn't. And it always seems to break on a Friday afternoon.
What you actually wanted:
{
"defaults": {
"country": "NO",
"consent": "YES",
"notifications": "OFF",
"environment": "PRODUCTION"
}
}
The Complete List of Problem Values
YAML 1.1 treats all of these as booleans:
True values: y, Y, yes, Yes, YES, true, True, TRUE, on, On, ON
False values: n, N, no, No, NO, false, False, FALSE, off, Off, OFF
💡 YF-kun: Case doesn't matter. Capitalization doesn't matter. If it matches one of these 22 strings, boom—boolean. I keep this list bookmarked because I still forget that lowercase 'n' is false. Who thought that was a good idea?
How to Fix the Norway Problem
Solution 1: Quote Your Strings in YAML
The simplest fix—wrap problem values in quotes:
defaults:
country: "NO"
consent: "YES"
notifications: "OFF"
Quoted strings won't be interpreted as booleans. Problem solved... if you control the YAML source.
🎯 YF-kun: This works great when you're writing YAML by hand. But what about YAML you're receiving from APIs, generated by tools, or inherited from that guy who quit six months ago? That's where you need a smarter converter.
Solution 2: Use a Norway-Problem-Aware Converter
YAMLforge detects potential Norway Problem values and preserves them as strings automatically. No manual quoting required.
🚀 Hit the daily limit? Upgrade to Pro for unlimited conversions and API access. $9/month.
Here's how it works:
Quick Steps:
- Paste your YAML into YAMLforge (even unquoted values like
NO) - Enable Norway Problem Protection (on by default)
- Convert and get properly preserved strings
- Copy your safe JSON
YAMLforge checks every value against the YAML 1.1 boolean list. If it matches, it stays as a string in the JSON output. Your country codes stay country codes. Your feature flags stay readable. Your configs stay correct.
🚀 YF-kun: And here's where it gets really useful—bulk conversion. Got 50 Kubernetes config files with unquoted ON/OFF values? YAMLforge Pro can process them all while preserving those strings. I've converted entire directories of Ansible playbooks this way.
Other Edge Cases to Watch For
Date String Corruption
YAML also auto-converts things that look like dates:
data:
version: 2024-01-15
release: 2023-12-01
Might become:
{
"data": {
"version": "2024-01-15T00:00:00.000Z",
"release": "2023-12-01T00:00:00.000Z"
}
}
⚠️ YF-kun: YAMLforge has Date Safe Mode for exactly this. Keeps your version numbers and release tags as plain strings. Because sometimes 2024-01-15 is just a version number, not a timestamp.
Number Format Issues
Octal notation can also surprise you:
config:
permissions: 0755
timeout: 0123
YAML 1.1 interprets numbers starting with 0 as octal. So 0123 becomes decimal 83. Not what you wanted if that was supposed to be a 123-second timeout.
→ See also: Best Kubernetes YAML Validators for Error-Free Deployments
💡 YF-kun: Quote these too if they're not actually octal. Or use a converter that handles this intelligently. Seeing a pattern here?
Why This Matters for Production Systems
The Norway Problem isn't just academic. Real-world impacts:
- Configuration files: Feature flags break when
ONbecomestruebut your code checks for the string"ON" - API responses: Country/region filtering fails for NO, Yemen territories, and others
- Infrastructure as Code: Terraform and Kubernetes configs with unquoted boolean-like values
- Data pipelines: ETL processes that convert between YAML and JSON
- CI/CD configs: GitHub Actions, GitLab CI files with environment variables
🎯 YF-kun: I've personally seen this cause production incidents at three different companies. Every time, someone says "but it worked in dev!" Yeah, because your dev config had country: "NO" with quotes, but production's config came from a generator that didn't quote it.
How YAMLforge Solves This
Privacy & Security
Your config files often contain sensitive data. YAMLforge processes everything client-side:
- Zero server uploads: Your YAML never leaves your browser
- Works offline: After first load, no internet needed
- No logging: We literally can't see your data
- No account required: Convert immediately, no signup
🎉 YF-kun: Client-side processing means you can convert production configs without worrying about data leaks. Your secrets stay secret. Your API keys stay on your machine. Your security team stays happy.
Features Comparison
| Feature | Free | Pro ($9/mo) |
|---|---|---|
| Daily Conversions | 10 | Unlimited |
| Norway Problem Protection | ✓ | ✓ |
| Date Safe Mode | ✓ | ✓ |
| File Size Limit | None | None |
| Bulk Conversion | ✗ | ✓ |
| Schema Validation | ✗ | ✓ |
| Priority Support | ✗ | ✓ |
| Offline Mode | ✓ | ✓ |
🚀 YF-kun: Schema validation in Pro is a lifesaver. Catches not just the Norway Problem, but also type mismatches, missing required fields, and format issues. It's like having a linter for your configs.
Best Practices for YAML Safety
- Always quote ambiguous strings when writing YAML by hand
- Use YAML 1.2-compliant parsers when possible (only true/false are booleans)
- Test your conversions with edge case values before deploying
- Document your expectations - specify whether values should be strings or booleans
- Use validation to catch problems early in the pipeline
🎉 YF-kun: That's it—you've got this. Go build something cool.
Frequently Asked Questions
Why does YAML convert NO to false?
YAML 1.1 specification defines 22 different boolean representations, including NO, YES, ON, OFF, and single letters like Y and N. It's intentional behavior, not a bug—but it breaks a lot of real-world data.
Does YAMLforge handle all 22 boolean variations?
Yes. YAMLforge detects all YAML 1.1 boolean values (y, Y, yes, Yes, YES, true, True, TRUE, on, On, ON, n, N, no, No, NO, false, False, FALSE, off, Off, OFF) and preserves them as strings when Norway Problem Protection is enabled.
Is this converter free?
Yes! 10 conversions daily with no signup required. Pro users ($9/month) get unlimited conversions, bulk processing, and schema validation.
Is my data safe when converting sensitive configs?
Absolutely. YAMLforge processes everything in your browser—your data never touches our servers. Works offline after first load. No accounts, no logging, no tracking.
What other tools have this problem?
Most online YAML converters, many JSON libraries, kubectl (Kubernetes CLI), and even some code editors with YAML plugins will convert NO to false unless configured otherwise. It's widespread.
Can I convert large files?
Yes, no file size limits even on the free tier. Everything processes client-side, so your browser's memory is the only constraint. I've personally converted 50MB config files without issues.
→ Learn more: Fix YAML Syntax Errors Fast: A Developer's Guide (2024)
Does this work for Kubernetes configs?
Definitely. Kubernetes manifests are YAML files, and they absolutely suffer from the Norway Problem. YAMLforge handles them perfectly, preserving your ConfigMap data and annotation values correctly.
Get Started Today
You now know:
- ✅ What the Norway Problem is and why it breaks configs
- ✅ All 22 YAML boolean values that cause issues
- ✅ How to prevent silent data corruption
- ✅ Best practices for safe YAML conversion
- ✅ When to quote strings and when to use smart tools
🎉 YF-kun: Ready to convert YAML without the headaches? Head to YAMLforge.com and try it free—10 conversions daily, no signup, and your Norwegian users will thank you. Go fix those configs!
Need unlimited conversions? Try YAMLforge Pro - unlimited access, API, priority support, and team features. $9/month with 30-day money-back guarantee.
Related Articles
- Convert YAML to JSON Instantly (Free Online Tool) - Read more → Tired of Chrome extensions that break your config files? YAMLforge converts YAML to JSON right in yo...
- Best Kubernetes YAML Validators for Error-Free Deployments - Read more → Deploying broken YAML to production? Kubernetes YAML validators catch syntax errors, schema issues, ...
- Fix YAML Syntax Errors Fast: A Developer's Guide (2024) - Read more → Stuck debugging YAML syntax errors? Learn the most common mistakes that break your configs and how t...
YAMLforge Team
Technical Content Team
The YAMLforge team is passionate about helping developers build better software.
Try YAMLforge Free
Convert YAML to JSON instantly with our free online tool. No signup required.
Try YAMLforge FreeRelated Articles
Convert YAML to JSON Instantly (Free Online Tool)
Tired of Chrome extensions that break your config files? YAMLforge converts YAML to JSON right in your browser - no installation, no data uploads, and it actually handles the Norway Problem correctly. Try 10 conversions free daily!
Best Kubernetes YAML Validators for Error-Free Deployments
Deploying broken YAML to production? Kubernetes YAML validators catch syntax errors, schema issues, and misconfigurations before they cause downtime. Learn which validation approach works best for your workflow.
Fix YAML Syntax Errors Fast: A Developer's Guide (2024)
Stuck debugging YAML syntax errors? Learn the most common mistakes that break your configs and how to fix them in seconds. Plus, discover a tool that catches errors before they hit production.