Skip to content

Convert JSON to PDF

Create a readable PDF from structured JSON for sharing, printing, or archiving.

Convert JSON files online

We don’t have a dedicated online converter for JSON to PDF yet, but you can convert JSON files online to these and more formats:

Want to convert JSON to PDF?

Let us know. We pick the conversions to add next by how many people ask for them.

How to convert json to pdf file

A client, printer, records system, or email workflow may require a fixed-layout document instead of a data file. Converting the file produces a readable snapshot for sharing, printing, or archiving, but it does not automatically turn nested data into a well-designed report.

What the JSON format is

JSON (JavaScript Object Notation) is a plain-text, language-independent format for objects, arrays, strings, numbers, Boolean values, and null. Web APIs, application settings, browser software, databases, export tools, logs, product catalogs, and developer scripts commonly create .json files.

JSON preserves data values and nested relationships, but it does not define fonts, page sizes, headers, tables, page breaks, or other print-layout rules. A converter must therefore choose how to present the structure.

What the PDF format is

PDF is a page-oriented document format designed to preserve text, graphics, fonts, and layout across operating systems and printers. It suits reports, invoices, forms, client copies, and records that recipients should view or print without changing the underlying data.

PDF is less suitable for sorting, filtering, or reusing values. Keep the original .json file, or provide a CSV export alongside the PDF, when recipients need machine-readable data.

Generate a formatted PDF with Python and a browser

This local workflow avoids uploading the source and gives control over headings, tables, spacing, and escaping. It is suitable for small and moderately sized JSON documents.

  1. Install Python 3 and save the source as data.json.
  2. Save this script as json_to_pdf.py in the same directory:
import html
import json
from pathlib import Path

source = json.loads(Path("data.json").read_text(encoding="utf-8"))

def render(value):
    if isinstance(value, dict):
        rows = []
        for key, item in value.items():
            rows.append(
                f"<tr><th>{html.escape(str(key))}</th>"
                f"<td>{render(item)}</td></tr>"
            )
        return "<table>" + "".join(rows) + "</table>"
    if isinstance(value, list):
        return "<ol>" + "".join(
            f"<li>{render(item)}</li>" for item in value
        ) + "</ol>"
    if value is None:
        return "<em>null</em>"
    return html.escape(str(value))

page = f"""<!doctype html>
<html><head><meta charset='utf-8'>
<title>JSON report</title>
<style>
body {{ font: 11pt Arial, sans-serif; margin: 15mm; color: #222; }}
table {{ border-collapse: collapse; width: 100%; margin: 0 0 14px; }}
th, td {{ border: 1px solid #999; padding: 6px; vertical-align: top; text-align: left; }}
th {{ width: 25%; background: #eee; }}
li {{ margin: 4px 0; }}
</style></head><body>
<h1>JSON report</h1>{render(source)}
</body></html>"""

Path("json_report.html").write_text(page, encoding="utf-8")
  1. Run python json_to_pdf.py. On some Windows installations, use py json_to_pdf.py.
  2. Open json_report.html in Chrome, Edge, Firefox, or Safari and choose Print → Save as PDF or the browser's PDF output option.
  3. Inspect the preview for clipped columns, split tables, excessive whitespace, and missing characters. Enable background graphics if the gray table headers should appear.

The script escapes HTML-sensitive characters, so values containing markup are displayed as text rather than interpreted as HTML. It renders objects as nested two-column tables and arrays as numbered lists; a large or deeply nested dataset may need a custom template that selects fields or flattens records.

Use an online converter for non-sensitive data

Services such as CloudConvert and Convertio can accept a JSON file and return a PDF when that conversion is available in their current interface. Upload the file, choose PDF as the target, start the conversion, and review the downloaded result. These services may produce a raw code listing or minimally formatted pages rather than a report, so check the preview and text selection.

Do not upload credentials, personal information, proprietary exports, or regulated records unless the provider's security, retention, and processing terms meet your requirements. A local workflow is safer for confidential data.

Print formatted JSON from a desktop editor

For a developer-oriented copy, open the file in Visual Studio Code, run Format Document, then choose File → Print and select a PDF printer or the system's PDF output. A JSON-aware editor such as Notepad++ with a JSON-formatting plugin supports the same approach. This preserves indentation and syntax but usually creates a code listing, not a table-based report.

Quality and compatibility limits

  • Validate the source before conversion. Run python -m json.tool data.json; malformed JSON causes Python and most converter services to stop.
  • JSON object member order has no general presentation meaning, and duplicate member names are not portable. Sort keys or records in the script when repeatable output matters.
  • Long strings and wide objects can overflow pages. Select relevant fields, wrap text, reduce the font size, or create separate tables for major collections.
  • Unicode characters require suitable fonts. If a browser substitutes a font or the PDF lacks a needed glyph, characters may appear as boxes; use a font with the required script and verify the exported PDF.
  • Base64 data, Markdown, URLs, and embedded markup are values, not automatically images or formatted content. Add explicit handling if those values need special rendering.
  • Browser-generated PDFs normally contain selectable, searchable text. A screenshot or scanned printout creates image-only pages and may require OCR.

JSON vs PDF: format comparison

How the JSON and PDF formats compare on the properties that matter most for this conversion.

Comparison of the JSON and PDF file formats
Property .JSON JavaScript Object Notation .PDF Portable Document Format
Open standard Yes Yes
Compression Uncompressed Both
Typical file size Small Medium
Opens in a web browser Yes, natively Yes, natively
Further editing Easy Limited
Metadata support None Extensive
Plain-text readable Yes No
Best used for Data exchange Publishing
Introduced 2001 1993
Developer Douglas Crockford / ECMA International Adobe Systems (now Adobe Inc.); standardized by ISO
MIME type application/json application/pdf

Information about file extensions and file types is provided by File-Extensions.org

The database currently does not contain any direct json file converter links.

Additional formats for
json file conversion

Convert to pdf from
other formats

Share on social media:

Already downloaded

This file has already been downloaded. For your privacy it was deleted from our server right after the download, so it cannot be downloaded again. To get it once more, convert the file again.