# JSON to PDF

> A free online tool that turns JSON into a PDF, as a table for an array of objects or as formatted, coloured JSON text otherwise.

Convert JSON to PDF by pasting JSON or opening a .json file. The data is checked in your browser, and you get a PDF you can download. An array of objects becomes a table with one row per object. Any other JSON is shown as indented, colour-coded text. The web tool needs no account and adds no watermark to the PDF.

## Key facts

- Input: pasted JSON or a .json file up to 2 MB, checked in your browser; invalid JSON shows the parser message.
- Layouts: a table with one row per object, or indented text with 2 or 4 spaces.
- Numbers are read as JavaScript numbers, so integers above 9007199254740991 can lose precision.
- Free without an account: up to 10 conversions per minute and 50 per day per visitor, no watermark. Signed in, each render costs 1 credit (100 free credits every month).
- Files are deleted automatically: 10 minutes after conversion without an account, 1 day with a free account.
- Developers can run the same render with POST https://api.aiipworld.com/v1/render and an API key (see the PDF API page).

## How it works

1. Paste your JSON into the box, or open a .json file from your computer.
2. Check the input. If the JSON is invalid, the parser message shows the problem and the convert button stays off.
3. Choose Table for a list of objects, or Formatted JSON for everything else.
4. Pick the page size, margin, text size and orientation.
5. Press the convert button, complete the human check if it is shown, and download the PDF.

## How to convert JSON to PDF

Use this page to convert JSON to PDF without installing software. Paste JSON into the box or open a .json file. The browser parses the data with its own JSON parser before anything else happens.

The tool then builds a table or an indented text view. The result is sent to our render server, which makes the PDF. Results are deleted after 10 minutes, and no history of your conversions is kept.

Anonymous use needs a human check. Signed-in users skip the check and use credits.

## Table or formatted JSON

Choose the layout before you convert. The two layouts suit different data, so pick the one that matches what you want to read.

- Table: for a non-empty array of objects. Each object becomes one row, and each key becomes a column.
- Formatted JSON: indented text with 2 or 4 spaces. Keys, strings and numbers each get their own colour.
- Use Formatted JSON when you want to read the structure, and Table when you want to compare records.

## Which JSON becomes a table

Only a non-empty array of objects becomes a table. A single object, an array of plain numbers or a top-level string is shown as formatted JSON. If your data sits inside a wrapper object, copy the array part into the box first.

Columns are all keys in the order they first appear across the objects. A key that is missing from an object leaves that cell blank.

Nested objects and arrays are written as JSON text inside their cell. They are not expanded into extra rows or columns.

Numeric columns are right-aligned. The header row repeats on every page, so a long table stays readable.

## Invalid JSON and big numbers

JSON has strict rules. Keys and string values need double quotes, and a list or object cannot end with a trailing comma. When the JSON is invalid, the tool shows the parser message and the convert button stays off. Fix the spot the message names and try again.

Numbers are read as JavaScript numbers. Integers above Number.MAX_SAFE_INTEGER can lose digits, so a long account number may print with the wrong last digits. Wrap such values in quotes, which keeps them as text.

Text size runs from 8 to 12 pt. A smaller size fits more columns on each page.

## JSON file to PDF

To convert a file, open the .json file in the tool instead of pasting. The file is read in your browser. Files that are too large are not opened, so split very large data into smaller files.

A file that is not valid JSON gets the same parser message as pasted text.

The free tool prints at most 10 pages. A long table can run to several pages. If you need more, split the data into several files and convert each one.

The table HTML made from your data must fit within 256 KB. A very wide or very long table can exceed that limit. Remove keys you do not need, or split the rows.

## JSON to PDF from code

The web tool converts one file at a time. For a script or an app, use the API. The API renders HTML or a public URL. It does not take JSON data directly, and templates are not available yet, so your code builds the HTML table first and then sends it.

Send a POST request to /v1/render with an html_to_pdf job. Send your API key in the header Authorization: Bearer followed by the key. The API replies with 202 and a job_id.

Poll GET /v1/jobs/:id until the status is succeeded, failed or timeout. On success, download the file from the download link. The link is short-lived, so fetch the file as soon as the job succeeds.

Each document needs its own request, because there is no batch endpoint. Webhooks are not available yet, so poll the job. Credits for failed and timed-out jobs are returned.

Keep your API key on your server. The key is shown in your dashboard.

## Questions

### How do I convert a JSON file to PDF?

Open the .json file in the tool, check the layout, and press the convert button. The file is read in your browser, and you download the PDF when it is ready. Results are deleted after 10 minutes.

### Can it make a table from JSON?

Yes, if the JSON is a non-empty array of objects. Choose the Table layout. Each object becomes a row and each key becomes a column.

### What happens with nested objects?

The nested object or array is written as JSON text inside its cell. The text is not split into extra rows or columns. Long nested values can make a cell hard to read, so flatten them if that matters.

### Why does it say my JSON is invalid?

The JSON parser found a syntax problem and shows its message. Common causes are a trailing comma, single quotes instead of double quotes, or a missing bracket. Fix the spot the message names and the convert button turns on again.

### Are large numbers exact?

Not always. Numbers are read as JavaScript numbers, so integers above Number.MAX_SAFE_INTEGER can lose digits. Put long IDs in quotes so they stay as exact text.

### Can I change the page size?

Yes. Choose the page size, margin, orientation and text size in the tool before you convert. The PDF follows the settings you chose.

### Can I fill a PDF template with JSON data?

Not yet. Templates that take JSON data are not available. The tool turns your JSON into a table or formatted text, and that is the output you get.

### Does my JSON leave my browser?

The JSON is read and parsed in your browser. To make the PDF, the table is sent to our render server. Results are deleted after 10 minutes, and no history is kept.

### How long are my results kept?

Results are deleted after 10 minutes. No history is kept, so the tool does not list past conversions. Download the PDF before that time.

### Is there a limit on pages?

The free tool prints at most 10 pages. If your data needs more pages, split it into several files and convert each one.

### Does the PDF have a watermark?

No. We add no watermark to the PDF. Anonymous use still needs the human check first.

### Can I convert JSON to PDF in code?

Yes, through the API. Your code builds the HTML table, sends an html_to_pdf job, and polls the job until it finishes. The API key goes in an Authorization: Bearer header.

## Related

- [CSV to PDF](https://aiipworld.com/tools/csv-to-pdf/index.md)
- [Text to PDF](https://aiipworld.com/tools/text-to-pdf/index.md)
- [Markdown to PDF](https://aiipworld.com/tools/markdown-to-pdf/index.md)
- [HTML to PDF converter](https://aiipworld.com/tools/html-to-pdf/index.md)
- [PDF API](https://aiipworld.com/pdf-api/index.md)

Page: https://aiipworld.com/tools/json-to-pdf/
