Convert JSON to PDF in Your Browser

Convert JSON to PDF as pretty-printed, syntax highlighted output, with arrays of objects also shown as a table, all in your browser. Your JSON never leaves your device, and the tool keeps working offline.

Tap to select a file

Files are processed on your device only.

How it works

  1. Drop, paste, or select your .json file. It is parsed on your device only.
  2. Choose page size, font size, and a light or dark theme.
  3. Click Print or Save as PDF, then pick your printer or PDF target.

Code view and table view (array of objects to table)

Every file is pretty-printed with two-space indentation and highlighted with the same TextMate grammar VS Code uses for JSON, so keys, strings, numbers, and booleans are colored and easy to scan. That formatted code view is always produced.

When the top level is an array of objects, a table is rendered as well: the columns are the union of every object's keys, so rows with missing keys simply leave those cells blank. That makes API responses and record lists read like a spreadsheet. For genuinely tabular source data, the CSV to PDF converter is a closer fit.

How nested objects and arrays are rendered

Deeply nested structures are fully expanded with indentation and highlighting rather than collapsed: a PDF is static, so there is no click-to-fold. Each level of nesting is indented so the shape of the data stays clear on paper, and long documents flow across pages with lines kept intact.

In the table view, a cell whose value is itself an object or array is shown as compact JSON so the row stays on one line. If you would rather hand-edit the structure as text first, the TXT to PDF converter prints raw text as-is. See how browser-side rendering works.

Frequently asked questions

What if my file is not valid JSON?
It has to parse as strict JSON. Files with trailing commas, comments, or single quotes (JSON5 or JSONC) are rejected with a notice rather than converted incorrectly, so run them through a linter or fix the syntax first, then convert the corrected file here.
When do I get a table instead of formatted code?
When the top level is an array of objects, the converter also renders a table whose columns are the union of the object keys, above the formatted JSON. Any other shape (a single object, nested arrays, primitives) is shown as pretty-printed, highlighted code only.
Can deeply nested structures be collapsed or folded?
No. A PDF is static, so there is no interactive folding; nested objects and arrays are fully expanded with indentation and syntax highlighting so the structure stays readable on paper. In table cells, a nested value is shown as compact JSON.
Is my JSON uploaded to a server?
No. Parsing, highlighting, and rendering all happen in your browser on your device. The JSON never leaves the machine, there is no account, and the converter keeps working offline.

Related tools