---
title: "How to build a React PowerPoint (PPT and PPTX) viewer"
canonical_url: "https://www.nutrient.io/blog/how-to-build-a-react-powerpoint-viewer/"
md_url: "https://www.nutrient.io/blog/how-to-build-a-react-powerpoint-viewer.md"
last_updated: "2026-08-11T08:08:12.847Z"
description: "A step-by-step tutorial explaining how to build a PowerPoint (PPT and PPTX) viewer using React with Nutrient Web SDK."
---

**TL;DR**

This tutorial shows how to build a React PowerPoint viewer using Nutrient Web SDK, which converts Office documents to PDF directly in the browser without server-side processing. You’ll create a React project with Vite, add the Nutrient dependency, and implement a component to display PPT/PPTX files. The solution offers additional capabilities like text editing, annotations, and signatures without requiring MS Office software or licenses.

In this blog post, learn how to build a [React PowerPoint viewer](https://www.nutrient.io/guides/web/viewer/office-documents.md) using Nutrient Web SDK. You’ll open and view PPT or PPTX files directly in your web browser using client-side processing (no server required).

The image below shows what you’ll be building.![A PPTX presentation rendered in the browser by a React PowerPoint viewer built with Nutrient Web SDK](@/assets/images/blog/2023/how-to-build-a-powerpoint-viewer-using-javascript/result.png)

You can check out the [demo](https://www.nutrient.io/demo/office-viewer) to see it in action.

## Opening and rendering Office documents in the browser

Nutrient Web SDK brings support for Word, Excel, and PowerPoint formats to your application, without you or your users needing any MS Office software, MS Office licenses, or third-party open source software. The technology works by converting an Office document to PDF directly in the browser, and the document is then rendered in our JavaScript viewer.

## Unlocking more capabilities with Office-to-PDF conversion

By converting an Office document to PDF using client-side JavaScript, you have the option to support a rich array of additional Office document functionality, such as:

- **Text editing** — Edit text directly in the displayed Office document.

- **Page manipulation** — Organize documents by adding, removing, or rearranging pages.

- **Annotations** — Boost collaboration by adding text highlights, comments, or stamps.

- **Adding signatures** — Draw, type, or upload a signature directly to an Office document.

[Explore Demo](https://www.nutrient.io/demo/office-viewer)

## Requirements to get started

To get started, you’ll need:

- The [latest version of Node.js](https://nodejs.org/en/).

- A package manager compatible with npm. This guide contains usage examples for [Yarn](https://yarnpkg.com/) and the [npm](https://docs.npmjs.com/cli/v7/commands/npm) client (installed with Node.js by default).

## Setting up a new React project with Vite

1. To get started, create a new React project using Vite:

   ```bash

   # Using Yarn

   yarn create vite nutrient-react-example --template react

   # Using npm

   npm create vite@latest nutrient-react-example -- --template react
   ```

2. Change to the created project directory:

   ```

   cd nutrient-react-example
   ```

## Adding Nutrient to your project

1. Add the Nutrient dependency:

   ```bash

   npm install @nutrient-sdk/viewer
   # or

   yarn add @nutrient-sdk/viewer
   # or

   pnpm install @nutrient-sdk/viewer
   ```

2. The Nutrient Web SDK loads its WebAssembly and supporting files from a local path, so you need to copy them to the public folder. Start by installing the required copy plugin:

   ```bash

   npm install -D rollup-plugin-copy
   ```

Then, update your Vite configuration (`vite.config.ts`) to copy the SDK’s asset files during build:

```ts

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import copy from 'rollup-plugin-copy';

export default defineConfig({
	plugins: [
		copy({
			targets: [
				{
					src:
						'node_modules/@nutrient-sdk/viewer/dist/nutrient-viewer-lib',
					dest: 'public/',
				},
			],
			hook: 'buildStart',
		}),
		react(),
	],
});

```

## Displaying a PowerPoint document

1. Add a PowerPoint (PPT, PPTX) document you want to display to the public directory. You can use our [demo document](https://www.nutrient.io/downloads/slides.pptx) as an example.

2. Now that everything is set up, you’ll render a PDF using the Nutrient SDK.

   Basic usage in `App.tsx`:

   ```tsx

   import { useEffect, useRef } from 'react';

   function App() {
   	const containerRef = useRef(null);

   	useEffect(() => {
   		const container = containerRef.current;
   		let cleanup = () => {};

   		(async () => {
   			const NutrientViewer = (await import('@nutrient-sdk/viewer')).default;

   			// Unload any previous instance.
   			NutrientViewer.unload(container);

   			if (container && NutrientViewer) {
   				NutrientViewer.load({
   					container,
   					document: 'slides.pptx', // Path to your PowerPoint document.
   					baseUrl: `${window.location.protocol}//${
   						window.location.host
   					}/${import.meta.env.PUBLIC_URL?? ''}`,
   				});
   			}

   			cleanup = () => {
   				NutrientViewer.unload(container);
   			};
   		})();

   		return cleanup;
   	}, []);

   	return (
   		<div
   			ref={containerRef}
   			style={{ height: '100vh', width: '100vw' }}
   		/>
   	);
   }

   export default App;
   ```

3. Start the app and run it in your default browser:

   ```bash

   # Using Yarn

   yarn dev

   # Using npm

   npm run dev
   ```

<!---

> Interact with the sandbox by clicking the left rectangle icon and selecting Editor > Show Default Layout. To edit, sign in with GitHub — click the rectangle icon again and choose Sign in. To preview the result, click the rectangle icon once more and choose Editor > Embed Preview. For the full example, click the Open Editor button. Enjoy experimenting with the project!

--->

## A note about fonts

In client-side web applications for Microsoft Office-to-PDF conversion, Nutrient addresses font licensing constraints through font substitutions, typically replacing unavailable fonts with their equivalents — like Arial with Noto. For precise font matching, you can provide your own fonts, embed them into source files, or designate paths to your `.ttf` fonts for custom solutions.

## Adding even more capabilities

Once you’ve deployed your viewer, you can start customizing it to meet your specific requirements or easily add more capabilities. To help you get started, here are some of our most popular React guides:

- [Instant synchronization](https://www.nutrient.io/guides/web/instant-synchronization.md)

- [Document assembly](https://www.nutrient.io/guides/web/editor/merge-or-combine.md)

- [Page manipulation](https://www.nutrient.io/guides/web/editor/page-manipulation/rotate.md)

- [Editor](https://www.nutrient.io/guides/web/editor.md)

- [Forms](https://www.nutrient.io/guides/web/forms.md)

- [Signatures](https://www.nutrient.io/guides/web/signatures.md)

- [Redaction](https://www.nutrient.io/guides/web/redaction.md)

- [Document security](https://www.nutrient.io/guides/web/document-security.md)

## Conclusion

You should now have our [React PowerPoint viewer](https://www.nutrient.io/guides/web/conversion/office-to-pdf.md) up and running in your web application. If you hit any snags, don’t hesitate to reach out to our [Support team](https://www.nutrient.io/support) for help.

You can also integrate our React PowerPoint viewer using web frameworks like [Angular](https://www.nutrient.io/guides/web/viewer/office-documents.md), [Vue.js](https://www.nutrient.io/guides/web/viewer/office-documents.md), and [jQuery](https://www.nutrient.io/guides/web/viewer/office-documents.md). To see a list of all web frameworks, start your [free trial](https://www.nutrient.io/try). Or, [launch our demo](https://www.nutrient.io/demo/office-viewer) to see our viewer in action.

## FAQ

Here are a few frequently asked questions about building a PowerPoint viewer in React.

#### Can the React viewer display both PPT and PPTX files?

Yes. Nutrient Web SDK renders both the legacy PPT format and modern PPTX by converting the file to PDF in the browser, so the same component handles either format.

#### Does the React PowerPoint viewer need Microsoft Office or a server?

No. Conversion and rendering run entirely client-side via WebAssembly — there’s no Microsoft Office installation, no MS Office licenses, and no server-side processing required.

#### What can I do beyond viewing the presentation?

Because the document is converted to PDF, you can also edit text, add or rearrange pages, annotate, redact, and add eSignatures on the rendered file using the same SDK.
---

## Related pages

- [The business case for accessibility: Five ways it drives enterprise value](/blog/5-ways-accessibility-drives-enterprise-value.md)
- [Accessibility Untangled Why It Matters Guide](/blog/accessibility-untangled-why-it-matters-guide.md)
- [Advanced Techniques For React Native Ui Components](/blog/advanced-techniques-for-react-native-ui-components.md)
- [`vector_store` holds your indexed documents (see the multimodal RAG post](/blog/agentic-rag.md)
- [Ai Document Automation Extraction To Action](/blog/ai-document-automation-extraction-to-action.md)
- [Ai Legal Assistant Document Authoring](/blog/ai-legal-assistant-document-authoring.md)
- [Angular File Viewer Pdf Image Office Files](/blog/angular-file-viewer-pdf-image-office-files.md)
- [Auto Tagging And Document Accessibility In Dotnet Sdk](/blog/auto-tagging-and-document-accessibility-in-dotnet-sdk.md)
- [Best Document Ai Platforms](/blog/best-document-ai-platforms.md)
- [Best Document Viewers](/blog/best-document-viewers.md)
- [The CEO’s AI playbook: Why decision architecture beats model selection](/blog/ceo-ai-playbook-decision-architecture.md)
- [1. Extract and chunk the PDF.](/blog/chat-with-pdf.md)
- [Complete Guide To Pdfjs](/blog/complete-guide-to-pdfjs.md)
- [Construction Document Data Extraction](/blog/construction-document-data-extraction.md)
- [Convert One Drive Files To Pdf In Sharepoint](/blog/convert-one-drive-files-to-pdf-in-sharepoint.md)
- [Create And Edit Pdfs In Flutter](/blog/create-and-edit-pdfs-in-flutter.md)
- [Create Pdfs With React](/blog/create-pdfs-with-react.md)
- [Creating A Document Scanner With Ocr In Python](/blog/creating-a-document-scanner-with-ocr-in-python.md)
- [Creating And Filling Pdf Forms Programmatically In Javascript](/blog/creating-and-filling-pdf-forms-programmatically-in-javascript.md)
- [The CTO’s AI playbook: Why accountability architecture beats orchestration](/blog/cto-ai-playbook-accountability-architecture.md)
- [Digital Signatures](/blog/digital-signatures.md)
- [Digital Workflow Automation](/blog/digital-workflow-automation.md)
- [Document Ai Vs Ocr](/blog/document-ai-vs-ocr.md)
- [Document Extraction Confidence Scores](/blog/document-extraction-confidence-scores.md)
- [Document Viewer](/blog/document-viewer.md)
- [Document Watermarking](/blog/document-watermarking.md)
- [Emerging threats: Your logging system may be an agentic threat vector](/blog/emerging-threats-your-logging-system.md)
- [app.py](/blog/extract-text-from-pdf-using-python.md)
- [Fillable Pdf](/blog/fillable-pdf.md)
- [How To Add Digital Signature To Pdf Using React](/blog/how-to-add-digital-signature-to-pdf-using-react.md)
- [How To Build A Dotnet Maui Pdf Viewer](/blog/how-to-build-a-dotnet-maui-pdf-viewer.md)
- [How To Build A Flutter Pdf Viewer](/blog/how-to-build-a-flutter-pdf-viewer.md)
- [or](/blog/how-to-build-a-javascript-pdf-viewer-with-pdfjs.md)
- [How To Build A Javascript Pdf Viewer](/blog/how-to-build-a-javascript-pdf-viewer.md)
- [or](/blog/how-to-build-a-nextjs-pdf-viewer.md)
- [How To Build A Powerpoint Viewer Using Javascript](/blog/how-to-build-a-powerpoint-viewer-using-javascript.md)
- [Using Yarn](/blog/how-to-build-a-react-excel-viewer.md)
- [How To Build A React Native Pdf Viewer](/blog/how-to-build-a-react-native-pdf-viewer.md)
- [How To Build A Reactjs File Viewer](/blog/how-to-build-a-reactjs-file-viewer.md)
- [or](/blog/how-to-build-a-reactjs-pdf-viewer-with-react-pdf.md)
- [or](/blog/how-to-build-a-reactjs-pdf-viewer.md)
- [How To Build A Reactjs Viewer With Pdfjs](/blog/how-to-build-a-reactjs-viewer-with-pdfjs.md)
- [How To Build A Vuejs Pdf Viewer With Pdfjs](/blog/how-to-build-a-vuejs-pdf-viewer-with-pdfjs.md)
- [How To Build A Vuejs Pdf Viewer](/blog/how-to-build-a-vuejs-pdf-viewer.md)
- [How To Build An Android Pdf Viewer](/blog/how-to-build-an-android-pdf-viewer.md)
- [How To Build An Angular Pdf Viewer With Ng2 Pdf Viewer](/blog/how-to-build-an-angular-pdf-viewer-with-ng2-pdf-viewer.md)
- [How To Build An Angular Pdf Viewer With Pdfjs](/blog/how-to-build-an-angular-pdf-viewer-with-pdfjs.md)
- [How To Convert Docx To Pdf Using Javascript](/blog/how-to-convert-docx-to-pdf-using-javascript.md)
- [How To Convert Docx To Pdf Using Python](/blog/how-to-convert-docx-to-pdf-using-python.md)
- [How To Convert Html To Pdf Using Html2pdf](/blog/how-to-convert-html-to-pdf-using-html2pdf.md)
- [or](/blog/how-to-convert-html-to-pdf-using-react.md)
- [How To Convert Html To Pdf Using Wkhtmltopdf And Csharp](/blog/how-to-convert-html-to-pdf-using-wkhtmltopdf-and-csharp.md)
- [or](/blog/how-to-convert-html-to-pdf-using-wkhtmltopdf-and-python.md)
- [How To Convert Word To Pdf In Nodejs](/blog/how-to-convert-word-to-pdf-in-nodejs.md)
- [or](/blog/how-to-create-a-react-js-signature-pad.md)
- [How To Create Pdfs With React To Pdf](/blog/how-to-create-pdfs-with-react-to-pdf.md)
- [How To Edit Pdfs Using Ios Pdf Library](/blog/how-to-edit-pdfs-using-ios-pdf-library.md)
- [How To Embed A Pdf Viewer In Your Website](/blog/how-to-embed-a-pdf-viewer-in-your-website.md)
- [How To Extract Tables From Pdf And Images](/blog/how-to-extract-tables-from-pdf-and-images.md)
- [How To Generate Pdf From Html With Nodejs](/blog/how-to-generate-pdf-from-html-with-nodejs.md)
- [base_url tells WeasyPrint where to resolve relative asset paths](/blog/how-to-generate-pdf-reports-from-html-in-python.md)
- [How To Merge Pdfs Using Javascript](/blog/how-to-merge-pdfs-using-javascript.md)
- [How To Ocr Pdfs In Linux](/blog/how-to-ocr-pdfs-in-linux.md)
- [How To Print Pdf In Csharp](/blog/how-to-print-pdf-in-csharp.md)
- [Open an image.](/blog/how-to-use-tesseract-ocr-in-python.md)
- [From an HTML string.](/blog/html-in-pdf-format.md)
- [Javascript Pdf Editors](/blog/javascript-pdf-editors.md)
- [Javascript Pdf Libraries](/blog/javascript-pdf-libraries.md)
- [Linearized Pdf](/blog/linearized-pdf.md)
- [or](/blog/merge-pdfs.md)
- [Swift Package Manager](/blog/mobile-pdf-sdk.md)
- [`elements` come from your document parser — each has a type and content.](/blog/multimodal-rag.md)
- [Nutrient Vs Conga Composer](/blog/nutrient-vs-conga-composer.md)
- [Online Document Viewer](/blog/online-document-viewer.md)
- [Open Pdf In Your Web App](/blog/open-pdf-in-your-web-app.md)
- [Building WCAG 2.2, Section 508, and PDF/UA-compliant PDFs with an SDK](/blog/pdf-accessibility.md)
- [Pdf Data Extraction Developer Guide](/blog/pdf-data-extraction-developer-guide.md)
- [Pdf Extraction Benchmark Opendataloader Bench](/blog/pdf-extraction-benchmark-opendataloader-bench.md)
- [Pdf Extraction Document Case Studies](/blog/pdf-extraction-document-case-studies.md)
- [Pdf Page Labels](/blog/pdf-page-labels.md)
- [Pdf Sdk Compliance Security Checklist](/blog/pdf-sdk-compliance-security-checklist.md)
- [Pdf Sdk Performance Benchmark](/blog/pdf-sdk-performance-benchmark.md)
- [Pdf Ua Compliance Guide](/blog/pdf-ua-compliance-guide.md)
- [Pdfjs Accessibility Structtree Printing](/blog/pdfjs-accessibility-structtree-printing.md)
- [Pdfjs Advanced Loading Streaming Workers](/blog/pdfjs-advanced-loading-streaming-workers.md)
- [Pdfjs Annotation Editor Layer](/blog/pdfjs-annotation-editor-layer.md)
- [Pdfjs Area Annotations Canvas Capture](/blog/pdfjs-area-annotations-canvas-capture.md)
- [Pdfjs Coordinate Systems Pdf To Screen](/blog/pdfjs-coordinate-systems-pdf-to-screen.md)
- [Pdfjs Document Outline Bookmarks Metadata](/blog/pdfjs-document-outline-bookmarks-metadata.md)
- [Pdfjs Eventbus Guide](/blog/pdfjs-eventbus-guide.md)
- [macOS](/blog/pdfjs-file-format-conversion-to-pdf.md)
- [macOS](/blog/pdfjs-generating-pdf-thumbnails-pdf2pic.md)
- [Pdfjs Limitations Commercial Upgrade](/blog/pdfjs-limitations-commercial-upgrade.md)
- [Pdfjs Native Annotation Layer Forms](/blog/pdfjs-native-annotation-layer-forms.md)
- [Pdfjs Navigation Zoom Rotation](/blog/pdfjs-navigation-zoom-rotation.md)
- [Pdfjs Pdf Page Manipulation Pdf Lib](/blog/pdfjs-pdf-page-manipulation-pdf-lib.md)
- [Pdfjs React Viewer Setup](/blog/pdfjs-react-viewer-setup.md)
- [Pdfjs Rendering Overlays React Portals](/blog/pdfjs-rendering-overlays-react-portals.md)
- [Pdfjs Server Side Text Extraction](/blog/pdfjs-server-side-text-extraction.md)
- [Pdfjs Sticky Note Annotations](/blog/pdfjs-sticky-note-annotations.md)
- [Pdfjs Text Highlight Annotations](/blog/pdfjs-text-highlight-annotations.md)
- [Pdfjs Text Search Pdffindcontroller](/blog/pdfjs-text-search-pdffindcontroller.md)
- [Pdfjs Thumbnail Sidebar](/blog/pdfjs-thumbnail-sidebar.md)
- [Process Flows](/blog/process-flows.md)
- [React Native Pdf Annotation](/blog/react-native-pdf-annotation.md)
- [Using Yarn](/blog/react-pdf-editor.md)
- [or](/blog/sample-blog-updated.md)
- [Sdk Product Updates Q2 2026](/blog/sdk-product-updates-q2-2026.md)
- [Add DWS MCP Server to your Claude Code project.](/blog/teaching-llms-to-read-pdfs.md)
- [Open an image file.](/blog/tesseract-python-guide.md)
- [Define the HTML part of the document.](/blog/top-10-ways-to-generate-pdfs-in-python.md)
- [Top 5 Javascript Pdf Viewers](/blog/top-5-javascript-pdf-viewers.md)
- [or](/blog/top-js-pdf-libraries.md)
- [Convert an HTML file to PDF.](/blog/top-ten-ways-to-convert-html-to-pdf.md)
- [Vector Pdf](/blog/vector-pdf.md)
- [Wcag2 Accessibility Requirements Documents](/blog/wcag2-accessibility-requirements-documents.md)
- [Web Sdk Is Now Headless](/blog/web-sdk-is-now-headless.md)
- [What Are Annotations](/blog/what-are-annotations.md)
- [What Is A Vpat](/blog/what-is-a-vpat.md)
- [What Is Document Processing](/blog/what-is-document-processing.md)
- [What Is Intelligent Document Processing](/blog/what-is-intelligent-document-processing.md)
- [What Is Pdf Ua](/blog/what-is-pdf-ua.md)
- [Why Pdfium Is A Trusted Platform For Pdf Rendering](/blog/why-pdfium-is-a-trusted-platform-for-pdf-rendering.md)
- [Why Your Ai Agent Hallucinates Pdf Table Data](/blog/why-your-ai-agent-hallucinates-pdf-table-data.md)

