.HPG

HPG File

HP-GL Plotter File (HP Graphics Language)
Ask a question
QUICK ANSWER

An HPG file is an HP-GL (HP Graphics Language) plotter file - a plain-text list of pen movement commands produced when CAD software prints to a plotter file. Open it with a free HPGL viewer such as Free PLT/HPGL Viewer, ViewCompanion, or Inkscape. Watch out: some HPG files are actually PostScript or PCL, not HP-GL - check the first lines of the file to confirm.

Developer: Hewlett-Packard (HP-GL / HP-GL/2 language) Category: Vector Image Files Open standard MIME: application/vnd.hp-hpgl
OPENS ON Windows macOS Linux Web
Related: .EMZ · .CDR · .ODG · .VSDX

On this page

19k+ extensions indexed
Last reviewed Jul 7, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the HPG file format?

.hpg is an HP-GL plotter file - a plain-text vector drawing stored as a stream of two-letter HP Graphics Language commands directed at a pen plotter or cutting machine. HP-GL was introduced by Hewlett-Packard in the late 1970s for its range of pen plotters; the extended dialect HP-GL/2, which added polylines, fill types, scalable fonts and RTL raster passthrough, arrived in the 1990s and is the version most software produces today.

The file contains ASCII mnemonics such as IN (Initialize), SP (Select Pen), PU (Pen Up), PD (Pen Down) and PA (Plot Absolute). There is no fixed binary signature - a .hpg file typically begins with IN; or, for HP-GL/2 streams, an escape prefix %-12345X (the PCL/PJL Universal Exit Language sequence). Because the format is pure ASCII text, file size scales with drawing complexity rather than canvas area.

.hpg is one of several interchangeable extensions for the same language: .PLT, .hpgl, .hgl and .gl2 files are structurally identical. A CAD application that plots to file may also write PostScript or PCL under a .hpg name depending on the chosen driver, so inspecting the opening bytes before processing is advisable.

True pen plotters are now rare, but HP-GL remains the native command language of vinyl cutters, laser cutters and some wide-format devices. For archiving or sharing technical drawings, converting to SVG, PDF or DXF is recommended.

Security & safety

RISK: LOW

HP-GL .hpg files are plain-text command streams and are not executable, so they pose little direct risk. The practical pitfalls are non-security: an .hpg may not actually be HP-GL (it can be PostScript or PCL from a CAD print driver), so a viewer may show nothing - check the contents. Avoid sketchy "free HPGL converter" download portals bundling adware/PUPs; prefer the reputable viewers above or browser-based converters, and don't upload confidential engineering drawings to unknown online services.

Format details

in a nutshell
FULL NAMEHP-GL Plotter File (HP Graphics Language)aka HPGL plot file, HP-GL/2 plotter file
DEVELOPERHewlett-Packard (HP-GL / HP-GL/2 language)since HP-GL late 1970s; HP-GL/2 1990s
MIME TYPEapplication/vnd.hp-hpgl
TYPEPlain-text vector plotter command language (pen-plotter instructions)
STANDARDOpen · royalty-free

Programs that open HPG files

Windows5 apps
AutoCAD Paid AutoCAD CREATES .hpg via plot-to-file; to re-import a plot use an HPGL import tool - it doesn't natively re-open arbitrary .hpg as a drawing.
Inkscape Open-source Inkscape can OUTPUT HPGL for cutters and import some HPGL; open via File > Import. Good free route to SVG.
ABViewer Paid Open the .hpg to view CAD/HPGL plots and convert to DXF/PDF/SVG/images (free trial).
ViewCompanion (Standard/Pro) Paid Open the .hpg to view HP-GL/HP-GL2/PCL/Calcomp plots and convert to PDF/TIFF/DXF/SVG. Free trial available.
Free PLT Viewer / Free HPGL Viewer Free Open the .hpg to view and resize HPGL/HPGL2 plots and export to BMP/JPG/PNG/TIFF.
macOS1 app
Inkscape Open-source Use Inkscape (cross-platform) to import HPGL and export SVG/PDF; native Mac HPGL viewers are scarce.
Linux1 app
Inkscape Open-source Import the HPGL .hpg and export to SVG/PDF; also useful to generate HPGL for cutters.
Web1 app
Convertio (HPGL/PLT converter) Freemium Upload the .hpg (try the PLT/HPGL converter) and convert to PDF, SVG, DXF, JPG in the browser.

Technical details

