Converter

Convert Parquet to JSON

JSON is common in APIs, fixtures, and debugging workflows. It can represent nested values that would otherwise need flattening for a CSV file.

viewparquet converts a local Parquet file to JSON Lines in your browser with DuckDB-WASM, without uploading the dataset to viewparquet. Open the file, optionally shape the output with SQL, and export newline-delimited JSON with one value per row.

Updated August 21, 2026 · Reproducible checks, limitations, and primary references are included below.

Export JSON Lines

How to convert

  1. Open the Parquet file

    Drag your .parquet file into viewparquet, or open it from S3 or a URL.

  2. Optionally query the slice you need

    Nested columns can be exported as-is, or projected with dot notation (col.field) and UNNEST to reshape lists before export.

  3. Export to JSON

    Click Export and choose JSON. viewparquet writes JSON Lines — one JSON object per row — generated locally and downloaded straight from your browser.

Choose the JSON shape before you export

viewparquet writes newline-delimited JSON, not one large JSON array. That is useful for record-by-record processing, but the consumer still needs an agreed schema for nested values, numbers, timestamps, and nulls.

Use JSON Lines for independent records

Each line is one JSON value, so many tools can stream or split the file without parsing a single outer array. A consumer that only accepts a JSON array will need a separate conversion step.

Preserve nesting deliberately

Structs and lists can remain nested objects and arrays. If the destination expects flat keys, project the fields with SQL first instead of relying on an undocumented automatic flattening rule.

Validate numeric and time semantics

JSON has one number syntax and no timestamp type. Large integers, decimals, non-finite values, and timezone-qualified timestamps can be interpreted differently by JavaScript, databases, and API clients.

Create an intentional nested record

This query keeps delay at the top level and groups distance and time into a nested object before the JSON Lines export.

SELECT
  delay,
  struct_pack(distance := distance, time := time) AS flight
FROM data
LIMIT 3;

What to expect: Each exported line has a delay value and a flight object with distance and time fields. Inspect the three lines in the receiving tool before scaling the same mapping to a full dataset.

Primary references

These sources support the format and tool behavior described on this page. Product-specific boundaries are checked against the shipped viewer using the claim-verification method.

Common questions

How do I convert a Parquet file to JSON without writing code?

Open a local .parquet file in viewparquet and click Export → JSON. DuckDB-WASM performs the conversion in your browser — no Python or install — and the file contents are not uploaded to viewparquet.

What happens to nested columns when converting Parquet to JSON?

DuckDB serializes supported nested Parquet values into JSON representations, such as objects and arrays. Because downstream tools handle nested and logical types differently, verify a sample of the JSON Lines output before relying on an exact schema mapping.

Does the export produce a JSON array or JSON Lines?

viewparquet exports JSON Lines (NDJSON): one JSON object per line, one line per row. JSON Lines streams well and is what most data tools, log pipelines, and jq workflows expect. Wrapping into a single array is a one-liner afterwards if a tool requires it.

Is my data uploaded anywhere during the conversion?

No. For a local file, reading the Parquet data and writing JSON Lines both happen inside your browser tab via DuckDB-WASM; the dataset is not uploaded to a viewparquet server.

How do I do the same conversion from the command line?

With the DuckDB CLI: COPY (SELECT * FROM read_parquet('data.parquet')) TO 'data.json' (FORMAT JSON). Use the browser for quick one-offs and the CLI for repeatable scripts.

Continue with a related task

Try it on your own file

Drop a Parquet, GeoParquet, CSV, or JSON file into viewparquet: browse rows, run DuckDB SQL, and export results in-browser without uploading the dataset to viewparquet. Optional AI sends messages and applicable context directly to the provider you choose; review Settings → AI before use.