JSON to PDF turns a JSON file or pasted JSON code into a clean, printable PDF. Drop a .json or .txt file onto the upload card, paste code, or import from Google Drive or Dropbox. The tool parses the JSON in your browser and shows a live preview with a status bar. Choose Tree, Table or Code layout, set page size, orientation, font, margin and options like syntax highlighting and page numbers, then press Convert to PDF. The whole process runs locally, so nothing is uploaded. The result is free, needs no signup, and works on phones, tablets and computers.
What is a JSON to PDF converter?
A JSON to PDF converter takes a JSON data file and turns it into a fixed-layout PDF that opens the same on every device. JSON is a text format for storing structured data, widely used in APIs, configuration files, logs and databases. It is meant to be parsed by machines, not read by humans, and long JSON files are hard to scan in a plain text editor.
People search for “json to pdf” because they need to attach an API response to an email, print a configuration file for review, or archive a data snapshot that must never change. A PDF locks the layout and presents the data with readable indentation, coloured values and page numbers. That makes it suitable for code reviews, compliance audits and documentation.
The PDF format is an open standard published as ISO 32000. You can read its background in the Wikipedia article on PDF, and the JSON spec at json.org. The parsing and PDF writing both use well-maintained open-source libraries.
How to convert JSON to PDF in 4 steps
The tool follows a simple path. You never need to install software or create an account. Follow these steps for a clean result on your first try.
- Add your JSONDrag a .json or .txt file onto the upload card, click Browse, paste JSON code directly, or import from Google Drive or Dropbox. The tool parses the file in your browser with the built-in JSON parser.
- Review the previewThe status bar shows whether the data is valid JSON, its size and the number of keys. The preview panel renders the parsed structure with syntax highlighting, so you can confirm it before converting.
- Choose layout and stylePick Tree, Table or Code layout. Choose page size, orientation, font size and margin. Toggle syntax highlighting, line numbers, page numbers and the timestamp footer.
- Convert and downloadClick Convert to PDF and watch the progress circle. Then download the file, preview it in a new tab, or share it. The whole process runs inside your browser.
Small files convert in a few seconds. Very large JSON documents take longer because the browser has to lay out every node and wrap every value. Keep an eye on the progress circle for live status, and stay on the page until the download button appears.
Everything the converter can do
Beyond basic conversion, the tool packs the controls that people normally pay for. This table lists each setting, its options, and the effect you can expect.
| Setting | Options | What it does |
|---|---|---|
| Input source | File, paste, Drive, Dropbox | Drop a .json file, paste code, or import from cloud storage. |
| Layout mode | Tree, Table, Code | Tree shows hierarchy, Table flattens to key/value rows, Code shows pretty-printed JSON. |
| Live preview | Auto updates | Shows the parsed structure with syntax highlighting as soon as the JSON is valid. |
| Status bar | Valid / Invalid / Empty, size, keys | Confirms the JSON parsed successfully and reports the size and key count. |
| Format button | Pretty-print | Re-indents the JSON with two-space indentation. |
| Page size | A4, Letter, Legal, A3, A5, A2 | Sets the paper size for every page. |
| Orientation | Portrait, Landscape | Landscape suits wide key/value tables and code with long lines. |
| Font size | 8, 9, 10, 11, 12 pt | Balances readability against how many lines fit on a page. |
| Margin | 30, 50, 70 pt | Adds white space around the content for printing. |
| Syntax highlighting | On or off | Colours keys, strings, numbers, booleans and null values in the preview and PDF. |
| Line numbers | On or off | Adds a gutter of line numbers in Code layout. |
| Page numbers | On or off | Prints "Page X of Y" at the bottom of every page. |
| Timestamp | On or off | Prints the conversion date at the top of the first page. |
| Document title | Free text | Prints a heading above the JSON with a coloured underline. |
Once the PDF is ready, edit it with our PDF editor, lock it with protect PDF, or merge it with other files using merge PDFs.
Tree, Table and Code layouts
The layout decides how the JSON is drawn on the page. Each one is best for a different use case, and you can switch between them without re-uploading the file.
| Layout | Best for | What it shows |
|---|---|---|
| Tree | Nested configs, API responses, settings files | Indented nodes with ASCII connectors, coloured keys and values. |
| Table | Flat objects with many keys | Two columns: dotted key path and value. Reads like a CSV. |
| Code | Documentation, code reviews, sharing with developers | Pretty-printed JSON with syntax highlighting and optional line numbers. |
Tip: use Tree when you need to review nested structure and each value matters. Use Table for flat key-value data and quick scanning. Use Code when the output will be read by a developer or pasted into documentation.
Page sizes and orientation explained
Choosing the right page size prevents tiny text and awkward margins. Most of the world uses the ISO 216 “A” series. The United States and Canada use Letter and Legal. Very large JSON files are best converted to landscape A3 or A2 to avoid excessive wrapping.
| Size | Millimetres | Inches | Best for |
|---|---|---|---|
| A5 | 148 × 210 | 5.83 × 8.27 | Short JSON snippets, notes |
| A4 | 210 × 297 | 8.27 × 11.69 | Default for most JSON documents |
| A3 | 297 × 420 | 11.69 × 16.54 | Wide tables, deep trees |
| Letter | 216 × 279 | 8.5 × 11 | US and Canadian printing |
| Legal | 216 × 356 | 8.5 × 14 | Long documents, audit logs |
| A2 | 420 × 594 | 16.54 × 23.39 | Very large JSON, wall charts |
Use Landscape when the JSON has long string values that would wrap heavily in portrait. Use Portrait for tree layouts and tables with many small keys, where wrapping is not an issue.
Why convert JSON to PDF?
People convert JSON to PDF every day, and the reasons go beyond tidiness. A PDF opens the same on any device and locks the layout, so the reader sees exactly what you intended. These are the most common situations.
API response reviews
Share a printable snapshot of an API response with a teammate, a client or an auditor without asking them to install a JSON viewer.
Compliance and audits
Archive JSON logs, configurations or reports as immutable PDFs for compliance reviews and legal archives.
Documentation
Attach JSON samples to technical documentation with syntax highlighting and line numbers.
Database exports
Convert database exports to PDF for review, sign-off and sharing with non-technical stakeholders.
Academic data
Include JSON datasets as PDF appendices in reports, papers and journal submissions.
Debugging webhooks
Snapshot webhook payloads as PDFs during debugging so you can reference them later.
After conversion, continue the workflow with merge PDFs to combine multiple reports, or compress PDF to shrink email attachments.
Your JSON stays private
Privacy matters because JSON files often contain customer data, API keys, financial records or internal configurations. This converter runs entirely in your browser. The tool parses the JSON with the built-in JSON.parse() and writes the PDF with pdf-lib. Nothing is uploaded to any server.
- Local processing. The conversion code runs on your device, which also makes it fast on a good connection and usable on slow ones once the page has loaded.
- Direct cloud downloads. When you import from Google Drive or Dropbox, your browser fetches the file straight from that provider after you grant access.
- No account needed. You can convert without logging in. Read our privacy policy for full details about the site.
Quality, size and character support
JSON files are text, so the main quality trade-off is not compression but readability. The tool handles that with three levers: layout mode, font size and page size.
| Setting | Effect | Choose it when |
|---|---|---|
| 8pt font | Fits many rows per page | The JSON is very large and you want fewer pages. |
| 9pt font | Balanced default | You print on A4 or read on screen. |
| 12pt font | Very readable, more pages | The PDF will be read on phones or shared in an email. |
| Tree layout | Preserves hierarchy | Nested configs and API responses. |
| Table layout | Flattens to two columns | Flat objects with many keys. |
| Code layout | Pretty-printed JSON | Sharing with developers and pasting into docs. |
Character support: the tool uses Courier and Helvetica, the standard PDF fonts that cover Latin, Cyrillic and Greek. For Chinese, Japanese, Arabic or unusual symbols, use a browser print-to-PDF or a dedicated tool with embedded Unicode fonts.
If the PDF still exceeds a limit, run it through our PDF compressor for an extra reduction.
Tips for the best PDF results
- Pretty-print before converting. The Format button re-indents the JSON so the tree and code layouts read cleanly.
- Use Tree for nested data. Table flattens nesting into dotted keys, which is hard to follow on deeply nested objects.
- Switch to Landscape for long strings. Strings longer than about 80 characters wrap awkwardly in portrait.
- Set the title for sharing. A short title like “Order API Response” makes the PDF self-documenting.
- Keep line numbers on for code. Makes it easy to reference specific lines in a review.
- Use the timestamp for archives. Records when the PDF was generated, which matters for compliance.
- Preview before sharing. Press Preview to open the PDF in a new tab and check the layout.
Common problems and quick fixes
Most conversion problems come from a handful of causes. Check this list before you start over, because each fix takes only a few seconds.
| Problem | Likely cause | Fix |
|---|---|---|
| Status shows Invalid | The JSON has a syntax error. | Look at the parse error in the preview. Common causes are trailing commas and missing quotes. |
| Unicode characters appear as ? | Standard PDF fonts do not cover that script. | Use the browser print-to-PDF for CJK or Arabic, or an editor with embedded Unicode fonts. |
| Text is too small | Font size is 8pt and page is A4. | Switch to 10 or 11pt, or use A3 landscape for wide documents. |
| Table layout loses nesting | Table flattens nested objects into dotted keys. | Switch to Tree layout if hierarchy matters. |
| Code lines wrap awkwardly | Long string values exceed the content width. | Switch to A3 landscape or reduce font size to 8pt. |
| PDF is very large | Many deeply nested keys produce many pages. | Switch to 8pt, or split the JSON into smaller documents. |
| Cloud import fails | The sign-in window was blocked or closed. | Allow pop-ups for this site, then press the Drive or Dropbox button again. |
If a file still fails, open it in a JSON validator (or the browser console) and inspect the error. Even a single missing quote will break the parse.
Related PDF tools
A good document workflow often needs more than one step. These tools work well after JSON to PDF, and all of them are free.
You can also read practical guides on our blog, or learn more about the team on the About page.
Frequently asked questions
Is the JSON to PDF converter free?
Does the tool upload my JSON to a server?
What is the difference between Tree, Table and Code layout?
Can I paste JSON directly instead of uploading a file?
What does the status bar show?
Which JSON features are supported?
Can I add syntax highlighting, line numbers and page numbers?
Which page sizes are available?
Does it work on iPhone and Android?
Can I import from Google Drive or Dropbox?
Why do some Unicode characters appear as question marks?
Can I edit the PDF after conversion?
Ready to turn your JSON into a PDF?
Drop a JSON file or paste code, review the preview, and download a clean PDF in seconds. Free, private and built for every device.
Convert JSON now