How to Open, Edit, & Convert HPGL Files

Digital graphic of a file
alengo / Getty Images

A file with the HPGL file extension is an HP Graphics Language file that sends printing instructions to plotter printers.

Unlike other printers that use dots to create images, symbols, text, etc., a plotter printer uses the information from the HPGL file to draw lines on the paper.

How to Open an HPGL File

To see the image that would be created on the plotter, you can open HPGL files for free with XnView or HPGL Viewer.

You can also open HPGL files with Corel's PaintShop Pro, ABViewer, CADintosh, or ArtSoft Mach. Considering how common these files are for plotters, the HPGL format is probably supported in most similar tools.

Since they're text-only files, you can also open an HPGL file using a text editor. Notepad++ and Windows Notepad are two free options. Opening an HPGL this way will let you change and view the instructions that make up the file, but won't translate the commands to an image... you'll just see the letters and numbers that make up the file.

If you have a program installed that tries to open the HPGL you click on, but it's not the one you want, you'll need to change the target application.

How to Convert an HPGL File

HPGL2 to DXF is one free program for Windows that can convert HPGL to DXF, an AutoCAD image format. If that tool doesn't work, you can do the same with the demo version of HP2DXF.

Very similar to those two programs is ViewCompanion. It's free for 30 days and also supports converting HPGL to DWF, TIF, and some other formats.

The HPGL Viewer program mentioned cannot only open an HPGL file but also save it to JPG, PNG, GIF, or TIF.

hp2xx is a free tool to convert HPGL files to graphics formats on Linux.

You can convert an HPGL file to PDF and other similar formats using, a free file converter that runs in your browser, which means you don't have to download the converter to use it.

More Information on HPGL Files

HPGL files describe an image to a plotter printer by using letter codes and numbers. Here's an example of an HPGL file that describes how the printer should draw an arc:


AA means Arc Absolute, meaning these characters will build an arc. The center of the arc is described as 100, 100 and the starting angle is defined as 50 degrees. When sent to the plotter, the HPGL file will have told the printer how to draw the shape using nothing but these letters and numbers.

Aside from drawing an arc, other commands exist to do things like draw a label, define the line thickness and set the character width and height. Others can be seen in the HP-GL Reference Guide we linked to above.

Instructions for line width don't exist with the original HP-GL language, but they do for HP-GL/2, the second version of the printer language.