FormatterHQ

Data Converters

Convert data between JSON, XML, YAML, CSV, TSV, TOML, Excel, HTML and SQL, and convert markup, images, stylesheets and cURL commands.

.env to JSON Converter Convert .env (dotenv) files to JSON: handles quotes, export, comments, multi-line values and ${VAR} expansion. .env to YAML Converter Convert .env files to YAML for Docker Compose, Kubernetes or CI configs, optionally nesting keys on a separator. BBCode to HTML Converter Convert forum BBCode such as [b], [url], [quote], [list] and [code] into clean, safe HTML markup instantly. BMP to JPG Converter Convert BMP images to JPG online for free. Fast, private, in-browser conversion with preview and size comparison. BMP to PNG Converter Convert BMP images to PNG online for free. Fast, private, in-browser conversion with preview and size comparison. CSS to LESS Converter Convert CSS to LESS online. Rules sharing a selector are nested automatically. CSS to SASS Converter Convert CSS to SASS online. Rules sharing a selector are nested automatically. CSS to SCSS Converter Convert CSS to SCSS online. Rules sharing a selector are nested automatically. CSS to Stylus Converter Convert CSS to Stylus online. Rules sharing a selector are nested automatically. CSV Converter Convert CSV to JSON, XML, YAML, TSV, HTML, SQL or Markdown from a single page, with automatic delimiter detection. CSV to Excel Converter Convert CSV to Excel online for free. Download a real .xlsx workbook generated in your browser. CSV to HTML Table Converter Convert CSV to HTML online for free. Get clean table markup with a live preview. CSV to JSON Converter Convert CSV to JSON online for free. Get formatted JSON with types detected automatically. CSV to Multi-line Data Converter Convert CSV to Multi-line Text online for free. Every value on its own line, record by record. CSV to PDF Converter Convert CSV to a printable PDF table: header row on every page, fitted and wrapped columns, A4, Letter or Legal, page numbers. Made in your browser. CSV to SQL Converter Convert CSV to SQL online for free. CREATE TABLE and INSERT statements with escaped values. CSV to TSV Converter Convert CSV to TSV online for free. Paste the result straight into a spreadsheet. CSV to XML Converter Convert CSV to XML online for free. Attributes, arrays and root element are configurable. CSV to YAML Converter Convert CSV to YAML online for free. Clean, readable YAML with configurable indentation. cURL to Axios (Node.js) Converter Convert curl commands to Node.js axios requests with params, headers, JSON data, auth, form-data uploads and timeouts. cURL to C# Converter Convert curl commands to C# HttpClient code for .NET with headers, content types, basic auth, multipart and TLS options. cURL to Go Converter Convert curl commands into Go code using net/http — method, headers, JSON or form body, basic auth, timeouts and multipart uploads. cURL to Java Converter Convert curl commands to Java 11+ java.net.http.HttpClient code with headers, body, redirects and timeouts. cURL to JavaScript Fetch Convert curl commands into JavaScript fetch() code with method, headers, JSON body, form data, basic auth and timeouts. cURL to PHP Converter Convert curl commands into PHP code using the curl_* functions: method, headers, body, auth, cookies and SSL options. cURL to PHP Guzzle Converter Convert curl commands to PHP Guzzle requests using json, form_params, multipart, query and auth options. cURL to Python Requests Convert curl commands into Python requests code: headers, params, JSON or form data, files, cookies, auth and timeouts. cURL to Rust Converter Convert curl commands to Rust using the reqwest crate, with JSON bodies via serde_json, headers, auth and timeouts. Docker Run to Docker Compose Convert one or more docker run commands into a docker-compose.yml: ports, volumes, env, restart, networks, healthchecks and more. Excel to CSV Converter Convert Excel to CSV online for free. Nested data is flattened into columns. Excel to HTML Table Converter Convert Excel to HTML online for free. Get clean table markup with a live preview. Excel to JSON Converter Convert Excel to JSON online for free. Get formatted JSON with types detected automatically. Excel to XML Converter Convert Excel to XML online for free. Attributes, arrays and root element are configurable. GIF to BMP Converter Convert GIF images to BMP online for free. Fast, private, in-browser conversion with preview and size comparison. GIF to JPG Converter Convert GIF images to JPG online for free. Fast, private, in-browser conversion with preview and size comparison. GIF to PNG Converter Convert GIF images to PNG online for free. Fast, private, in-browser conversion with preview and size comparison. GraphQL to TypeScript Generate TypeScript interfaces, enums and union types from a GraphQL schema (SDL), with nullability and argument types. HEIC to JPG Converter Convert iPhone HEIC photos to JPG (or PNG) in your browser — several at once, with quality control and a ZIP download. Nothing is uploaded. HTML Table to CSV Converter Convert HTML to CSV online for free. Nested data is flattened into columns. HTML Table to JSON Converter Convert HTML to JSON online for free. Get formatted JSON with types detected automatically. HTML Table to TSV Converter Convert HTML to TSV online for free. Paste the result straight into a spreadsheet. HTML Table to XML Converter Convert HTML to XML online for free. Attributes, arrays and root element are configurable. HTML Table to YAML Converter Convert HTML to YAML online for free. Clean, readable YAML with configurable indentation. HTML to BBCode Converter Convert HTML into forum-friendly BBCode: bold, links, images, lists, quotes, tables, code blocks and inline colours. HTML to Jade Converter Turn HTML into Jade syntax for legacy .jade views, using only markup that also keeps working after an upgrade to Pug. HTML to JSX Converter Convert HTML markup to valid JSX for React: className, htmlFor, style objects, self-closing tags and comments handled automatically. HTML to Markdown Converter Convert HTML to clean Markdown: headings, lists, links, images, code blocks, tables and strikethrough, with style options. HTML to PHP Converter Convert HTML into PHP echo statements, a string variable or a heredoc block with every quote and dollar sign safely escaped. HTML to Pug Converter Convert HTML to Pug template syntax: indentation-based tags, #id and .class shortcuts, attributes and text blocks. HTML to Text Converter Extract readable plain text from HTML: keeps paragraphs, headings, lists and tables, drops tags, scripts and styles. Image Resizer Resize images to exact pixel dimensions in your browser. Keep the aspect ratio, change format and compare file sizes. Image to ASCII Art Converter Turn any photo or logo into ASCII art. Choose the width and character set, preview it in colour and copy the text. Image to Text (OCR) Extract text from images, screenshots and scanned PDFs with OCR in 28 languages. Edit, copy or download it, or make a searchable PDF. No upload. INI to JSON Converter Convert INI configuration files (php.ini, .gitconfig, setup.cfg style) to JSON with sections, arrays and typed values. Jade to HTML Converter Render legacy .jade templates to HTML and find the deprecated Jade syntax to fix before moving to Pug or plain HTML. JPG to BMP Converter Convert JPG images to BMP online for free. Fast, private, in-browser conversion with preview and size comparison. JPG to PDF Converter Combine JPG, PNG and other images into one PDF, one image per page. Choose A4, Letter or image-sized pages and margins. Runs in your browser. JPG to PNG Converter Convert JPG images to PNG online for free. Fast, private, in-browser conversion with preview and size comparison. JPG to WEBP Converter Convert JPG images to WEBP online for free. Fast, private, in-browser conversion with preview and size comparison. JSON Flatten Flatten nested JSON into single-level key paths like user.address.city, with dot, custom or bracket notation for arrays. JSON to .env Converter Turn JSON configuration into .env KEY=value lines with nested keys joined by __ and values quoted safely. JSON to CSV Converter Convert JSON to CSV online for free. Nested data is flattened into columns. JSON to Excel Converter Convert JSON to Excel online for free. Download a real .xlsx workbook generated in your browser. JSON to HTML Table Converter Convert JSON to HTML online for free. Get clean table markup with a live preview. JSON to INI Converter Convert JSON objects to INI files: nested objects become [section] and [section.sub] headers, arrays become key[] lines. JSON to JSONL Converter Convert a JSON array to JSON Lines (JSONL / NDJSON), one record per line, for streaming, logging, BigQuery and ML datasets. JSON to PHP Array Converter Convert JSON to a PHP array literal with short [] or array() syntax, ready to paste into Laravel config files, seeders and tests. JSON to Properties Converter Convert JSON into Java .properties key=value lines with dotted keys and correct escaping of special and non-ASCII characters. JSON to Query String Build URL-encoded query strings from JSON objects, with a choice of bracket, indexed or repeated keys for arrays. JSON to SQL Converter Convert JSON to SQL online for free. CREATE TABLE and INSERT statements with escaped values. JSON to Text Converter Convert JSON to Text online for free. Readable key: value output for reports and tickets. JSON to TOML Converter Convert JSON to TOML online for free. Tables and arrays of tables are generated for you. JSON to TSV Converter Convert JSON to TSV online for free. Paste the result straight into a spreadsheet. JSON to XML Converter Convert JSON to XML online for free. Attributes, arrays and root element are configurable. JSON to YAML Converter Convert JSON to YAML online for free. Clean, readable YAML with configurable indentation. JSON Unflatten Rebuild nested JSON from flat dot-notation keys (a.b.c) or bracket paths (a[0].b), the reverse of JSON flatten. JSONL to JSON Converter Convert JSON Lines (JSONL / NDJSON) into a formatted JSON array. Invalid lines are reported with their line number. LaTeX Math Renderer Render LaTeX math equations with KaTeX in a live preview and copy the MathML or HTML to use in web pages. LaTeX Table Generator Convert CSV, spreadsheet cells or JSON into LaTeX tabular code with captions, labels, borders or booktabs styling. LESS to CSS Converter Convert LESS to CSS online. Compiles variables, mixins and nesting into plain CSS. LESS to SASS Converter Convert LESS to SASS online. Rules sharing a selector are nested automatically. LESS to SCSS Converter Convert LESS to SCSS online. Rules sharing a selector are nested automatically. LESS to Stylus Converter Convert LESS to Stylus online. Rules sharing a selector are nested automatically. Markdown Table Generator Generate GitHub-flavoured Markdown tables from CSV, TSV, Excel cells or JSON, with column alignment and neat padding. Markdown to HTML Converter Convert Markdown to clean HTML online with GitHub Flavored Markdown: tables, task lists, fenced code and strikethrough. OPML to JSON Converter Convert OPML to JSON online for free. Get formatted JSON with types detected automatically. PDF to JPG Converter Convert PDF pages to JPG images (or PNG and WebP) at 72–300 DPI. Download single pages or all pages as a ZIP. Runs in your browser. PDF to PNG Converter Convert PDF pages to lossless PNG images with sharp text and lines, at 72–300 DPI. Download pages one by one or as a ZIP. No upload. PDF to Text Converter Extract all the text from a PDF, page by page, as plain text you can copy or download as .txt. Choose pages; works in your browser. PDF to Word Converter Convert PDF to an editable Word document (.docx) with paragraphs, headings, lists, tables and images, or keep the exact look. Free, in your browser. PNG to BMP Converter Convert PNG images to BMP online for free. Fast, private, in-browser conversion with preview and size comparison. PNG to JPG Converter Convert PNG images to JPG online for free. Fast, private, in-browser conversion with preview and size comparison. PNG to PDF Converter Turn PNG screenshots and graphics into a PDF, one image per page, without losing quality. Choose page size and margins. Runs in your browser. PNG to WEBP Converter Convert PNG images to WEBP online for free. Fast, private, in-browser conversion with preview and size comparison. Properties to JSON Converter Convert Java .properties files (Spring Boot, i18n bundles) to nested or flat JSON, decoding \uXXXX escapes and line continuations. Properties to YAML Converter Convert Spring Boot application.properties to application.yml, nesting dotted keys into a clean YAML tree. Pug to HTML Converter Compile Pug templates to HTML online: tags, #id/.class shortcuts, attributes, block text, interpolation and comments. Query String to JSON Parse URL query strings into JSON, including repeated keys, PHP/Rails bracket arrays (a[]=1) and nested objects (a[b][c]=1). RSS to JSON Converter Convert RSS to JSON online for free. Get formatted JSON with types detected automatically. SASS to CSS Converter Convert SASS to CSS online. Compiles variables, mixins and nesting into plain CSS. SASS to LESS Converter Convert SASS to LESS online. Rules sharing a selector are nested automatically. SASS to SCSS Converter Convert SASS to SCSS online. Rules sharing a selector are nested automatically. SASS to Stylus Converter Convert SASS to Stylus online. Rules sharing a selector are nested automatically. SCSS to CSS Converter Convert SCSS to CSS online. Compiles variables, mixins and nesting into plain CSS. SCSS to LESS Converter Convert SCSS to LESS online. Rules sharing a selector are nested automatically. SCSS to SASS Converter Convert SCSS to SASS online. Rules sharing a selector are nested automatically. SCSS to Stylus Converter Convert SCSS to Stylus online. Rules sharing a selector are nested automatically. SQL to CSV Converter Convert SQL to CSV online for free. Nested data is flattened into columns. SQL to HTML Table Converter Convert SQL to HTML online for free. Get clean table markup with a live preview. SQL to JSON Converter Convert SQL to JSON online for free. Get formatted JSON with types detected automatically. SQL to Laravel Migration Convert MySQL or PostgreSQL CREATE TABLE statements into Laravel Schema::create migrations with foreign keys and indexes. SQL to MongoDB Query Converter Translate SQL SELECT, INSERT, UPDATE and DELETE statements into MongoDB find(), aggregate() and update queries. SQL to XML Converter Convert SQL to XML online for free. Attributes, arrays and root element are configurable. SQL to YAML Converter Convert SQL to YAML online for free. Clean, readable YAML with configurable indentation. Stylus to CSS Converter Convert Stylus to CSS online. Compiles variables, mixins and nesting into plain CSS. Stylus to LESS Converter Convert Stylus to LESS online. Rules sharing a selector are nested automatically. Stylus to SASS Converter Convert Stylus to SASS online. Rules sharing a selector are nested automatically. Stylus to SCSS Converter Convert Stylus to SCSS online. Rules sharing a selector are nested automatically. SVG to CSS Data URI Encode SVG as an optimized URL-encoded data URI for CSS background-image or mask, with a Base64 version for comparison. Table to HTML Converter Convert CSV, TSV, Markdown or JSON data into a clean HTML table with optional CSS styling and a live preview. Tableizer: Excel to HTML Table Paste cells copied from Excel or Google Sheets and get a styled HTML table. Choose header colour, font and row striping. Text to HTML Converter Paste formatted text from Word, Google Docs or a web page, or type plain text, and get clean HTML code. Removes inline styles, classes and Word markup. TOML to JSON Converter Convert TOML to JSON online for free. Get formatted JSON with types detected automatically. TOML to YAML Converter Convert TOML configuration (Cargo.toml, pyproject.toml, config.toml) to readable YAML. TSV to CSV Converter Convert TSV to CSV online for free. Nested data is flattened into columns. TSV to JSON Converter Convert TSV to JSON online for free. Get formatted JSON with types detected automatically. WEBP to JPG Converter Convert WEBP images to JPG online for free. Fast, private, in-browser conversion with preview and size comparison. WEBP to PNG Converter Convert WEBP images to PNG online for free. Fast, private, in-browser conversion with preview and size comparison. Word to HTML Converter Convert Word .docx documents to clean, semantic HTML with headings, lists, tables, links and images — right in your browser. XML Converter Convert XML to JSON, YAML, CSV, TSV, HTML or plain text from one page. Attributes and repeated elements handled automatically. XML to CSV Converter Convert XML to CSV online for free. Nested data is flattened into columns. XML to Excel Converter Convert XML to Excel online for free. Download a real .xlsx workbook generated in your browser. XML to HTML Table Converter Convert XML to HTML online for free. Get clean table markup with a live preview. XML to JSON Converter Convert XML to JSON online for free. Get formatted JSON with types detected automatically. XML to Text Converter Convert XML to Text online for free. Readable key: value output for reports and tickets. XML to TSV Converter Convert XML to TSV online for free. Paste the result straight into a spreadsheet. XML to YAML Converter Convert XML to YAML online for free. Clean, readable YAML with configurable indentation. XML XSL Transform Apply an XSLT stylesheet to XML online and preview the result. Produce HTML, XML or text output from any XML document. YAML Converter Convert YAML to JSON, XML, CSV, TOML or an HTML table in one place. Anchors, aliases and multi-document files supported. YAML to CSV Converter Convert YAML to CSV online for free. Nested data is flattened into columns. YAML to Excel Converter Convert YAML to Excel online for free. Download a real .xlsx workbook generated in your browser. YAML to JSON Converter Convert YAML to JSON online for free. Get formatted JSON with types detected automatically. YAML to Properties Converter Convert application.yml / YAML into flat .properties key=value lines, with Spring-style [0] indexes for lists. YAML to TOML Converter Convert YAML to TOML with tables and arrays of tables — handy for Cargo, pyproject and Hugo configs. YAML to XML Converter Convert YAML to XML online for free. Attributes, arrays and root element are configurable.

