Turning JSON into YAML, CSV, XML, HTML, or Base64
You arrive here with valid JSON data that needs to speak a different language. This page rewrites that JSON into the specific shape your destination system expects: YAML for configuration files, CSV for spreadsheets, XML for legacy services, HTML for human-readable reports, or Base64 for embedding into other payloads. The conversion happens instantly in your browser as you type or upload, letting you inspect the transformed data before committing to a download.
This tool is built for a specific hand-off: taking structured, nested JSON and flattening or reformatting it for a destination that cannot parse JSON natively. Because each output format has its own rules for how it handles nested objects, arrays, and empty values, the preview pane acts as your immediate feedback loop. If the data looks wrong on screen, you know before you export whether the structure will survive the trip to a config file or a spreadsheet.
How to Convert
The workflow is linear and fast.
- Provide the JSON: Either paste the raw JSON directly into the text area or drag a
.json file into the upload zone. - Select the destination format: Choose from YAML, CSV, XML, HTML, or Base64. This single decision determines how the tool structures your output.
- Review the live preview: The generated code updates instantly. Check the syntax and formatting of the first few lines to ensure the structural conversion matches your expectations.
- Download the result: When the preview looks correct, click "Convert output" to trigger a file download of the new format.
How the Formatting Works
Different output formats handle your data in fundamentally different ways. The tool applies these rules mechanically, so knowing them helps you anticipate the result:
- YAML & XML: These formats preserve the hierarchical structure of your JSON. If your JSON has nested objects, they will appear as indented keys (YAML) or nested tags (XML). This is best for configuration files and API payloads.
- CSV: CSV has no concept of hierarchy. If your JSON contains nested objects or arrays, the tool flattens this data. Nested keys might be combined with dots (e.g.,
address.city), or complex objects might be serialized as JSON strings within a single cell. Always check the header row and the data rows to ensure no information was lost in the flattening process. - HTML: This output generates a basic tabular representation of your data. It is useful for quickly checking data in a browser, not for embedding structured data into web pages.
- Base64: This encodes the entire JSON string into a safe text format. It is typically used to embed JSON data into headers or image files (like data URIs), where raw JSON characters would cause syntax errors.
A Note on Indentation: The tool offers an indentation control. This does not change the actual data or structure. It only alters the visual whitespace in the output text file. If you are converting for a machine, use minimal indentation to save space. If you are converting for a human to read, use standard 2-space or 4-space indentation.
When Things Go Wrong
Most conversion failures happen before the format change, not during it. If the tool rejects your input, it is almost certainly a syntax error in the source JSON, not a flaw in the converter.
- Syntax Errors: JSON is strict. Trailing commas, unquoted keys, or single quotes instead of double quotes will cause the parse to fail. Check your input for these common issues.
- Smart Quotes: If you copied JSON from a Word document or email, it might contain “smart quotes” (curved) instead of standard quotes (straight). Convert these to standard quotes before pasting.
- Nested Flattening Confusion: If your CSV output looks strange (e.g., one column is very long or empty), it’s likely because your JSON was nested. Remember that CSV flattens data. If a destination spreadsheet expects a specific flat structure, you may need to adjust your source JSON to match it before converting.
Use Cases & Checks
- Config File Migration: Converting a nested JSON schema into YAML is a common task for modern infrastructure tools. Check: Verify that the indentation depth matches the target tool’s requirements. A slight indentation error in YAML can break the entire parse.
- Spreadsheet Import: Converting a JSON array of objects into CSV allows you to open that data in Excel or Google Sheets. Check: Look at the first row (headers) and the first data row. Ensure that no nested objects have been dropped; they should be visible as strings or flattened columns.
- Embedding Data: Converting a small JSON payload to Base64 to include in a header or email. Check: Ensure the Base64 string is not broken by line breaks if the destination system does not support them.