WebBeautify

Convert JSON, XML, CSV, YAML, HTML, and Markdown

Converters keep the facts and change the wrapper: JSON to XML, JSON to CSV, CSV to JSON, YAML to JSON, HTML to Markdown, Markdown to HTML, JSON to PHP array, JSON to TypeScript. Illegal input stays creative — validate or pretty-print first.

{"id": 1}<id>1</id>id,1id: 1JSON to XML · CSV · YAML. Facts stay. Wrapper changes.
Converters tools

Why people convert JSON, CSV, and YAML

A legacy SOAP client wants XML. A test fixture wants JSON from a spreadsheet. A CMS still wants HTML from Markdown. JSON to TypeScript infers types from one sample (`{"n":1}` → `{ n: number }`) — tighten unions yourself. JSON to PHP array is short syntax you can drop into a config, not magic `json_decode`.

CSV to JSON uses the header row as keys. Quoted commas stay in one cell (`"Portland, Oregon"`). Excel `.xlsx` is a zip of XML — export CSV first. YAML to JSON is happy with maps, lists, and scalars; anchors and tags need a real YAML library. Quote `NO` if it is a country, not a boolean.

{"id": 1}<id>1</id>id,1id: 1JSON to XML · CSV · YAML. Facts stay. Wrapper changes.
Converters keep the facts and change the wrapper: JSON, XML, CSV, YAML.

How to convert without losing the plot

Start from valid JSON / well-formed XML / a real CSV rectangle. Convert is not a repair shop. HTML to Markdown keeps headings, links, lists, emphasis — design-system `class="btn"` usually disappears because Markdown is meaning, not your component library. Nested JSON to CSV has to flatten or stringify; trees do not enjoy becoming rectangles.

Tools in this hub

Questions about converters

Is JSON to XML lossless?

Facts usually survive; the wrapper changes. Arrays become repeating elements. Keys that are not XML names get sanitized. {"id":1} might become <id>1</id>. Attributes versus elements is a convention, not a law.

How does CSV to JSON work?

Header row becomes keys. name,cat plus HTML Minifier,minify becomes [{"name":"HTML Minifier","cat":"minify"}]. Fun fact: a field with a comma must be quoted — "Portland, Oregon" — or split-on-comma tutorials lie to you.

Can I convert Excel workbooks directly?

Export CSV first. .xlsx is a zip of XML, not a rectangle you paste. Converters want a table, not a binary workbook with three hidden sheets.

Does YAML to JSON keep anchors and tags?

Simple maps, lists, and scalars are the happy path. Anchors, merge keys, and typed tags belong in a real YAML library. If NO became false, quote it: country: "NO".

Will HTML to Markdown keep CSS classes?

Headings, links, lists, emphasis — yes. Design-system class="btn btn--teal" usually disappears. Markdown is meaning, not your component library. That is expected, not a bug.

JSON to TypeScript — can I use the types as-is?

It infers from one sample. {"n":1} becomes { n: number }, not n: 1 | 2. Tighten unions and optionals yourself. One payload is a sketch, not a contract.

JSON to PHP array — what does the output look like?

Short array syntax you can drop into a config: return ['ok' => true]; from {"ok":true}. Nested objects become nested arrays. It is a translation, not json_decode with extra poetry.

When should I not convert?

When the input is already illegal. Convert is not a repair shop. Validate or format first. Garbage in stays creative on the way out.