Privvert - private browser-based file toolsPrivvert

JSON ↔ YAML ↔ TOML ↔ XML

Konvertera konfigurationsfiler

Om det här verktyget

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.

Funktioner

  • 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

Så använder du det

  1. Pick source and target formats.
  2. Paste your input.
  3. Copy the converted result.
🔒 100 % privat

Allt sker i din webbläsare med JavaScript och WebAssembly. Dina filer laddas aldrig upp, lagras aldrig och ses aldrig av oss.

Vanliga frågor

Why does TOML conversion fail sometimes?

TOML requires a top-level table (object). Arrays or scalars at the root aren't valid TOML. Wrap your data in an object first.

Will comments survive?

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).

How does XML conversion handle attributes?

Attributes become @-prefixed keys in JSON/YAML/TOML by convention. Pure-element XML round-trips cleanly; mixed content (text + child elements) needs manual cleanup.

What about JSON5 or HCL?

Currently the four formats listed. JSON5 (JSON with comments and trailing commas) and HCL (Terraform) are on the roadmap.

Why does my YAML number lose precision in JSON?

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.

Does it support comments in YAML or TOML?

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.