# GDocs-Me-Up: A Google Docs High-Fidelity Exporter

A Node.js script that exports a Google Doc to HTML and CSS with high fidelity, preserving headings, spacing, alignment, bullet lists, images and right-to-left text.

GDocs-Me-Up is a Node.js script that exports a Google Doc to HTML and CSS with high fidelity, for creating an offline or self-hosted copy that closely matches the original rather than losing alignment, line spacing or right-to-left details the way simpler exporters do. It pulls detailed styling directly from the Google Docs API, merges it into HTML, and inserts matching CSS while neutralizing default browser styling quirks.

It detects named styles such as Title, Subtitle and Heading 1 through 6; honors line spacing, margins, indentation and alignment, including flipping alignment for right-to-left paragraphs; converts tables, a table of contents and every list style (disc, circle, square, dash bullets, decimal, roman and alphabetic numbering) with correct nesting; exports inline and positioned images at their document dimensions, converting photographic JPEGs and PNGs to WebP when that saves at least 20%, while keeping transparent or graphic PNGs lossless; and gathers the document's Google Fonts so text families match.

It requires Node.js 20.9 or later.

Website: https://github.com/behdad/gdocs-me-up
