Data Converters
Data moves between formats all day. An API returns JSON, a client sends a CSV export, a legacy PHP app keeps its config in arrays, and the deployment pipeline wants YAML. Rewriting that by hand is slow and error-prone, and pasting it into an unknown website is a security risk. Every converter on this page runs in your browser with JavaScript, so nothing you paste is uploaded, logged or stored.
The converters walk nested structures, so an object inside an array inside an object comes through intact. The CSV tools let you pick the delimiter (comma, semicolon, tab, pipe or a custom string) and handle quoted fields that contain commas or line breaks. The PHP tools accept both the classic array() syntax and the short [] syntax, and produce output you can paste into a config file as-is. Most converters also load a file from disk or fetch a URL, then copy or download the result.
Pick the target format by where the data goes next. Use JSON for APIs and JavaScript, CSV or XLSX for spreadsheets and analysts, YAML for configuration and CI pipelines, XML for SOAP and older enterprise systems, and PHP arrays for Laravel or WordPress config files.
-
JSON to PHP Array
Convert JSON to a PHP array in short [] syntax, ready to paste.
-
JSON to CSV
Convert a JSON array to CSV with the delimiter of your choice.
-
JSON to JavaScript
Convert JSON to a JavaScript object literal with unquoted keys.
-
JSON to YAML
Convert JSON to YAML for Kubernetes, Compose and CI config files.
-
JSON to Excel (XLSX)
Export a JSON array to an Excel .xlsx workbook.
-
JSON to XML
Convert JSON to XML, with arrays as repeated elements.
-
XML to JSON
Convert XML to JSON, keeping attributes and repeated elements.
-
CSV to JSON
Convert CSV to a JSON array of objects, with the header row as keys.
-
CSV to PHP Array
Convert CSV to a PHP array keyed by the header row.
-
CSV to JavaScript
Convert CSV to a JavaScript array of objects or arrays.
-
YAML to JSON
Convert YAML to JSON, with anchors and aliases resolved.
-
PHP Array to JSON
Convert PHP array() or [] literals to JSON without running PHP.
-
PHP Array to CSV
Convert a PHP array of rows to CSV for Excel or Google Sheets.
-
JSON to TypeScript
Generate TypeScript interfaces from a JSON sample.
-
JSON to Go Struct
Generate Go structs with json tags from a JSON sample.
-
JSON to Python Dataclass
Generate Python dataclasses, TypedDicts or Pydantic models from JSON.
-
JSON Schema Generator
Generate a JSON Schema from sample JSON, with formats and a required list.
-
CSV to SQL INSERT
Turn CSV rows into SQL INSERT statements, with an optional CREATE TABLE.
-
Excel (XLSX) to JSON
Convert Excel and ODS spreadsheets to JSON, with dates as ISO 8601.
-
Markdown to HTML
Convert Markdown into clean, sanitized HTML with GFM tables and task lists.
-
HTML to Markdown
Convert HTML back into Markdown, with pipe tables and your choice of bullets.
-
.env to JSON Converter
Convert .env files to JSON and back, following dotenv quote rules.
-
Number Base Converter
Convert between binary, octal, decimal, hex and any base up to 36.
-
CSV to Markdown Table
Convert CSV to a GitHub-flavored Markdown table with alignment and padding.
-
JSON to Markdown Table
Convert a JSON array of objects to a Markdown table.
-
Excel to HTML Table
Paste cells from Excel or Google Sheets and copy them as an HTML, Markdown or email table.
-
TSV to CSV Converter
Convert TSV to CSV, CSV to TSV, or change any CSV delimiter.
-
cURL to Code Converter
Turn a curl command into fetch, axios, Python, PHP or Go code.
-
HTML to JSX Converter
Convert HTML into React JSX with className, style objects and SVG fixes.
-
PHP Unserialize Online
Decode PHP serialize() data to JSON or print_r, and serialize JSON back.
Which tool for which job
-
Send an API response to someone who works in Excel
JSON to Excel (XLSX). They get a real .xlsx workbook, so nobody has to pick a delimiter or an encoding when they open it.
-
Load a CSV export into JavaScript or a JSON API
CSV to JSON. The header row becomes the keys, so each line of the file turns into one object.
-
Write a Kubernetes manifest or a Compose file from JSON
JSON to YAML. Kubernetes accepts JSON manifests too, but most teams keep these files in YAML so they can add comments.
-
Read a YAML config from a script that only parses JSON
YAML to JSON. Anchors and aliases are expanded, so the JSON shows the values the application receives.
-
Type an API response in TypeScript
JSON to TypeScript. The interfaces come from the sample you paste. Use a response that includes the optional fields, or they will be missing from the types.
-
Model an API response as Go structs
JSON to Go Struct. Each field gets a json tag, so Go's capitalized field names still map to the original keys.
-
Model an API response in Python
JSON to Python Dataclass. Choose dataclasses for plain code, TypedDict to type-hint existing dicts, or Pydantic when you also want validation at runtime.
-
Seed a database table from a spreadsheet
CSV to SQL INSERT. Each row becomes an INSERT statement, and the tool can write a CREATE TABLE for the columns as well.
-
Move a PHP config array into a JavaScript or Python project
PHP Array to JSON. The array literal is parsed as text, so you don't need PHP installed to convert it.
-
Inspect a serialized value from a WordPress database
PHP Unserialize Online. WordPress stores options and post meta with serialize(). This turns those strings into JSON you can read.
-
Turn a curl example from API docs into code
cURL to Code Converter. Pick fetch, axios, Python, PHP or Go and get the same request with its headers and body.
-
Reuse an HTML snippet inside a React component
HTML to JSX Converter. Attributes are renamed for React, such as class to className and for to htmlFor, and inline styles become objects.
-
Paste a spreadsheet range into an email or a web page
Excel to HTML Table. Cells copied from Excel or Google Sheets arrive as tab-separated text. This turns them back into a table you can paste or embed.
-
Write a Markdown table for a README
CSV to Markdown Table. The columns are padded so the raw Markdown lines up in a code review, and you can set the alignment.