JSON/CSV/XML Formatter & Converter
Format JSON, CSV and XML, convert flat records and validate JSON against a local Draft 7 schema.
Make the structure clear.
IN YOUR BROWSER / PRIVATE INPUTHow to use the
JSON/CSV/XML Formatter & Converter
- 01
Choose the task
Select the relevant mode in the JSON/CSV/XML Formatter & Converter workspace. The controls describe the accepted input and output.
- 02
Declare the source
Paste the complete data and select JSON, CSV or XML. CSV needs a header row; XML must not contain a DTD or entity declaration.
- 03
Choose a destination
Select the output format and indentation. For spreadsheet delivery, keep formula escaping enabled when the data is untrusted.
The three formats represent different things
JSON carries typed values, arrays and objects. CSV carries rows and columns without a universal type system. XML carries elements, attributes and document structure. There is no single conversion that preserves every distinction in every direction.
This tool keeps CSV cells as strings, including leading zeroes. XML attributes use the @_ prefix in the intermediate object. JSON arrays become root/item elements when generating XML; JSON objects receive a root wrapper. XML input retains its element structure. These conventions make the output predictable rather than implying that every consumer uses the same mapping.
Keep a comma inside its CSV cell
A CSV file is not safely parsed by splitting on commas. The parser understands quoted cells and reports inconsistent field counts. Duplicate or empty headers are rejected because they would make object keys ambiguous. Nested JSON objects must be flattened before CSV export; the tool will not silently discard them.
[{"name":"Outgle","note":"design, development"}]name,note
Outgle,"design, development"What a failed conversion is telling you
| Check | Meaning | Action |
|---|---|---|
| JSON syntax | Invalid quotes, commas or structure | Use double-quoted keys and remove trailing commas. |
| CSV field count | A row disagrees with the header | Check quoting and delimiters around that row. |
| XML declarations | DTD/entity declarations are unsupported | Supply a self-contained document without those declarations. |
| Nested CSV values | Objects or arrays cannot occupy ordinary cells here | Choose a flattening rule before export. |
Send data that the next system can use
Test a small sample
Confirm the receiving system’s header names, attribute mapping and root convention before converting a full dataset.
Preserve identifiers as text
Postal codes, account references and product IDs often contain meaningful leading zeroes. Do not infer numeric types casually.
Review spreadsheet formulas
Formula-like cells can execute when opened in a spreadsheet. Escaping prefixes an apostrophe and intentionally changes those cell values.
Syntax validation is only the first check
The tool parses both inputs, checks the schema against the bundled Draft 7 meta-schema, then validates the data. A syntax error means the text cannot be parsed. An invalid schema means the rules themselves are malformed. A validation failure means the JSON parses but does not satisfy those rules.
This is data-contract validation. It does not determine whether Schema.org properties qualify a page for search features. Use it when a service expects a numeric quantity, a required customer identifier or an array with a defined item type. It does not coerce strings into numbers, fetch remote references or prove that an address or product claim is true.
Why a numeric string fails an integer rule
Suppose an inventory export must contain a whole-number quantity of at least one. The quoted value below is a string, even though it looks numeric. Changing the value to a JSON number fixes this specific failure without weakening the schema.
Data: {"quantity":"3"}
Schema: {"type":"object","required":["quantity"],"properties":{"quantity":{"type":"integer","minimum":1}},"additionalProperties":false}Data: {"quantity":3}
Result: valid against the same schemaTranslate validation errors into repairs
Several failures can describe the same underlying problem, especially inside anyOf or oneOf. Start with the earliest meaningful nested path. A large error count does not necessarily mean there are that many independent defects.
| Constraint | What to inspect | Typical repair |
|---|---|---|
| required | The property is absent, not merely empty. | Supply the missing field or confirm it is optional. |
| type | A string, number, array or object differs from the rule. | Fix the producer's serialization. |
| minimum / maximum | A numeric value is outside the permitted range. | Check units and boundary conditions. |
| additionalProperties | An undeclared field appears where extras are forbidden. | Correct a misspelled key before widening the schema. |
| items / enum | An array item or allowed value does not match. | Inspect the nested path and exact spelling. |
Make the contract useful beyond one successful test
Test the boundaries
Keep a valid fixture, a missing-field fixture and one value on each numeric boundary. A schema that accepts your happy path may still accept data you intended to reject.
Keep references local
The validator does not retrieve external $ref URLs. Use an in-document definition and a local fragment reference, or resolve your schema dependencies before pasting.
Reduce an oversized failure
The worker stops after three seconds and input is bounded. Isolate a smaller failing object when recursive rules or complex regular expressions exceed that budget.
JSON/CSV/XML Formatter & Converter:
questions, answered.
Does CSV to JSON preserve numbers and leading zeroes?
CSV cells remain strings. This preserves identifiers such as 00123 and avoids guessing types; convert selected fields explicitly in your application.
Why can nested JSON not be exported directly to CSV?
CSV is a table. Choose which nested fields become columns or separate tables, then provide flat objects rather than losing structure silently.
How are XML attributes represented in JSON output?
Attribute keys use @_ before their names. This is the tool’s explicit mapping convention, not a universal XML-to-JSON standard.
Does this formatter fetch external XML entities?
No. DTD and entity declarations are rejected, and conversion runs locally in a worker without resolving external document resources.
Does this validator support JSON Schema 2020-12?
No. This interface targets Draft 7. A declared incompatible dialect is rejected. Keywords introduced later, such as unevaluatedProperties, should not be used as if they had Draft 7 semantics.
Why does an empty object pass when I listed properties?
The properties keyword validates values when those properties are present. Add a required array to require their presence. Use additionalProperties: false separately if undeclared keys must fail.
Can I validate private API responses without uploading them?
Validation runs in a disposable browser worker. The JSON and schema are not sent to the URL-audit service. Avoid pasting secrets into any shared device or browser session.
Does downloading validated.json repair my data?
No. The download formats the submitted JSON; it does not silently correct failures. Read the validation status before using the exported document.
The calculations and checks above describe this tool's implementation. Use these primary references for the underlying formats and publishing guidance.
JSON specification ↗ (opens in a new tab)CSV format ↗ (opens in a new tab)JSON Schema object constraints ↗ (opens in a new tab)Draft 7 specification ↗ (opens in a new tab)Put JSON/CSV/XML Formatter & Converter to work.
Format JSON, CSV and XML, convert flat records and validate JSON against a local Draft 7 schema.
Use the JSON/CSV/XML Formatter & Converter↑