Data Converter - JSON, YAML, TOML & XML
Paste .env, JSON, YAML, TOML, or XML and convert it to the other formats in your browser. Detect, parse, and format config data with no upload.
This tool runs entirely in your browser. Your input is never uploaded.
Your processed result will appear here.
What does this data converter do?
This tool translates between the formats that show up most often in
configuration and data interchange: .env, JSON, YAML, TOML, and XML. Paste a
document in any of them, and the tool detects the source format and shows the
other four as switchable results. You never have to say which format you are
pasting.
How to use it
- Paste a document or upload a file. The source format is detected automatically.
- The Source format selector above the input defaults to Auto-detect and shows what was recognized. Change it only when the guess is wrong.
- Every other format appears as a target tab. Open a tab, then copy, download, or send the result back to the input.
- Adjust the indentation, key sorting, env prefix, or XML attribute handling as needed.
Because the conversion passes through a neutral value model, the result updates
as you type. JSON is valid YAML and compact KEY=value lines are valid TOML, so
the detector picks a sensible default and you can always override it.
Environment variables
A .env document is a flat list of KEY=value lines, including export
prefixes, single and double quotes, escapes, and multiline quoted values. Nested
keys use a double underscore, so {"database": {"host": "x"}} round-trips as
DATABASE__HOST=x. Arrays are stored as JSON strings and null becomes an empty
value. Uppercase keys and a key prefix can be applied, and comments are
dropped rather than preserved.
Format-specific behavior
- TOML has no null. A null object entry is dropped from TOML output because there is no way to represent it. A null inside an array is an error, since dropping it would change every following index.
- TOML and env documents need a table/object at the root, so a root array or a bare scalar cannot become TOML or env.
- XML attributes are represented with a configurable prefix (default
@). You can change the prefix or ignore attributes entirely when reading or writing XML. - Dates from TOML are preserved as ISO 8601 strings in JSON and env, and as native timestamps in YAML.
Errors are per target: if one format cannot represent the data, that tab shows a message while the others still produce output.
Privacy and security
Parsing and serialization run entirely in your browser with JavaScript. Nothing is uploaded to a server, no URL parameters are written, and the document is discarded when you close the page.
FAQ
Why did a key disappear from my TOML output?
That key held a null value. TOML has no null type, so a null object entry is dropped rather than converted into a misleading empty string.
Are comments in a .env or YAML file preserved?
No. The converter works on the parsed data model, so comments and blank lines are not carried over. Use a dedicated formatter when comment fidelity matters.
Why was my input detected as the wrong format?
JSON is also valid YAML, and compact KEY=value lines are valid TOML, so more
than one parser can accept the same text. The detector picks a default; use the
Source format selector to pick the format you actually meant.
Is there a size limit?
Input is capped at 1 MB, which comfortably covers configuration files while keeping the editor responsive.