JSON to doc fill

JSON to PDF and Word documents

JSON to PDF and Word Generation with EDocGen

EDocGen DIY software for generating PDF and Word documents from JSON data without costly data transformations. Populate JSON data into existing PDF and Word templates to generate single or batch documents. It is one of the fastest systems and generates thousands of complex documents in a few seconds.

Add dynamic tags to your existing template as detailed in the below sections and then populate it with JSON data.

Start JSON to PDF Population

Sample JSON and Word template

Below are the JSON array for population and the sample template containing dynamic text, tables, and hyperlinks. You can also download them from here.



JSON to PDF Document Generation

Dynamic Tags

The template has text, table, and hyperlink dynamic fields apart from conditions.

Text: {Enter_Name} and {Enter_Email} are dynamic text fields. EDocGen treats text placed in "{}" as dynamic text field.

Table: The Job table has Role, Company and Address columns. Table starts with {#tablename} and ends with {/tablename}. So you notice {#Job} in the first column and {/Job} in the last column. Column values are text fields. EDocGen loops over the JSON to populate a row into the Job table.

Hyperlink: The dynamic data passed to the hyperlink tag would be displayed as a link in blue color. You can use it to display a URL or text that links to another URL. EDocGen treats text placed in "{~}" as a hyperlink. In the template {~linkname}{~Enter_Name} are dynamic hyperlinks.

Show text based on Conditions (If-Else): If the Enter_Name value is "Steve", we're showing some text. Similarly, you can also test for boolean for displaying certain content.

EDocGen tags

While adding tags to the PDF template

  1. Make sure you close the tags properly and don't leave any space between dynamic field name and tags
  2. Avoid special characters and spaces in field naming
  3. If a field appears at multiple places in the document, use the same dynamic field name throughout the document

JSON Array Population

After adding tags to your template, upload it into EDocGen. Hover-over document template and click “Create Document” action button. This opens a side-screen and in the drop-down select “generate documents from JSON".

JSON format template

Upload JSON and map JSON keys to template's dynamic fields. If you have a large number of dynamic fields, mapping them for every population is time-consuming. If JSON key names match with the template's dynamic fields, EDocGen automatically maps them. This allows you to skip the mapping screen during documents creation.

Mapping screen

In the JSON file, notice matching keys with dynamic tag names of the template. For example, "Enter_Name" is present in both JSON and template. Though you can upload any valid JSON format, having matching keys allows you to skip the mapping screen (2nd step of the population). Thus this saves time if you're planning to populate the same JSON file format again-and-again into your template.

For "linkname" dynamic field, there is no corresponding data in JSON. In such cases, the generated documents display just blank in the place of the dynamic field.

Click generate button to create JSON to PDF or JSON to Word documents. If you're generating multiple documents from your JSON (bulk documents), you find them in zip format in the output folder. Also, they would be mailed to your registered email id.

JSON to PDF & JSON to docx

PDF and Word templates

You can use both PDF and Word templates with EDocGen. Edit them in your favorite editors to add tags and upload into EDocGen. While you can also modify your templates inside the App as well, it is suited more for minor changes.

XML to Word

With EDocGen, you can populate JSON into

  1. Word templates to create Word documents
  2. Word templates to create PDF documents
  3. PDF templates to create Word documents
  4. PDF templates to create PDF documents

For fillable PDF, add the dynamic fields in fillable sections.

fillable PDF Document Generation

For read-only PDF, open it in Adobe acrobat editor or free online edtors such as PDFEscape. Then add tags, similar to Word document template above.

Advanced Features

Nested Tables:

You can populate table inside a table and EDocGen supports 4-Level JSON data


Please refer for details on how to go about Checkbox creation and population.


Help guide details image population.


Help guide details paragraph population.


Please refer to examples for details on how to perform arithmetic operations.


Please refer to below additional example for how to go about lists (bullets) creation

As you see EDocGen is the most versatile solution for JSON to PDF files creation.

Additional Examples

Below is an additional example for 2-level JSON population. The sample template has loops inside a loop to create a single page for each JSON record. Moreover, it creates lists with bullets.

Below is the template and JSON array. You can also download them from here.



The system loops over all the nouns in the JSON to populate associated records for each noun in the template. In the template notice the loop {#Nouns}{/Nouns}

      1. This document displays dynamic bullets for "Examples", "Synonyms" and "Antonyms". So each of them is a loop with a bullet inside the loop. This is a case of a loop inside a loop.

    {#ExampleSentences} {.}{/ExampleSentences}

    {#Antonyms} {.}{/Antonyms}

    {#Synonyms} {.}{/Synonyms}

      2. "{.}" would display each element of the array as a bullet point

Use this example as a reference for list creation and as multi-level JSON population. If you have any queries on JSON file to PDF generation, mail us support(@)edocgen.com. We would be happy to answer.

Trouble Shooting

  • Unable to upload template

    It may be due to the wrong dynamic tags. Just make sure you're closing every tag properly and only uses the tags that are supported by EDocGen

  • After JSON upload, the mapper screen doesn't show JSON keys in dropdowns

    Please validate your JSON file. This happens if your JSON file is not valid.

  • After JSON upload, the next button doesn't do any action

    Please validate your JSON file. This happens if your JSON file is not valid.