Staaarter

JSON to Parquet Converter

Parses a pasted JSON array of objects, builds a column per key across the union of every object's fields, infers whether each column is boolean, numeric, or text, and writes an actual columnar Parquet file using the hyparquet-writer library. Entirely client-side, nothing is uploaded. A free online tool from Staaarter, right in your browser.

By Staaarter Team
csvparquetjsonconverter
Runs locallyUpdated 2026-08-06

Overview

Introduction

JSON is the easiest format to produce from an API or a script, but most analytics tools and data pipelines want Parquet, a compact, columnar format built for exactly that kind of workload.

JSON to Parquet Converter bridges the two: paste a JSON array of objects, get back a real .parquet file, with no server involved.

What Is JSON to Parquet Converter?

A client-side converter that parses a JSON array of flat objects, derives a column for every key that appears anywhere in the array, and writes those columns out as a genuine columnar Parquet file via the hyparquet-writer library.

It's the JSON-input counterpart to CSV to Parquet Converter, sharing the same underlying Parquet writer and a similar type-inference approach, just starting from structured JSON records instead of delimited text.

How JSON to Parquet Converter Works

The input is parsed with JSON.parse and validated: it must be a non-empty array where every element is a flat object (not an array, not a primitive). The union of every object's keys becomes the column list.

For each column, every object's value at that key is inspected: all-boolean becomes BOOLEAN, all-numeric (after trimming) becomes DOUBLE, anything else becomes STRING, missing keys are filled in as empty or null. Those typed columns are passed to hyparquet-writer's parquetWriteBuffer, which returns Parquet-formatted bytes synchronously.

When To Use JSON to Parquet Converter

Use this when you have JSON data, an API response, a script's output, a JSON Lines export you've turned into an array, and need it as Parquet for a downstream analytics tool or data lake.

It's also useful for quickly producing a Parquet test fixture from a handful of hand-written JSON objects, without installing a Python toolchain.

Features

Advantages

  • Handles the common case of ragged JSON records automatically, missing keys don't break the conversion, they just become empty cells.
  • Adds BOOLEAN inference on top of the DOUBLE-or-STRING rule, so true/false fields come out as proper Parquet booleans rather than text.
  • Runs entirely client-side, your JSON data never leaves the browser tab.

Limitations

  • Only flat objects are supported, nested objects or arrays as values are rejected rather than flattened or stringified automatically.
  • Type inference stays simple (BOOLEAN, DOUBLE, or STRING only), it won't infer dates, integers-vs-floats, or other Parquet types.

Examples

A JSON array with a boolean and a numeric column

Input

[
  { "id": 1, "name": "Ada", "active": true },
  { "id": 2, "name": "Grace", "active": false }
]

Output

converted.parquet (id written as DOUBLE, name as STRING, active as BOOLEAN)

Every id value parses as a number so that column becomes DOUBLE, every active value is a strict boolean so it becomes BOOLEAN, and name stays STRING.

Best Practices & Notes

Best Practices

  • Flatten nested objects yourself before pasting them in, for example turning {"address": {"city": "X"}} into a flat "address_city" key, since nested values are rejected outright.
  • If a numeric-looking field is coming out as STRING, check for a stray string value like "N/A" mixed in among the numbers for that key.
  • Use Parquet Schema Reader afterward to confirm the inferred column types actually match what you expected before relying on them downstream.

Developer Notes

convertJsonToParquet in json-to-parquet-converter.ts JSON.parses the input, validates it's a non-empty array of non-array objects, collects the ordered union of keys across every object, infers a BasicType (BOOLEAN, DOUBLE, or STRING) per key from the union of that key's present values, coerces each row's value to match (numbers via Number(), booleans via Boolean(), everything else stringified), and calls hyparquet-writer's parquetWriteBuffer({ columnData }) the same way csv-to-parquet-converter.ts does.

JSON to Parquet Converter Use Cases

  • Converting an API's JSON response into Parquet for a data warehouse or analytics pipeline
  • Turning a script's JSON output into a compact columnar file for downstream tools like DuckDB or pandas
  • Producing a small Parquet test fixture from hand-written JSON objects

Common Mistakes

  • Pasting an array containing nested objects or arrays as values, expecting them to be auto-flattened, they're rejected with an error instead.
  • Pasting a single JSON object instead of an array of objects, the input must be an array, even if it only has one row.

Tips

  • If your source is JSON Lines (one object per line) rather than a JSON array, wrap it in [ ] and join the lines with commas first.
  • Pair with Parquet Viewer afterward to confirm the inferred column types and row count match what you expected.

References

Frequently Asked Questions