Ship a PSD's contents as a webpage without losing the layout. Drop the file above and get one HTML file with positioned elements and selectable text. No Photoshop or server upload is needed.
One HTML file, with font references
Imported image data is embedded in the HTML and element styles are inline. Fonts can still require a network connection: standard families may use Google Fonts links, and custom fonts retain their sources. Offline, missing fonts fall back to substitutes, which can change the layout.
Positioned layout, selectable text
Each page contains positioned HTML elements inside a design div. Supported text layers become selectable text nodes. Unsupported PSD features can change appearance, so compare the exported page with the original before sharing it.
Edit during conversion
As soon as the PSD parses, it loads into the live Polotno editor. Edit text, change colors, move layers, drop in new images, then click Download as HTML in the editor toolbar. Useful when a PSD is 90% of what you want to share as a single-file webpage and one section needs reworking.
The same conversion in code
import { psdToJson } from "@polotno/psd-import";
import { jsonToHTML } from "@polotno/html-export";
const buffer = await file.arrayBuffer();
const json = await psdToJson({ psd: buffer });
// Returns HTML as a string. For Node, import from @polotno/html-export/node
// and install its @napi-rs/canvas and linkedom peers.
const html = await jsonToHTML(json);Full API reference: PSD Import and the Import & Export overview (HTML export section).
