Intelligently merge multiple YAML files with deep merge, overwrite merge, and array strategy selection
Zero Dependencies ยท Works OfflineThe YAML Merger is a free online developer tool that intelligently merges multiple YAML files or configuration snippets. It supports three merge strategies: deep recursive merge for nested objects, overwrite merge, and shallow merge, along with three array handling modes: overwrite, deduplicate-and-merge, and append. Ideal for Kubernetes config management, Docker Compose multi-environment configs, and CI/CD pipeline configuration merging. All processing happens locally in your browser โ data is never uploaded to any server.
1. Paste your YAML content into YAML A and YAML B input areas. YAML C is optional.
2. Select a merge strategy: Deep merge for config inheritance, overwrite for environment overrides.
3. Select an array strategy: Overwrite replaces arrays, merge deduplicates, append concatenates.
4. Click "Merge" or press Ctrl+Enter to see the merged result in real-time.
5. Click "Copy Result" or "Download" to export the merged YAML/JSON.
Developers managing K8s configs can deep merge a base config (YAML A) with environment-specific overrides (YAML B), generating the final deployment config without duplicating full config files.
DevOps engineers use overwrite merge to combine docker-compose.yml with docker-compose.override.yml, automatically loading local development overrides.
DevOps teams merge generic CI configs with project-specific configs, reducing duplication and centralizing build process management.
YAML merging differs fundamentally from concatenation. Concatenation simply places two YAML documents together, while merging intelligently handles key conflicts. YAML 1.1 defines the merge key (<<) syntax for anchor merging, but deep merge is more flexible in practice. Deep merge follows the principle: objects are recursively merged, arrays follow the selected strategy, and scalar values are overwritten by the latter. Kubernetes Kustomize uses a similar deep merge mechanism called strategic merge patch, with additional field-level merge strategy controls.
Concatenation simply puts two YAML files together, while merging intelligently handles key conflicts with deep recursive merging and array strategy selection.
2-3 sources simultaneously. For more, separate with ---. We recommend no more than 20 for performance.
Three: Overwrite (replace with latter), Merge (deduplicate and merge), and Append (add without dedup).
Yes. All processing happens locally in your browser. Data is never uploaded and is destroyed when you close the page.
Primitive types follow the merge strategy (deep merge keeps latter). Objects are recursively merged. Arrays follow the selected strategy.
Yes. Drag YAML files onto the input area to auto-load content. Supports .yaml and .yml files.
Yes. Merged results are automatically formatted with 2-space indentation in standard YAML format.