Skip to content
プロジェクト

概要

Office PowerPoint(.pptx)ファイルを読みやすいJSONデータに変換します。

開発ツール

この数値の測り方

できること

  • Browser-side parsing: Read .pptx files directly in the browser, making it suitable for handling local user files without uploading them to a server for conversion.
  • Readable JSON output: Organize results by slides, elements, assets, themes, and related structures instead of exposing raw Office XML as low-level objects.
  • Built for secondary processing: Compared with simply converting PPTX to HTML, pptxtojson focuses more on data readability and programmability, making it easier to plug into downstream workflows.

計測したスター増加

24時間
0
7日間
0
15日間
-1
1か月
履歴を収集中

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

🎨 pptxtojson

npm-version npm download GitHub issues license GitHub stars GitHub forks

简体中文 | English

pptxtojson is a browser-first PPTX parser that converts .pptx files into clean, readable, structured JSON.

Live demo: https://pipipi-pikachu.github.io/pptxtojson/

China mirrors, regularly synced: Gitee, GitCode

✨ Core Capabilities

  • Browser-side parsing: Read .pptx files directly in the browser, making it suitable for handling local user files without uploading them to a server for conversion.
  • Readable JSON output: Organize results by slides, elements, assets, themes, and related structures instead of exposing raw Office XML as low-level objects.
  • Built for secondary processing: Compared with simply converting PPTX to HTML, pptxtojson focuses more on data readability and programmability, making it easier to plug into downstream workflows.

🚀 Use Cases

  • Web editor import: Convert PPTX slides and elements into an editable data model, such as PPTist.
  • Content extraction: Extract text, speaker notes, media assets, and other information for search, archiving, review, or data analysis.
  • AI document understanding: Turn presentation content into structured input for summarization, question answering, knowledge-base ingestion, and similar workflows.
  • Custom rendering: Build your own preview, thumbnails, editing canvas, or conversion pipeline from the JSON result.

🔨 Installation

npm install pptxtojson

💿 Usage

<input type="file" accept=".pptx">
import { parse } from 'pptxtojson'

document.querySelector('input').addEventListener('change', evt => {
	const file = evt.target.files[0]

	const reader = new FileReader()
	reader.onload = async e => {
		const json = await parse(e.target.result, {
			imageMode: 'base64',
			videoMode: 'none',
			audioMode: 'none',
		})
		console.log(json)
	}
	reader.readAsArrayBuffer(file)
})

For browser parsing, resource cleanup, Node.js, and TypeScript examples, see the user guide.

🎯 Notes

The current parsing result can achieve roughly 85%+ overall fidelity in layout and styling compared with the source file. For PPTX files manually created and edited from scratch by ordinary users, common page structures and basic styles can even reach 95%+ fidelity.

However, if the file comes from a complex online template, or if it was created by a highly skilled PowerPoint user with many "advanced techniques" such as complex masters, deeply nested groups, special shape effects, complex gradients, non-standard shapes, or complex SmartArt, the parsing difficulty increases significantly and the fidelity will decrease accordingly. These files are better treated as complex samples for separate evaluation.

📕 User Documentation

See the user guide for the full API, output fields, units, data examples, rendering considerations, and migration notes.

TypeScript definitions: types/index.d.ts.

🙏 Acknowledgements

pptxtojson refers heavily to the implementations of PPTX2HTML and PPTXjs.

Unlike those projects, pptxtojson does not aim to convert PPT files into HTML pages. Instead, it outputs clean, readable JSON that is easier to process further, and it includes many optimizations and additions to improve the completeness and accuracy of extracted information.

Issues and PRs with more PPTX samples, parsing scenarios, and improvement suggestions are welcome.

📄 License

MIT License | Copyright © 2020-PRESENT pipipi-pikachu

関連プロジェクトを探す

読み込み中…