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.

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.

Other tool categories

Specifications and references

This tool follows the specifications below. Read them when you need the exact normative wording, for example to settle an edge case between two implementations.

Frequently Asked Questions

Why does my CSV open in a single column in Excel?

Excel splits a CSV on the list separator from your system's regional settings. In regions that write decimals with a comma, which includes much of Europe and South America as well as Indonesia, that separator is a semicolon, so a comma-delimited file lands entirely in column A. Export with a semicolon delimiter, import the file through Data > From Text/CSV and choose the delimiter there, or send an .xlsx file instead.

Should a config file be JSON or YAML?

YAML allows comments and is easier to edit by hand, which is why Kubernetes, Docker Compose, GitHub Actions and GitLab CI use it. JSON is stricter, and JavaScript, Python, PHP, Go and Ruby parse it with their standard libraries, so it suits files that programs write and read. Nearly every JSON document is also valid YAML 1.2, so a YAML parser will usually accept JSON as it is.

How accurate are the TypeScript, Go and Python types generated from JSON?

They describe the sample you paste. A field that is null in the sample gives no clue to its real type, a field that is absent is missing from the output, and a whole number may be typed as an integer when the API sometimes sends decimals. Paste a response that includes the optional fields, then read the result before you commit it.

Copied to clipboard!