Data converters for moving between formats

Every system seems to speak a different format: the API returns JSON, the finance team wants Excel, the legacy integration expects XML, the deployment needs YAML and the database wants SQL. These data converters translate between them in both directions, keeping structure and types intact as far as the target format allows.

Popular conversions

  • JSON ↔ CSV – JSON to CSV flattens arrays of objects into rows; CSV to JSON turns rows back into objects.
  • JSON ↔ XML – XML to JSON and JSON to XML bridge modern APIs and older systems.
  • JSON ↔ YAML – YAML to JSON shows exactly how a config file is parsed; JSON to YAML makes data readable.
  • Spreadsheets – Excel to JSON and CSV to Excel connect code with the tools business users work in.
  • Databases – CSV to SQL creates INSERT statements, and SQL converters turn dumps back into tables.
  • Markup – Markdown to HTML, HTML to JSX, Pug and BBCode converters handle documents and templates.
  • Images – converters such as PNG to JPG and the WebP converters change image formats in the browser.
  • Code – cURL to Python and its PHP and JavaScript siblings turn API examples into working code.

What to expect when converting

Formats are not equally expressive, so some conversions involve choices:

  • Hierarchy to table – JSON or XML with nested objects must be flattened for CSV, usually into dotted column names such as address.city.
  • Attributes – XML attributes have no JSON equivalent and are mapped to specially prefixed keys.
  • Types – CSV has no types, so numbers and booleans may come back as strings unless the converter detects them.
  • Comments – JSON has no comments, so comments in YAML or XML are lost when converting to JSON.

