Introduction
HWP is the document format of Hangul, the word processor from Hancom, which is the standard word processor in South Korea and is widely used by its government, schools and businesses. Hancom has published the specification of the current binary format, HWP 5.0.
Newer versions of Hangul also save HWPX, an XML-based format in a ZIP package, with
the extension .hwpx.
Structure
An HWP 5.0 file is a compound file, which starts with the signature
D0 CF 11 E0 A1 B1 1A E1 and holds named streams. The
FileHeader stream begins with the text HWP Document File and
gives the version and flags, such as whether the document is compressed or protected
by a password. DocInfo holds the fonts, styles and other shared settings,
and the BodyText storage holds one stream per section,
Section0, Section1 and so on. The streams are made of tagged
records and are usually compressed with Deflate.
cfbFileHeader signature, version and flags256 bytescfbDocInfo fonts, styles and shared settingsstreamcfbBodyText/Section0 … one stream per sectionstreamscfbBinData/ pictures and embedded filesoptionalcfbPrvText, PrvImage text and image previewsstreams
Links
Software
- Hancom Office Hangul (Windows, macOS, mobile)
Developers
- pyhwp, Python tools that read HWP 5.0 and convert it to other formats