JSON ↔ YAML ↔ TOML ↔ XML
Konverter konfigurasjonsfiler
Om dette verktøyet
Convert configuration and data between JSON, YAML, TOML and XML - any direction. Useful for migrating configs (Kubernetes YAML to JSON, package.json to TOML, XML legacy data to modern JSON), reading unfamiliar formats, or generating example configs in a different language.
Privvert preserves structure losslessly between formats that can express the same shape, and warns when a conversion would lose information. Runs in your browser.
Funksjoner
- JSON ↔ YAML ↔ TOML ↔ XML
- Lossless for structures that fit both formats
- Swap source and target with one click
- Pretty-printed output
- Inline error messages with line/column
- Browser-only - configs never uploaded
- Free and unlimited
- Round-trips between JSON, YAML, TOML and XML without losing types
Slik bruker du det
- Pick source and target formats.
- Paste your input.
- Copy the converted result.
Alt skjer inne i nettleseren din med JavaScript og WebAssembly. Filene dine lastes aldri opp, lagres aldri og ses aldri av oss.
Ofte stilte spørsmål
TOML requires a top-level table (object). Arrays or scalars at the root aren't valid TOML. Wrap your data in an object first.
JSON has no comments. YAML and TOML support them but Privvert strips them on conversion (they don't have a meaningful equivalent in the other formats).
Attributes become @-prefixed keys in JSON/YAML/TOML by convention. Pure-element XML round-trips cleanly; mixed content (text + child elements) needs manual cleanup.
Currently the four formats listed. JSON5 (JSON with comments and trailing commas) and HCL (Terraform) are on the roadmap.
JSON numbers are IEEE 754 doubles, so integers above 2^53 lose precision. If you have very large integers, mark them as strings in the source format to preserve every digit.
Comments are parsed but not preserved when converting to JSON (which has no comment syntax). When converting back to YAML or TOML, comments cannot be reconstructed - keep a copy of the original if comments matter to you.