deep spec
File encoding7-bit ASCII plain text; no binary sections in standard HP-GL; HP-GL/2 RTL raster blocks may embed binary pixel data within the same stream
Command syntaxTwo-letter uppercase mnemonics followed by optional numeric parameters and a semicolon terminator - e.g. `SP1;`, `PD100,200;`, `PA500,300;`
MIME type`application/vnd.hp-hpgl`; alternative `application/hpgl`
File signatureNo registered magic bytes; standard HP-GL begins with `IN;`; HP-GL/2 streams are prefixed with ESC `%-12345X` (PCL Universal Exit Language sequence)
Coordinate unitsPlotter Units (p.u.); default resolution is 40 p.u. per millimeter (0.025 mm precision); overridden per job by the `SC` (Scale) command
DialectsHP-GL (original, late 1970s): basic pen moves, lines and arcs; HP-GL/2 (1990s): adds filled polygons, line-fill types, scalable fonts and RTL raster passthrough
Color modelPen-based: color is assigned by pen number via `SP` (Select Pen); HP-GL/2 adds the `PC` (Pen Color) command for direct RGB assignment to each logical pen
Pen capacityHP-GL/2 supports up to 256 logical pens (`SP1`-`SP256`); each pen carries its own color, width and fill pattern assignment
Text and label supportHP-GL `LB` command embeds text labels in the drawing; HP-GL/2 adds `SD`/`CF`/`DT` instructions for scalable font selection, character spacing and label terminators
CompressionNone; the command stream is stored uncompressed; HP-GL/2 RTL raster sections may optionally use PCL compression modes within their binary blocks
ScalabilityFully resolution-independent vector; scales to any physical output size without quality loss, bounded only by the plotter's page-size setup
Typical file sizeA few kilobytes for simple diagrams up to several megabytes for dense engineering drawings; size grows with path complexity, not canvas dimensions
Interchangeable extensions`.plt`, `.hpgl`, `.hgl`, `.gl2` and `.prn` carry the identical HP-GL language; extension choice is application convention only, not a format difference
Platform supportWindows, macOS and Linux via third-party viewers and converters; interpreted natively by pen plotters, vinyl cutters and laser cutters
ReleasedHP-GL late 1970s; HP-GL/2 1990s
Latest versionHP-GL/2 (with RTL extensions); language effectively frozen
Open standardYes · royalty-free
Specificationen.wikipedia.org

HPG conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with HPG files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about HPG files.

Frequently asked questions

How do I open an HPG file?
If it's an HP-GL plot, use a free HPGL viewer (Free PLT/HPGL Viewer, ViewCompanion, ABViewer) or Inkscape, or an online HPGL converter. It's the same format as .plt/.hpgl. If it came from a CAD print driver it may be PostScript/PCL instead - check the file's first lines.
Is .hpg the same as .plt?
Yes - .hpg, .plt, .hpgl and .hgl are interchangeable extensions for HP-GL/HP-GL2 plotter files. The same viewers and converters handle all of them.
How do I convert an HPG to PDF?
Open it in an HPGL viewer like ViewCompanion or ABViewer and export to PDF, or use an online HPGL-to-PDF converter. This is the easiest way to view/print a plot on a normal printer.
Can I convert an HPG back to DXF or DWG?
Partly. An .hpg is just plot output, so you recover geometry (lines/arcs) but not the original drawing's layers/objects. Convert to DXF with ViewCompanion or ABViewer, then open/save as DWG in AutoCAD.
Why does my HPG file look like gibberish in a text editor?
HP-GL is short two-letter commands (IN; SP; PU; PD; PA...). If instead you see '%!PS' or printer codes, the .hpg is actually PostScript or PCL from a print driver - open it with a PostScript/PDF tool, not an HPGL viewer.

References

1Wikipedia - HP-GLen.wikipedia.org
2Software Companions - HPGL and PLT file format explainedwww.softwarecompanions.com

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.PARTPartial Download File
4.JPGJPEG Image
5.MDMarkdown Document
6.EXEWindows Executable (Portable Executable)
7.RPMSGRestricted Permission Message
8.BINCD/DVD Disc Image (BIN/CUE)
9.DATProgram Data File (generic)
10.EMLE-Mail Message (RFC 822 / MIME)

Related extensions

.EMZWindows Compressed Enhanced Metafile
.CDRCorelDRAW image / drawing
.ODGOpenDocument Graphics (Drawing)
.VSDXMicrosoft Visio Drawing (2013+)
.AIAdobe Illustrator Artwork
.EPSEncapsulated PostScript

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z