Visual Studio Code
Visual Studio Code is not owned or supported by Unstructured. Unstructured makes no guarantees about the accuracy,
reliability, or security of this tool or the extensions that you install into it. Use this tool and these
extensions at your own risk.
Format JSON for easier reading in Visual Studio Code
To format an Unstructured JSON output file for easier reading, do the following after you download the Unstructured JSON output file locally and then open the downloaded file in Visual Studio Code:- Click anywhere in the JSON file on-screen to make it the active file.
-
Do one of the following:
- Press Shift + Option + F for macOS, or Shift + Alt + F for Windows or Linux.
- On the menu bar, click View > Command Palette. Then, in the Command Palette, type
>Format Document, and press Enter.
- The JSON file’s contents display in a format that is easier to read.
Visually render text_as_html field contents in Visual Studio Code
To visually render the contents of atext_as_html field in Unstructured JSON output, do the following in Visual Studio Code:
-
Install the HTML Preview
extension into your installation of Visual Studio Code, as follows:
a. On the menu bar, click View > Extensions.
b. In the Search Extensions in Marketplace box, typeHTML Preview, and then press Enter.
c. In the list of search results, for the HTML Preview extension, click Install.
d. If prompted, click Trust Publisher & Install.
-
Select the contents of the
text_as_htmlfield that you want to render. Do not copy the field name"text_as_html"or the opening or closing quotation marks around the field’s contents. -
Create a new file in Visual Studio Code, and paste the contents of the
text_as_htmlthat you copied, into the new file. -
With the new file active on-screen, press the key combination
Control + Shift + VorCommand + Shift + Vto visually render the new file’s content.
- Table-specific metadata
- VLM generated HTML elements
- Extract tables as HTML (Unstructured API Reference)
- Extract tables as HTML (Unstructured Open Source Reference)
View image_base64 field contents as an image in Visual Studio Code
The contents ofimage_base64 fields in Unstructured JSON output are in Base64-encoded format. To view the contents of an image_base64 field as a human-viewable image,
do the following in Visual Studio Code.
-
Install the Base64Viewer
extension into your installation of Visual Studio Code, as follows:
a. On the menu bar, click View > Extensions.
b. In the Search Extensions in Marketplace box, typeBase64Viewer, and then press Enter.
c. In the list of search results, for the Base64Viewer extension, click Install.
d. If prompted, click Trust Publisher & Install.
-
Copy to your system clipboard the contents of the
image_base64field that you want to decode. Do not copy the field name"image_base64"or the opening or closing quotation marks around the field’s contents. - On the menu bar, click View > Command Palette.
-
In the Command Palette, type
>Base64Viewer: Decode From Base64, and press Enter. -
When prompted, paste the contents of the
image_base64field that you copied, and then press Enter. The human-viewable image appears in a separate editor tab.
- Extract images and tables from documents (Unstructured API Reference)
- Extract images and tables from documents (Unstructured Open Source Reference)
View orig_elements field contents as original JSON in Visual Studio Code
The contents oforig_elements fields in Unstructured JSON output are in gzipped Base64-encoded format. To view the contents of an orig_elements field in a human-readable format,
do the following in Visual Studio Code:
-
Install the Gzip / Unzip text
extension into your installation of Visual Studio Code, as follows:
a. On the menu bar, click View > Extensions.
b. In the Search Extensions in Marketplace box, typeGzip / Unzip text, and then press Enter.
c. In the list of search results, for the Gzip / Unzip text extension, click Install.
d. If prompted, click Trust Publisher & Install.
-
Download the Unstructured JSON output file locally, and then open the downloaded file in Visual Studio Code.
We do not recommend that you format the JSON file for easier reading after you open it in Visual Studio Code. This is because the formatting operation could introduce unnecessary whitespace and line breaks into the contents of the
orig_elementsfields. These additional characters could cause the extension to produce unexpected results or fail. -
Select the contents of the
orig_elementsfield that you want to decode and view. Do not select the field name"orig_elements"or the opening or closing quotation marks around the field’s contents. - Right-click the selected contents, and then click Command Palette.
-
In the Command Palette, type
>Unzip Base64 encoded text, and then press Enter. The human-readable JSON appears in a separate editor tab.
- Get chunked elements (Unstructured API Reference)
- Get chunked elements (Unstructured Open Source Reference)
Online web tools
You can use online web tools such as the following to work with Unstructured JSON output.Format JSON for easier reading online
The following website is not owned or supported by Unstructured. Unstructured makes no guarantees about the accuracy,
reliability, or security of this website. Use this website at your own risk.
- Go to the JSON Viewer Online.
-
Do one of the following:
- Click Load, and then select an Unstructured JSON output file that you have saved locally.
- Copy the Unstructured JSON output to your system clipboard, and then click Paste.
- Click Format. The JSON is formatted on-screen for easier reading.
Visually render text_as_html field contents online
The following website is not owned or supported by Unstructured. Unstructured makes no guarantees about the accuracy,
reliability, or security of this website. Use this website at your own risk.
text_as_html field in Unstructured JSON output, do the following:
- Go to the HTML Online Viewer.
-
Do one of the following:
- Copy the contents of the
text_as_htmlfield to your system clipboard, and then paste it into the Put your HTML text here box. This content must not contain the field name"text_as_html"or the opening or closing quotation marks around the field’s contents. - Click Import, and then select a file containing only the contents of the
text_as_htmlfield. This file must not contain the field name"text_as_html"or the opening or closing quotation marks around the field’s contents.
- Copy the contents of the
text_as_html field contents, the HTML is rendered on-screen.
See also:
- Table-specific metadata
- VLM generated HTML elements
- Extract tables as HTML (Unstructured API Reference)
- Extract tables as HTML (Unstructured Open Source Reference)
View image_base64 field contents as an image online
The following website is not owned or supported by Unstructured. Unstructured makes no guarantees about the accuracy,
reliability, or security of this website. Use this website at your own risk.
image_base64 fields in Unstructured JSON output are in Base64-encoded format. To view the contents of an image_base64 field as a human-viewable image,
do the following:
- Copy to your system clipboard the contents of the
image_base64field that you want to view. Do not copy the field name"image_base64"or the opening or closing quotation marks around the field’s contents. - Go to the Base64 to Image page on the Base64.Guru website.
- In the Base64 box, paste the contents of the
image_base64field that you copied. - Click Decode Base64 to Image. The human-viewable image appears on-screen.
- Extract images and tables from documents (Unstructured API Reference)
- Extract images and tables from documents (Unstructured Open Source Reference)
View orig_elements field contents as original JSON online
The following website is not owned or supported by Unstructured. Unstructured makes no guarantees about the accuracy,
reliability, or security of this website. Use this website at your own risk.
orig_elements fields in Unstructured JSON output are in gzipped Base64-encoded format. To view the contents of an orig_elements field in a human-readable format,
do the following:
- Go to the Gzip Decompress Online page on the Code Beautify website.
-
Do one of the following:
- Copy the contents of the
orig_elementsfield to your system clipboard, and then paste it into the Enter your Gzip Compress Text box. This content must not contain the field name"orig_elements"or the opening or closing quotation marks around the field’s contents. - Click File, and then select a file containing only the contents of the
orig_elementsfield. This file must not contain the field name"orig_elements"or the opening or closing quotation marks around the field’s contents.
- Copy the contents of the
- If the Auto box is not checked, click Gzip Decompress.
- The human-readable JSON appears on-screen.
- Get chunked elements (Unstructured API Reference)
- Get chunked elements (Unstructured Open Source Reference)

