Fake Company Generator
Generate believable company names, domains and details for mockups.
Convert XML into clean JSON, with attributes and text handled predictably.
The XML to JSON converter maps attributes to @-prefixed keys, element text to #text or to the value directly, and repeated tags to arrays — the conventions most libraries use, applied visibly rather than silently.
Turning XML into JSON means answering three questions that have no single right answer, and this converter answers them the way most libraries do — visibly, so you are not surprised. Attributes become keys prefixed with @. An element's own text sits under #text when it also has children, and becomes the value directly when it does not.
A tag that appears once becomes a single value; the same tag repeated becomes an array. That is the behaviour that catches people out, because a document with one <item> and a document with three produce different JSON shapes. Type detection is optional: with it on, "42" becomes the number 42 and "true" becomes a boolean, which is usually what you want and occasionally is not.
The @ prefix keeps an attribute separate from a child element of the same name, which is otherwise a silent data loss.
The same tag twice produces an array. A tag appearing once cannot, which is a difference worth knowing before your code depends on it.
An element with both text and children keeps its text under #text rather than discarding one or the other.
Turn it on for real numbers and booleans, or off when a value such as 0700 must keep its leading zero.
A prefixed name such as soap:Body becomes the key "soap:Body", so nothing is quietly stripped.
A feed, a SOAP response, a config file or an export.
Choose the attribute prefix and whether to keep attributes at all.
Leave detection on for real numbers and booleans, or off to keep every value as a string.
The result is formatted and ready to paste into code or a test.
Because XML cannot express "this is a list of one". A tag appearing once becomes a value and the same tag repeated becomes an array — so code reading the result should handle both.
They become keys on the same object, prefixed with @ so they never collide with a child element of the same name. You can turn them off entirely.
Under the #text key when the element also has child elements or attributes. When it has neither, the text becomes the value directly.
Yes, as part of the key. An element named soap:Body becomes the key "soap:Body" rather than being stripped, so nothing is silently lost.
What people who use the XML to JSON think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the XML to JSON. It takes half a minute and no account.
Write the first reviewGenerate believable company names, domains and details for mockups.
Turn a URL query string into structured JSON, including nested and repeated keys.
Check YAML parses and find the line where the indentation goes wrong.
Generate prefixed API keys in the format modern providers use.
Re-indent a stylesheet, or strip it back to one line.
Generate cryptographically random version 4 UUIDs in bulk.
Work out the gap between two dates, in every unit including working days.
Your browser, engine, platform, languages and what it supports.