A useful habit is to convert a small sample first, check the result, and only then convert the full file.

Choosing a target format

Pick the format the receiving side handles best: JSON for web APIs and JavaScript, YAML for configuration humans edit, XML for systems with schemas and namespaces, CSV or Excel for people working in spreadsheets, and SQL when data goes straight into a relational database. When several would work, prefer the one with the fewest conversion steps; every extra hop is a chance to lose types or structure.

Round trips

Converting A to B and back does not always return exactly the original: formatting, key order, comments and number formats may change. When the round trip matters, compare the result with the diff checker or a structural JSON or XML diff.

All conversions run in your browser, so spreadsheets, exports and API responses with personal data are not uploaded to a server.

Frequently asked questions

How do I convert JSON to Excel?
Use JSON to Excel or JSON to CSV. An array of objects becomes rows, keys become column headers and nested objects are flattened into separate columns.
Why does my converted CSV have strange column names like address.city?
CSV cannot store nested data, so nested JSON objects are flattened into columns named after their path. Converting back to JSON restores the nesting.
Are conversions lossless?
Between data formats with equivalent features, yes. When the target format lacks a feature, such as comments or XML attributes in JSON, that information is mapped or dropped.
Is my data uploaded when converting?
No. The converters run in your browser, so the files and text you convert stay on your device.